Commit Graph

1543 Commits

Author SHA1 Message Date
Drew T eeff5eeaaa feat(decomp): propagate func_80188828 (gate lane) 2026-08-17 12:12:33 -06:00
Drew T dada0b1b82 feat(decomp): propagate func_80187300 (gate lane) 2026-08-17 12:12:18 -06:00
Drew T de5301b4ff feat(decomp): propagate func_80188478 (gate lane) 2026-08-17 12:11:57 -06:00
Drew T c160e4c593 feat(decomp): worker gate — +14 fns x0 propagated (fleet 95.7%) 2026-08-17 12:11:40 -06:00
Drew T 70b572854d feat(decomp): worker gate — +17 fns x0 propagated (fleet 95.7%) 2026-08-17 12:08:56 -06:00
Drew T cc789d5130 feat(decomp): worker gate — +21 fns x0 propagated (fleet 95.7%) 2026-08-17 12:03:13 -06:00
Drew T 85b39b3253 feat(decomp): main leftover bank — func_800173DC (§180 sweep, byte-identical) 2026-08-17 12:02:08 -06:00
Drew T 65ed788eb4 feat(decomp): propagate func_80181170 (gate lane) 2026-08-17 11:28:55 -06:00
Drew T 06365e6f9a feat(decomp): worker gate — +4 fns x0 propagated (fleet 95.7%) 2026-08-17 11:28:38 -06:00
Drew T 93922b98c7 feat(decomp): worker gate — +1 fns x0 propagated (fleet 95.7%) 2026-08-17 11:27:27 -06:00
Drew T 3d1fd60eb9 feat(decomp): worker gate — +14 fns x0 propagated (fleet 95.7%) 2026-08-17 11:21:46 -06:00
Drew T b1a91c6b8c feat(decomp): worker gate — +33 fns x0 propagated (fleet 95.6%) 2026-08-17 01:03:22 -06:00
Drew T 81a3b73f22 feat(decomp): propagate func_8018A1B4 (gate lane) 2026-08-17 00:58:37 -06:00
Drew T 1b3fae2c1b feat(decomp): propagate func_80184BAC (gate lane) 2026-08-17 00:55:13 -06:00
Drew T fe5208a839 feat(decomp): worker gate — +30 fns x0 propagated (fleet 95.6%) 2026-08-17 00:54:31 -06:00
Drew T 6c51bb8999 feat(phase-31): MoveImage absorbs its splat-carved epilogue SYS_OBJ_8F4 (49 ins); 143dbb89 byte-identical 2026-08-17 00:04:08 -06:00
Drew T ef80215dcb feat(phase-31): SIX-WAY FRAGMENT MERGE — func_8005B7B0 (184 ins) absorbs 5 splat-carved fragments; 143dbb89 byte-identical 2026-08-17 00:03:33 -06:00
Drew T a416d3adc3 feat(phase-31): func_80030730 + func_80059BFC banked (TU prototype adopted, cast at use) 2026-08-17 00:01:47 -06:00
Drew T 419bfa6174 feat(phase-31): final-lane recoveries banked — incl. SYS_OBJ_1DC0 (the byte-wrong redraft) and func_80034C24 (symbol identity); 143dbb89 2026-08-17 00:00:57 -06:00
Drew T 2dbf235efc feat(phase-31): forward-typedef fix unblocks func_8002C8F4 + func_80034314 (EXE 143dbb89 byte-identical) 2026-08-16 22:52:39 -06:00
Drew T a6e522a96a feat(phase-31): typedef comparison ignores comments (gate_main + reconcile_slate); func_8001ABBC + func_80037028 banked via byte-neutral TU edits 2026-08-16 22:49:05 -06:00
Drew T 8b567a21a8 fix(phase-31): retype D_8007622C to s32[] in the TU (byte-neutral, 143dbb89) — unblocks func_80037028 2026-08-16 22:47:31 -06:00
Drew T c7ef83066f fix(phase-31): two byte-neutral TU declaration corrections — func_8001ABBC returns s32; D_80076240 is a Slot16A[] (verified 143dbb89) 2026-08-16 22:45:39 -06:00
Drew T 61f3745193 feat(phase-31): S53 recovery — 10 more main functions banked (declaration reconciliation; EXE 143dbb89 byte-identical) 2026-08-16 22:38:47 -06:00
Drew T 1ebca23c87 feat(phase-31): gate_main hoists TU typedefs above the include block (§181 class 2); +3 recovered drafts banked 2026-08-16 22:20:56 -06:00
Drew T dc7e62c834 feat(decomp): worker gate — +21 fns x0 propagated (fleet 95.6%) 2026-08-16 20:16:34 -06:00
Drew T 486321996c feat(decomp): propagate func_801808C4 (gate lane) 2026-08-16 20:06:04 -06:00
Drew T d27ba537f8 feat(decomp): worker gate — +36 fns x0 propagated (fleet 95.6%) 2026-08-16 20:04:51 -06:00
Drew T e960382de7 feat(phase-31): wave R — 18 main functions banked (EXE 143dbb89 byte-identical) 2026-08-16 20:03:03 -06:00
Drew T 6bc8bb6894 feat(phase-31): wave Q — 40 main functions banked; + fragment_check.py and bisect_slate.py
Wave Q (90 cards / 6,249 ins) was stopped mid-flight, then a repair-only pass recovered 12 of its
39 unfinished drafts (+579 ins, 51 -> 64 verified MATCH). Banking took two new tools, because the
gate failed three times on causes no C-level check can see.

tools/fragment_check.py (NEW) — the enclosing-function trap, both halves, in milliseconds:
  * a draft whose [addr, addr+4*nins) SUBSUMES another symbol. splat labels addresses that are not
    functions (a bare epilogue tail, a jump-only branch target, an interior label); convert the
    enclosing function and a neighbour's `jal .L80050F24` loses its target.
  * a draft that DEFINES another stub's symbol in inline asm. MoveImage's repair agent correctly
    worked out that a trailing epilogue belongs to MoveImage (splat attributes those bytes to the
    NEXT symbol) and emitted `.globl SYS_OBJ_8F4` itself -- right bytes, match_one passes, and the
    assembler then sees the symbol defined twice because the fragment still has its own .s.
  My first hypothesis was the subsumption case; the tool REFUTED it (clean) and the redefinition
  case was the real one. Recording that order, because I built the tool before verifying the
  premise -- R35 inverted.

tools/bisect_slate.py (NEW) — gate_main's built-in bisect ran THREE HOURS on a 45-draft slate and
printed nothing. Three defects: it never checked whether the BASELINE builds (if no subset can
pass, the search is doomed from step 1), it logs only when it isolates a single draft, and its
re-split rule degrades toward one rebuild per draft. The replacement runs the NULL CONTROL first
(the same control that refuted this phase's "main is link-blocked" misdiagnosis), logs every step,
and does a true binary search: it found the culprit (SYS_OBJ_1790) in 7 steps and 176 SECONDS.

Result: 40 banked, main stubs 1,803 -> 1,763.
2026-08-16 17:21:10 -06:00
Drew T ec42c2116c feat(phase-31): worker gate — +8 fns x0 propagated (fleet 95.5%) 2026-08-15 21:56:44 -06:00
Drew T ad2aa6173f feat(phase-31): wave P — 32 main functions banked, main byte-identical (S52)
Wave P was the first full run of the 6k-ins doctrine: 60 cards / 6,589 ins in 2 gate groups,
59/60 claimed and 58/60 independently re-verified MATCH (6,372 ins), reloc_identity 58/58 AGREE
with ZERO symbol errors -- the second consecutive clean wave on symbol identity.

Banking cost a dozen rebuilds and exposed four more gate_main defects plus three regressions of
my own. The tool fixes, all NC'd:
- resolve_conflicts never read a draft's OWN DEFINITION, so the DEF-side wall (a draft defining
  s32 func_X against a TU prototyping void func_X) reached the compiler. Now definition-aware:
  it caught 13 conflicts up front where the build had been finding them one rebuild at a time.
- DECL and both typedef patterns anchored on end-of-line, so a TRAILING COMMENT hid a declaration
  or typedef entirely -- and agents comment nearly everything they declare. Seventh instance of
  one root cause: a scanner that looks green while reading less than it claims (R32).
- typedef handling is now BODY-AWARE and POSITION-AWARE, in a single pass:
    * identical definition visible ABOVE the insertion point -> strip and reuse;
    * same name, different shape -> rename (private to the draft);
    * definition below the insertion point -> never reuse (it is not in scope there).
  Three wrong strategies preceded this, each costing a rebuild: blanket strip (the file's copy can
  sit BELOW the draft -> implicit-int, then a collision), blanket rename (breaks drafts that share
  an IDENTICAL typedef, because their externs stop agreeing -- my regression, three drafts at
  once), and a rescan loop that found the definition it had just renamed and stripped it as a
  self-duplicate -> 'parse error before *'.

KNOWN LIMIT, recorded not fixed: the conflict check compares spelled type NAMES, so three drafts
each defining their own Slot54 with different layouts all declared func_80032A74(Slot54*) and
looked compatible. Comparing struct LAYOUTS for locally-defined types is the real fix.

13 + 4 verified-correct drafts are parked in two named buckets (competing local type models;
immovable TU declarations that gate_main reverts before every build).
2026-08-15 21:55:38 -06:00
Drew T 34a4d63d4e feat(phase-31): worker gate — +4 fns x0 propagated (fleet 95.5%) 2026-08-15 14:02:43 -06:00
Drew T 110570e3fc feat(phase-31): wave O — 46 main functions banked, main EXE byte-identical (S52)
36 fresh wave-O cracks + 10 recovered wave-J/K/L drafts, verified in ONE clean rebuild:
143dbb89f34491258bbc27810d0a12ec8b43a8dd BYTE-IDENTICAL. main stubs 1881 -> 1835.

Wave O was a 3-arm 49-card wave (6,266 ins): main head-crack, main UNKNOWN, overlay UNKNOWN.
47/49 standalone MATCH, independently re-verified by me (R14) at 47/49 -- exact agreement --
and reloc_identity reported 46 AGREE / 0 MISMATCH, the first wave of the campaign with zero
symbol errors. THE UNKNOWN LEVER DRAFTS LIKE ANY OTHER LANE, which matters strategically: it is
~138k ins fleet-wide (a quarter of everything open) and was routed as "needs its own lane".

FOUR gate_main defects fixed here, each of which had been silently costing prior waves drafts:
- typedef stripping walked drafts in SLATE order while substitution happens at ADDRESS order, so
  the surviving typedef could land BELOW a draft using it -> "syntax error before D_800A651C".
  Verified the two orders genuinely diverge for both destination files in this slate.
- a BUILD failure (sha None) fell through to a silent bisect -- a full clean rebuild per step to
  rediscover what the compiler had already printed and discarded. Now the error lines are shown
  and the offending drafts named for undefined-reference/redefinition/conflicting-types.
  (My first version of that printer TAILED a stderr+stdout concatenation and faithfully showed 25
  lines of make progress chatter instead of the error -- selecting by position, not by content.)
- typesig treated "short" and "s16" as different types (R39 over-refusal). Aliases now normalize;
  11/11 NC cases pass, with signedness, volatile and array-vs-scalar still conflicting correctly.
- conflict detection ignored shared headers: engine_core.h's DEFINE_ macros declare symbols in
  their own bodies, so a draft's file-scope array decl of D_800A651C was illegal. Block-scoping
  the draft's extern fixes it byte-identically.

DECLARATION RECONCILIATION took the slate from 5 dropped to 0, and three of the four conflicts
were load-bearing CODEGEN, not style: the array form of D_80078D88 blocks a sched1 hoist (scalar
users adopt [0] for free); "volatile" on D_800B9A02 is required by one draft and fatal to two
others (plain u16 loses 1 bank, volatile loses 2); D_800A651C needs block scope. Cookbook §176f.
2026-08-15 14:01:19 -06:00
Drew T 1149feec2c feat(phase-31): propagate func_80186C44 (gate lane) 2026-08-15 09:49:54 -06:00
Drew T fa7204e531 feat(phase-31): worker gate — +1 fns x0 propagated (fleet 95.4%) 2026-08-15 09:46:12 -06:00
Drew T b9f2540aa7 feat(phase-31): propagate func_80181B4C (gate lane) 2026-08-15 08:08:34 -06:00
Drew T cb93147138 feat(phase-31): propagate func_80186764 (gate lane) 2026-08-15 08:08:24 -06:00
Drew T 6634db313d feat(phase-31): propagate func_80187738 (gate lane) 2026-08-15 08:08:14 -06:00
Drew T 0b838da46c feat(phase-31): propagate func_80187DB8 (gate lane) 2026-08-15 08:08:00 -06:00
Drew T f59b0fdc75 feat(phase-31): propagate func_801884FC (gate lane) 2026-08-15 08:07:50 -06:00
Drew T 308e59d995 feat(phase-31): propagate func_80186E6C (gate lane) 2026-08-15 08:07:40 -06:00
Drew T 1919009dc4 feat(phase-31): propagate func_80184A08 (gate lane) 2026-08-15 08:07:30 -06:00
Drew T 9f69581941 feat(phase-31): propagate func_80183754 (gate lane) 2026-08-15 08:07:17 -06:00
Drew T 3a708363b5 feat(phase-31): propagate func_801860E4 (gate lane) 2026-08-15 08:07:03 -06:00
Drew T 133e3c4e4c feat(phase-31): propagate func_80181934 (gate lane) 2026-08-15 08:06:54 -06:00
Drew T c2cf9f226c feat(phase-31): propagate func_80181820 (gate lane) 2026-08-15 08:06:40 -06:00
Drew T ccf48cf090 feat(phase-31): propagate func_80188790 (gate lane) 2026-08-15 08:06:22 -06:00
Drew T 3f31273793 feat(phase-31): propagate func_8018825C (gate lane) 2026-08-15 08:06:12 -06:00
Drew T 303e1ffc4b feat(phase-31): propagate func_8018512C (gate lane) 2026-08-15 08:05:58 -06:00