-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).
- log the func_801670E4 (§57 decl-normalize) + func_8016CBC0 (6-typedef lift) completions
- capture the commit gotcha: use 'git add -u src/' for sweeps, not a split-name glob (SC07 carves
members into differently-named files; a glob silently omitted 4 R22-verified banks, fixed by amend)
- SESSION-3 CHECKPOINT: 140/140 byte-identical, fleet 75.1% instr, safe to open a fresh session
- 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.
func_801670E4 sibling ov_SC01_004: caller decl 'extern void func_801670E4(Entity*,s32,s32,s32)' conflicts
with canonical 's32(s32,s32,s32,s32)'; exemplar used a fn-ptr cast at that caller. Fix = per-sibling
decl-normalize pass (same-function analog of cast_call_sites). Validation targets + where-to-build named.
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.
Single-table carve jtbl_801D836C (27e, 4-mod-8 first-table = placement-only) into the _o0
subseg; draft spliced clean, no reconciles needed (its only blocker was the missing carve).
Whole-binary gate [ OK ] sha1 d19c9580 == check.
The full 138-overlay family (424 ins) is now banked: exemplar + 137 siblings, 0 failures across
all 3 chunks — the first jtbl giant family completed through the §8e pad-spec mechanism.
Logs .run/sweep_80131340_c{1,2,3}.log.
- ROOT CAUSE PINNED (the session-2 half-pin was INVERTED; both probes were vacuous, R35):
cc1 emits .align 3 before EVERY jump table; maspsx passes it VERBATIM (the :435 'drop' is
an inventory-only pass); as bakes the pad SECTION-RELATIVE; link placement was never guilty
(SUBALIGN(2) + ALIGN(.,4) place 4-mod-8 carve starts tight). Merging originally-separate
TUs fires an intra-TU align where the original packed tight -> +4 at rodata 0xCC ->
image-wide %lo shift. Honest probes persisted: .run/probe_jtbl/ (verdict.md + objdumps).
- NEW tools/jtbl_rodata_pads.py: post-maspsx filter replaces each rodata .align 3 with the
ORIGINAL's exact pad bytes per a JTBL_PADS spec; fail-loud on table-count drift /
non-align-3 / non-jtbl rodata content. Byte-proven: verbatim 0xE4 pad-at-0xCC ->
filtered 0xE0 tight (= the merged carve span).
- jtbl_carve.py: spec-aware same-subseg merge (gap 0 or 4-with-zero-payload-word; else
NON-CONTIGUOUS -> isolate), interval-arithmetic pad specs (committed values CARRIED,
never re-derived), JTBL_PADS target-var emission into overlays.mk + revert() restore +
stale-.o invalidation; the false 'maspsx drops .align' docstring corrected (H5).
- Makefile: $(if $(JTBL_PADS),| jtbl_rodata_pads.py ...) stage in build/src/%.o + file-scope
empty default (env-shield). jtbl_family_bank.stub_file: duplicate-stub fail-loud (the
earlier 'ladder failure' was a wrong-TU splice into a stale _a.c stub, byte-witnessed).
- R22 clean-fleet WITH the fix wired: 140/140 byte-identical, tools-health green
(dedup 1846/0, C1 234205/234205), ZERO new banks -- fleet-neutral by construction.
- cookbook §8e (the jtbl alignment law) + §8a/§8a-pad corrections; decision-log R31 entry;
SETUP.md tool row; .gitignore allowlist for the probe verdict artifacts.
The 2 Task-3 cores banked x1 but skipped by dedup_propagate ("not self-contained: local types").
Lifted EntSC01077 (func_8014E284) + P_TAG_80137DD4 (func_80137DD4) into src/shared/engine_types.h
(fleet-included via engine_core.h), and inlined func_80137DD4's file-local `#define OTE` into the body
(byte-neutral macro expansion, re-evaluated per use to preserve codegen). Both now self-contained ->
dedup_propagate --recover = 138 overlays byte-identical, 0 stragglers, 2 new dedup groups.
~+32.7k ins (108+129 x138). R22 clean-fleet 140/140 byte-identical; tools-health OK; dedup 1846->1852;
C1 coverage 234205. §55c local-type propagation cap lifted for these 2.
SESSION-2 close: this session banked ~94k ins across 4 fns x~137 overlays (2 non-jtbl giants fully
propagated + this 2-core type-lift); fleet 71.4->72.1% instr (+0.7pp), 140/140 throughout. The 4 jtbl
giants remain deferred on the byte-proven 8-align jtbl-carve gap (root cause half-pinned: cc1+maspsx
both emit .align 2, so the +4B pad is a downstream as/ld_interleave artifact) -> teed up as the next task.
Task-4: the non-jtbl giant func_8013FAF8 (312 ins) is now DONE fleet-wide. It is an h_seq family
(masked-identical body, per-overlay symbols/relocs) so dedup_propagate refused it (reach<2); the
path is family_sweep --hseq --only 0x8013FAF8 --allow-pins (per-overlay symbol remap).
First sweep banked 0/137: family_sweep copies the exemplar's extern block VERBATIM, and the
hand-crafted exemplar had 4 callee externs diverging from the fleet-canonical (func_8005A600
void->s32, func_80024054 s32->void*, func_80137D08 s32*->int, func_8013AB54 s32*->s32) -> every
member threw `conflicting types`. Aligning those 4 in the COMMITTED exemplar .c to the
member-consensus form (byte-neutral; ov_SC01_077 stays byte-identical) -> re-sweep 137/137 banked,
0 failed. +312 ins x137 ~= +42.7k ins.
R22 clean-fleet 140/140 byte-identical; tools-health OK. Cookbook §56b (exemplar externs must be
fleet-canonical for an h_seq sweep; contrast dedup_propagate --recover which auto-reconciles CALLER
externs -- family_sweep does not, so pre-align the CALLEE externs by hand).
Both non-jtbl giants now fully banked+propagated (func_8013FAF8 x137, func_8014F4C0 x134); the 4
jtbl giants remain deferred on the byte-proven 8-align jtbl-carve gap.