Propagated the func_8015C32C jump-table exemplar to 110 more overlays via
jtbl_family_bank (carve + ld_interleave + remap, per-sibling whole-binary gated).
Run halted by an uncaught exception at member 111 (ov_SC06_018); 110/119 attempted
banked clean. Remaining ~19 members to follow.
First jtbl core of crack-wave3: gcc emits the switch jump table into .rodata, so
each overlay needs jtbl_carve + ld_interleave. Path validated 9/9 BANKED.
- func_8016B234: §58b self-def — engine_core.h func_8016B234 (void)->() no-proto
(byte-neutral: only 0-arg callers fleet-wide); typedef preamble stripped.
- func_8016C998: §59(1) local struct rename Slot/Blk32->Slot_998/Blk32_998
(collide with TU's Slot) + D_801D9CA0 extern moved to block scope (TU's other
decls of it are all block-scope; a file-scope one collided).
R22 clean-fleet pending (engine_core.h touched).
Exemplar cast (§56b) unblocked propagation: the bare func_80161208(p) call
relied on ov_SC01_077's no-proto decl, but member TUs carry a (void) prototype.
Casting the call member-proofs the templated body. All banks whole-binary byte-gated.
Propagated from the ov_SC01_000 exemplar (void func_8013D9B0(int param_1), a 141-ins
handwritten GTE color-interp loop w/ $s0-$s4 register pins). Each sibling TU carries
extern-void-(void) self-decls of func_8013D9B0 that conflict with the (int) def; NSD is
unsafe here (it reads the else-func_8013D9B0(N) call statements as decls and mis-casts,
§57a), so the self-decls were mechanically reconciled to K&R empty-args (byte-neutral,
compatible with the (int) def + every 0-arg/1-arg/fn-ptr-cast call site) across 132 TUs
before the sweep. 135/135 members banked, 0 failed (pins templated clean across the
structurally-identical engine siblings).
Propagated from the ov_SC01_000 exemplar. remap_hseq's gather_externs synthesizes a
non-volatile `extern u16 D_8011511A;` per sibling, which defeats the §18 volatile-strip
CSE (cast reads reload instead of folding to one load) -> byte-DIFF. Every sibling TU
(jr_8013FFD8) already declares D_8011511A volatile at file scope via the banked
func_801418F8, so the fix is to strip the draft's own decl and let the cast-at-use over
the TU's volatile decl produce the single-load match. 135/135 banked, 0 failed.
func_80141A60 (76): §18 cast-at-use *(u16*)&D_8011511A defeats the TU's file-scope
volatile decl of D_8011511A so gcc CSEs the 3 reads into one load (the draft matched
standalone but DIFFd in-TU due to the volatile reload).
func_8013D9B0 (141): reconciled the TU's two extern-void-(void) self-decls to K&R
empty-args (compatible with the int-param def; byte-neutral for the fn-ptr-cast and
0-arg call sites). NSD was unsafe here (it mis-parses the else-func_8013D9B0(N) call
statements as decls and mis-casts to void(*)(void), the §57a hazard). Both re-gate
BYTE-IDENTICAL.
The jr_8013F350 mega-TU declares func_80128ED8(s32,s32*) and DEFINE-macro func_80146C3C,
conflicting with the draft's carried externs. Dropped both externs + fn-ptr-cast the
func_80128ED8 call at use (byte-identical). Banked ov_SC07_006/007/011. Remaining: 1
o2b member (ov_SC07_010) — -O2 reconstruction TU hits an as --fatal-warnings $at wall.
The 10 jr_8013F350-split residuals failed on 'conflicting types for D_8011512E'
(exemplar decl s16 vs the jr_8013F350 TUs' canonical u16). Reconciled the exemplar
decl to u16 (byte-neutral — sole use is store-0); re-swept. func_801418F8 now 0 stubs.
Remaining: 4 func_8016DC20 SC07 members (byte-DIFF in the o2b/jr_8013F350 split).
Both banked fully (0 stubs remaining). func_8013EF88 templates clean because E4 (its
matching-critical local typedef) is already file-scope in every target TU via the
already-banked sibling func_8013EE10. func_8013D8FC's $s0-$s3 register pins template
fine across the structurally-identical engine siblings. 271/271 members, 0 failed.
hseq family sweep of 2 absent-family cores, templated from the clean ov_SC01_000
bank (s16-array + cast-at-use spellings) instead of the ov077 heavy-struct exemplar
that pick_exemplar defaults to. 258/272 members banked; 14 SC07-layout residuals.
-O0 core, single jump table jtbl_801D82FC carved into the o0 object's .rodata via
jtbl_carve (fit contiguously with the existing o0 carve). ov_SC01_077 byte-identical (R22 d19c9580).
These reference a per-overlay tail work-buffer whose base address DIFFERS per
overlay (h_seq relocated data). remap_hseq keyed the byte-OFFSET addresses
(D_801D9C21..) not the base symbol D_801D9C20/D_801D9C60 the exemplar C uses, so
it left them unresolved -> 0/137. Per overlay: base = symbol_map[D_801D9C21]-1;
declare dlabel D_<base> in config/symbols.<ov>.txt (byte-neutral, re-extract emits
the linker def), remap D_801D9C20->D_<base1> / D_801D9C60->D_<base2>. 3 SC07 stragglers
needed the carried ApplyMatrixSV/RotMatrixYXZ externs dropped (TU already declares
them with a different sig -> conflicting types). Each gated whole-overlay byte-identical.
The h_seq remap dropped the exemplar's local `struct W4` type; without it the
per-sibling struct-copy lowered to a differently-sized memcpy -> byte-DIFF (0/137).
Prepending `struct W4 { u32 w; } __attribute__((packed, aligned(1)));` to each
member draft restores byte-identity. Gated per-overlay via harvest_verify.
The hexR=138 dedup core (banked ×1 in commit:0716) -> dedup_propagate --addr
0x80150170 --source-overlay ov_SC01_077 --recover: 138 overlays rebuilt
byte-identical, 1 new group registered in config/dedup.us.yaml (0 stubs left).
~+13k ins (95 ins × 137 new members). (First attempt SIGTERM'd mid-gate at the
2-min timeout -> reverted the half-gated state, re-ran clean fail-closed.)
- broad --fix-def-sig sweep across the 60 substantial matched-ov077 families: 137/2169 banked.
- HONEST FRONTIER FINDING (R14/R35): the substantial-family pool is NOT broadly mechanical — only 137
of 2169 STAGED drafts actually bank; staging != banking. I over-estimated yield from the staged
count instead of gate-probing a sample first (the phase's own invariant). The other ~2032 need
per-family levers (self-decl / type-lift / def-sig+caller-thread), not one broad pass.
- --normalize-self-decls is SURGICAL-ONLY: applied broadly (esp. with --fix-def-sig) it makes
non-neutral TU edits that poison whole (overlay,split) groups; the backstop reverts them (0 false
banks) but it yields ~0. --fix-def-sig is broad-safe (draft-level, bisects per-member).
- R22 clean-fleet 140/140 byte-identical; tools-health OK (dedup unchanged); 0 NON_MATCHING (G4).
- func_8016CBC0's 137 members were NOT self-decl-blocked (§57 survey: 0 divergent self-decls) but blocked
on the exemplar's 6 LOCAL typedefs (Rec_/Blk_/SVEC_/CLR_/Poly_/Mtx8_8016CBC0). Lifted all 6 verbatim into
src/shared/engine_types.h (fleet-visible via engine_core.h) + removed the locals from the exemplar TU.
No fleet name-collision; exemplar rebuilds byte-identical d19c9580 (the type-lift is byte-neutral).
- family_sweep --hseq --only 0x8016CBC0 --no-preclassify --normalize-self-decls -> 137/137 banked, 0 failed
(the decl-normalize stage a correct no-op here — 0 self-decls). 0 func_8016CBC0 stubs remain fleet-wide.
- R22 clean-fleet 140/140 byte-identical; tools-health OK (dedup 1846/0, C1 234205/234205); 0 NON_MATCHING
linked (G4). fleet 74.9->75.1% instr / 60.1->60.6% distinct / 86.96->87.00% fn-count.
- R14 lesson: two families that both looked like a 'stuck 137-family' needed DIFFERENT levers
(decl-normalize §57 vs type-lift) — route by the real cc1 error, not the shape. session-total +270 members.
- new tools/normalize_self_decls.py — the SAME-FUNCTION decl-normalize: drop each decl of the templated
fn F that the sibling TU's OWN already-banked callers declare divergently (block-scope, a different C
form than the exemplar's fn-ptr cast) + cast its in-scope calls (byte-neutral §17a-1). cast_call_sites
does the callee direction, reconcile_tu the data direction; this is the third: F itself.
- family_sweep --normalize-self-decls: new per-sibling stage after reconcile_def_sig (edits the sibling
TU file = harvest_verify's baseline, like edit_remap_sweep) + snapshot/final-SHA-MISMATCH revert backstop.
- byte-proven the sole blocker was the caller-decl conflict, NOT --fix-def-sig (which renamed F's def
params a0..a3 while the body used arg0..arg3 -> arg0 undeclared; R14 confound removed). 133/133 banked,
0 failed, 0 backstop fires; 0 func_801670E4 stubs remain fleet-wide.
- R22 clean-fleet 140/140 byte-identical; tools-health OK (dedup 1846/0, C1 234205/234205); 0 NON_MATCHING
linked (G4). fleet 74.6->74.9% instr / 59.4->60.1% distinct / 86.92->86.96% fn-count. cookbook §57.
- R14: func_8016CBC0 (also stuck 137-family) has NO divergent self-decl -> type-lift-blocked, a SEPARATE
lever (6-typedef cluster, like 8012956c), not this pass. Route by the real cc1 error.
538/1234 members banked across the 8 non-jr cores (8016cbc0/8015ea3c/8015d738/8015f448/801670e4/
8014ffdc/8012956c/8013d53c). 696 failed — likely the func_80161208 file-scope-prototype poisoning
re-occurring per-sibling; to triage + re-sweep. Each banked member whole-binary gated.
Fable cracked the cross-statement address-CSE via a neighboring-symbol offset (*(S9*)(&D_801DA998+0x20)
never unifies with SYMBOL_REF while gas folds %hi/%lo(sym+k) byte-identical) + dead-pad frame +
block-local coalesce + 2 density anchors. Reconcile: void* def-sig (byte-neutral — caller func_8013D3D4
keeps param_1 in $a0) + dropped decls colliding with banked 8013CB84's Rec12/Rec9 (uses cast at site).
Regen family map post-bank -> exemplar promoted draft-ov077->matched-ov077 -> standard
family_sweep --hseq templates the committed reconciled body (the --reconcile-raw path
mishandles per-overlay data externs; standard path is correct). +249x138 ~= +34k ins.
Chunk stopped at 8/50 (3 BANKED / 5 gate-fail) to read the real per-sibling error instead of
churning the ladder (§55b). Mid-flight ov_SC01_080 reverted clean.