docs(phase-24): store the ×1-giants->×134 handoff for a fresh session (whale-derived shared-header lever bypasses compiles_standalone)

This commit is contained in:
Drew T
2026-07-07 22:36:30 -06:00
parent 8cfbbf2d47
commit b205115d69
+1
View File
@@ -46,6 +46,7 @@ Whole-binary byte-gate (`tools/harvest_verify.py`) is the SOLE arbiter (G3/P9).
## Progress log
*(append one line per task on completion — the crash-recovery trail)*
- **🔜 NEXT SESSION (2026-07-07, whale done) — the 2-3 ×1-matched giants → ×134 (Drew: "finish the giants").** `func_801372B0` (207) + `func_801770E0` (152) + `func_8014E048` (143, T5b S11 crack) are MATCHED but banked ×1 in ov_SC01_077, STUBBED in the other 133 overlays — blocked from ×134 because `dedup_propagate.compiles_standalone` (tools/dedup_propagate.py:246) REJECTS register-asm-pin / anon-struct / local-typedef bodies (§A). Est. ~+0.4-0.6% byte-weight (already-matched; no new matching). **WHALE-DERIVED LEVER (a promising LEAD — verify, not proven):** the whale propagated ×134 WITHOUT dedup_propagate — via a **shared header** (`src/shared/func_80144B9C.h`) + a **hand-registered** h_exact dedup group (`.run/t7b/register_whale_dedup.py` → E_func_80144B9C, `source=`the header). This pattern **BYPASSES `compiles_standalone` entirely**. The ×1 giants may bank ×134 the same way: extract each matched body → `src/shared/<fn>.h`, then in ov_SC01_077 AND each of the 133 overlays replace the `INCLUDE_ASM(<fn>)` line with `#include "../shared/<fn>.h"` **AT THE STUB POSITION** (NOT the file top — the fns are position-locked in the -O2 main subseg, unlike the whale which had its own o0b subseg), and hand-register the group. Sidesteps the pin/asm gate. (Alternative: teach `compiles_standalone` to compile pin/asm bodies WITH the pins.) A `rollout_whale_o0.py`-style tool (but for a mid-file `#include`, no yaml carve since these are -O2) would script it. **Then the giant endgame is fully banked.** Whale commits **commit:0463 (×1) + commit:0464 (×134)** — ready for Drew to push.
- **🐋 T7 WHALE ×134 ROLLOUT COMPLETE — clean fleet 136/136 (2026-07-07):** all 134 overlays now carry func_80144B9C as -O0 compiled C (was ×1 in ov_SC01_077) — the single biggest byte-weight lever, banked ×134 (~+1.6% byte-weight). Mechanism (`tools/rollout_whale_o0.py`): per single-file overlay, LINE-split `<ov>.c` at the whale (splat emits in vram order → no item-parse hazard), carve the yaml code subseg into before/`_o0b`(-O0)/`_after`, thin `<ov>_o0b.c` #includes the shared `src/shared/func_80144B9C.h` (the whale C moved there — DRY, TU-local typedefs, NOT a fragile 200-line DEFINE_ macro). One Makefile `WHALE_O0B_OBJS` wildcard -O0-compiles all `_o0b.o`. Registered dedup group **E_func_80144B9C** (134 members, h_exact 74186b97, source=the header — `group_members` keys on binary+vram, so a header-share validates like a macro-share). **CLEAN fleet check-all 136/136 (R22)**; dedup-check 1810→**1811/0**; FLEET REAL 225816→225949, byte-identical 65.91→**65.95%** function-count (the big gain is byte-weighted). Validated on ov_SC01_000 + spot-checks SC02/SC03/SC07 before the full fleet. Distilled: **cookbook §38** (struct-assign -O0 idiom + the -O0 reach-134 rollout + the memcpy asm-label) + SETUP inventory. **🐋 WHALE DONE.** Commit: (this).
- **🐋 T7 WHALE func_80144B9C CRACKED + banked ×1 (-O0), clean fleet 136/136 (2026-07-07):** the 770-ins reach-134 whale — the single biggest byte-weight lever (≈ next ~8 giants combined). **CRACK (cheap Opus, NO Fable5/calls.c — both retired):** the close=2 residual was a STRUCT ASSIGN `D_80078E50 = *ent;` (sizeof(ENT)==0x24), NOT an explicit memcpy() — gcc-2.7.2 -O0 expands a >MOVE_RATIO struct copy via emit_block_move→emit_library_call(memcpy): args go through copy_to_mode_reg (pseudos) then `addu $a0,$v1 ; addu $a1,$v0` = the exact 2 missing moves. **BANK INFRA (byte-neutral, reusable for ×134):** (1) 2nd per-file -O0 split — the whale is a 2nd -O0 region (prologue 21F0A003) in the -O2 "after" segment, carved into its own -O0 object `o0b` (splat.ov_SC01_077.yaml 3-way + Makefile CC1FLAGS=-O0; the file is splat-emitted in vram order → a LINE-based split at the whale preserves all banked C, no item-parsing/DEFINE_ hazard — `.run/t7b/split_whale.py`). (2) `memcpy=0x8005C324` in symbols.resident.txt (overlays+resident ONLY — main defines memcpy via MEMCPY.o, so a shared-symbol add would multiple-def) + `__asm__("memcpy")` on the engine_core.h block-copy macro (keeps the non-builtin C name to avoid gcc's built-in-memcpy codegen, emits the same 0x8005C324 call; benign "conflicting types for built-in memcpy" warning). splat REJECTS two symbols at one addr (tried func_8005C324+memcpy → error) → the asm-label is the fix. ov_SC01_077 == d19c9580; **CLEAN fleet check-all 136/136 (R22)**, dedup 1810/0. **W9 NEXT: script the ×134 -O0 rollout** (per-overlay o0b split via split_whale-style tool + a DEFINE_func_80144B9C() macro w/ TU-local typedefs — no engine_types.h collision; 133 single-file overlays, whale stubbed at file 0x1CA44 in each) → ~+1.6% byte-weight. Commit: (this).
- **T7 §G BATCH CLOSE ✅ (2026-07-07, committed; TRUE clean fleet 136/136) — 6/8 reach-134 giants cracked, 4 propagated ×134, fleet 65.75→65.91%:** MATCHED: `func_801571C4` (permuter, after the p16_permute comment-fix), `func_8014EA4C`/`func_801372B0`/`func_801770E0`/`func_80176D94`/`func_80148094` (Fable5, sequential idiom-banking chain). 2 WALLS (stay INCLUDE_ASM, G4): `func_80178004` (biv-init emit-order, close=7), `func_801412A8` (allocation placement-knot, close=29). **Propagated ×134:** 571C4/EA4C/76D94/48094 (134 overlays byte-identical; dedup **1810 groups / 0 failed**; genuinely-clean `make clean`+extract-all-136+check-all = **136/136**). **×1 (×134 follow-up — §A `dedup_propagate.compiles_standalone` gaps):** `func_801372B0` (asm-label-alias bank; blocked by local SVEC/GLINE typedefs — need unique-renamed lift — + register-asm pins), `func_801770E0` (anon-struct'd; blocked by register-asm pins). **NEW TOOLS:** `tools/p16_permute.py` comment-fix (a silent bug that had no-op'd the permuter on EVERY commented draft → immediately cracked 571C4) + `tools/permuter_ils.py` (warm-restart iterated-local-search). **KNOWLEDGE (durable):** cookbook **§37** + `docs/gcc-2.7.2-map/t7g-giant-harvest.md` (sibling-isomorphism law · `/s`-dep-lattice load+store dual · allocno ref-boost · coalescable-copy insn_count bump · RC-6-exemplar downgrade · "RTL dumps NOT stripped" · asm-label-alias/anon-struct banking). **REMAINING:** the WHALE `func_80144B9C` (close=2, DISCOVERED -O0 — needs a 2nd per-file -O0 split + gcc-2.7.2 `calls.c` + Fable5) + the 2 ×1 giants' ×134 (a pin/asm self-containment shim). Commit: (this).