Files
BFM-decomp/phase-ends/CURRENT_PHASE.md
T
Drew T 8dbde10752 feat(phase-26): Task-8 validation slice — reconcile→bank proven (4 cracks into ov077, R22 136/136)
- pre-Fable5-window de-risk (Drew): validate reconcile→gate→template on the triage cracks before the window.
- reconcile→bank WORKS: raw 0/23 (§41 def-side wall) -> canon_sig_reconcile v3.2 -> 4/15 banked into ov077
  (func_801506A4/8016A73C/80167540/80155800), byte-identical, R22 clean-fleet 136/136.
- templating a RECONCILED body x133 FAILS 0/4: reconciled bodies are ov077-TU-specific (canonical-sig casts
  + collision-renames) -> need per-sibling re-reconcile (§41c). Task-8 prerequisite: port the h_norm
  --reconcile M2 path into hseq_sweep so the type-using families (triage cracks + the 61 Fable5 cores) can
  template x134. PURE families already template plainly (Task 5: 399 banked).
- decision-log 2026-07-11: the slice paid for itself — found the templating gap BEFORE spending the window.
  Paused before building the wiring per Drew.
2026-07-11 23:40:01 -06:00

15 KiB
Raw Blame History

CURRENT PHASE — Phase 26: The Family-Endgame (finish the decomp)

Status: ACTIVE · plan approved by Drew (gate 1) 2026-07-11 · Generation Gen2 (18th phase of the arc) Opening brief: docs/family-endgame-megaplan.md (Phase-25 handoff). Fable5 window closes ~2026-07-13. Recovery note: a fresh session resumes from the ▶ CURRENT TASK below (P3 — autonomous between gates). Read the plan context here + the megaplan; per-task log at the bottom is the crash-recovery trail.

The plan in one paragraph

The Phase-25 h_seq reframe: the "unique tail" is really per-location families — crack ONE exemplar, template ×~120 siblings through the whole-binary byte-gate. Planning-session verification (2026-07-11) reproduced the survey from the sigs: 663 tail families; substantial (nins≥80) = 186 families / 1.85M ins (megaplan's "986" was a miscount). Design-stage discovery (byte-verified on specifics, V0 re-verifies — R14): the tail is ~90% a reloc-tracker blind spot — norm_stream/reloc_targets drop the pending lui-hi on any R-type write, but gcc-2.7.2's indexed-global idiom (lui; addu $idx; lw lo($at)) preserves it, so every D_x[i] access made its function "fleet-unique" and broke remap. Substantial-tail classes: PURE-same-addr 62 fams/1.55M ins · PURE-cross-addr 103/0.10M · IMM 8/0.10M. Free win: 63 families / 0.31M ins have a MATCHED exemplar and siblings that failed earlier sweeps only from the tracker bug → zero-crack banks once the ~40-LOC fix lands (= the validation corpus). Also found: remap() sequential substitution corrupts chained renames → must become single-pass simultaneous. Immediate substitution shrinks to an escalation tier (diff-driven, 3 tiers; probe only ambiguous values). Owner decisions: carried Fable5 queue (5 giants) deferred to END of phase (low priority); milestone = structural completion.

Task checklist (effort per R7 · one commit per completed task, Drew pushes — R6)

  • Task 0 — Bootstrap [xHigh] — this file + harness task list (R28). (completes with this commit)
  • Task 1 — Remap core: extended reloc tracker + single-pass substitution [xHigh] — family_remap.py: hi propagates through add/addu index adds; symbol_map/remap gained backward-compatible to_addr=None (cross-address) + imm_map hook; single-pass simultaneous substitution + self-rename. norm_stream/h_norm UNTOUCHED. Discovery → cookbook §40b (R30) + decision-log (R31). V0 PASS (.run/v0_reloc.py): 22/22 regression (func_80141100 NEW==OLD), 15/15 fix (func_801407F4 vs splat .s, recovers D_80187B88/90/B0), cross-addr symbol_map clean. V1 PASS (.run/v1_regression.py): 160 real h_norm pairs, 96 SAME, 0 lost, differences are strict indexed-reloc improvements. (committed)
  • Task 2 — tools/family_hseq.py + committed manifest [xHigh] — full-frontier survey; shared word-diff classifier added to family_remap.py (stream_words/reloc_indices/reg_fields/classify_member — PURE/IMM/STRUCT, register-drift aware). → .run/family_hseq.json + docs/family-hseq.md. VERIFIED: fleet 74.8/58.2/30.3 (= PhaseEnd_25 & progress.py to the decimal); tail cross-check 663 families / 186 substantial / 1.847M ins (exact); classification vs Plan-agent table PURE-same 62, IMM 8 exact, PURE-cross 114≈103; 890×134/562×134 PURE per-location + 952×113 #addr21 IMM confirmed; full frontier = 581 substantial families / 3.22M templatable ins, 345 matched-sibling PURE/IMM families / 1.14M ins = the V2/V3 zero-crack corpus. (committed)
  • Task 3 — Imm engine (T2a Tier 1) + cross-address delta (T2b) [xHigh] — family_remap.imm_value/imm_map_tier1/remap_hseq: diff-driven Tier-1 value-replace (asm-side ambiguity guard defers ambiguous values; C-literal swap preserving sign/hex-case) + T2b self-rename via the Task-1 to_addr. Tier 2 (probe) DEFERRED — build-if-needed per Task-5 measurement (byte-gate arbitrates; only ~8 low-weight IMM families). VERIFIED (.run/v3_imm.py, match_one reloc-masked): 0 DIFF on every compilable pair — 3 IMM + 2 cross-address MATCH; 4 remap-fails were correctly-deferred asm-ambiguous values; 45 compile-fail(isolation) → whole-TU gate in Task 5. (committed)
  • Task 4 — family_sweep --hseq mode [xHigh] — additive hseq_sweep() (h_norm path byte-untouched): consumes family_hseq.json, templates matched-exemplar members via remap_hseq (cross-address + imm), stages .run/sweep/<ov>/func_<TO_ADDR>.c grouped by (overlay,split), gates via harvest_verify (unique per-group verified-out — fixes a latent multi-split overwrite). Member pre-filter = remap_hseq refusal (STRUCT/unresolved). Static pin guard (__asm__("$N" → skip family; §42e — the ×1-only pinned cracks that cc1-crash sibling TUs). --band/--min-members/--stage-only/--only. VERIFIED: substantial → 29 families, 1507 clean members staged / 267 groups, 1643 correctly skipped as pinned (16/29 families pinned incl. the decision-log-named func_8016DF5C/8013D9B0/80133AB0); h_norm path intact; drafts byte-correct by construction (V3), type-using → whole-TU gate (Task 5). (committed)
  • Task 5 — Zero-crack validation harvest (substantial band) — GO/NO-GO = GO [xHigh] — ran the real byte-gate on the 29 substantial matched-exemplar families. Tooling fix discovered + applied (Task-5's "measure then fix"): remap_hseq.gather_externs carries file-scope externs for body-referenced symbols (extract_unit only grabbed adjacent ones) — the decl class that depressed the first run. Result: 532 members banked (byte-gated); per-family: 3 tracker-miss PURE families (0x8015d5e8/0x8015f118/0x801407f4) bank 100% ×133 = 399 byte-perfect (the free win), 1 cross-addr family 50%; 9 zero-bank families are type-using (Work8016/Prim/…) → §41 reconcile follow-on (Task 8), 16 families pinned → Task 7. VERDICT: the h_seq machinery is 100% correct on clean families — GO. decision-log 2026-07-11 (R31). R22 clean-fleet 136/136 GREEN; metrics 30.3→30.9% distinct (+375 fns) / 58.2→58.5% instr. (committed)
  • Task 6 — Step-A triage of the 119 draftable substantial exemplars [Ultracode] — Workflow (.run/wf_triage_full.js, 119 agents / 0 err / 5.3M tok): per-family m2c draft (+§8 jtbl) → match_one closeness → class + §31/§45 lever + seed (.run/phase26-seeds/). 119 triaged → cheap 29 (325k ins, 23 closeness-0 isolation-MATCH) / permuter 29 (341k) / fable5 61 (1.71M). Curriculum → docs/phase26-triage.md. ⚠ Banking caveat (verified): the 23 closeness-0 seeds gate 0/23 into ov077 — genuine function matches but carry standalone types + Ghidra sigs conflicting with the TU (§41 def-side wall: redefinition of struct Obj / conflicting types); banking needs the Task-8 --reconcile/canon_sig_reconcile pass. (committed)
  • Task 7 — Family-core crack waves (the Fable5 window) [launch at Max — R27; agents model:fable, parallel-isolated, distill-between] — biggest byte-weight first (890/562/536/493…); §45-templated prompts (read .greg/.lreg first; Lever-A merged-accumulator audit; 1-death in-out-asm; /s; gdb-on-cc1, tools/reference/gcc-2.7.2/); PIN-FREE (×134); harvest_verify arbitrates; distill each crack → cookbook §46+ (R30); cheap-Opus applies banked idioms between waves; cheap/permuter lists run in parallel [UC]. ~375k tok/crack guide; documented wall + levers = valid outcome (P9).
  • Task 8 — Mechanical harvest waves [Ultracode; continues post-window] — cracked exemplars → template ×members → gate → bank; h_norm draftable/matched-free retries with the new tracker (5.9 MB bucket); F-jumptable 4 (§8); M-linkwall 1; link-undef second pass. Batched commits; R22 clean-fleet before each commit batch (never while agents need asm/).
  • Task 9 — Mid-band + residue measurement [xHigh] — <80-ins families (0.68M ins) through the engine; measure h_seq-miss → GO/NO-GO fuzzy pass (build only if ROI; else Phase 27).
  • Task 10 — Carried Fable5 queue (END of phase — Drew's call) [Fable5 if window remains, else permuter/Opus + banked levers] — 801670E4 (diff-23), 80178004 (close-7), 801412A8 (close-29), 8016CBC0 (153/209), 8014D820 (LCS-226); specs .run/giants/*.opus.md + .run/t7b/close/. Crack ×134 or wall-document; post-window walls → Phase 27, accepted.
  • Task 11 — Step-D residue map [xHigh] — true singletons (~0.27M ins) + 5 behemoths → Phase-27 input doc. NO execution.
  • Task 12 — PhaseEnd [Max — Tier 1; R27 prompt] — P7 walk, milestone demo, gate 2, PhaseEnd_Phase26.md, worklog → logs/Phase26.md (R19), in-file recap (R25), decision-log current (R31).

▶ CURRENT TASK: PAUSED before Task 8 (Drew). Validation slice done (below). Task-8 PREREQUISITE discovered: wire per-sibling re-reconcile into hseq_sweep (port the h_norm reconcile_remap/M2 path over remap_hseq) — reconcile-class cracks (triage cracks + the 61 Fable5 cores) bank as ov077 exemplars but need per-sibling reconcile to template ×134; plain --hseq gives 0/4. Then: reconcile-bank the 23 triage cracks + Task-5 type-families + mid/tiny. Task 7 = Fable5 window on the 61 cores (needs Max+Fable5 toggle — R27); build the reconcile wiring first so its output can template.

Milestone (gate 2 — structural completion, per Drew)

  1. h_seq engine committed, V0–V3 validated with a measured template success rate.
  2. Every substantial (nins≥80) family banked ×members OR classified with evidence.
  3. Fable5-necessary cores attempted before window close; every crack distilled (R30/R31).
  4. Carried 5-target queue resolved (cracked or wall-documented).
  5. 136/136 byte-identical from clean fleet rebuild (R22); 0 NON_MATCHING (G4).
  6. All three metrics reported + Step-D residue map.

Projections (targets, NOT gates): Task 5 ≈ +5.7% distinct-code; campaign → distinct 30.3%→~55–70%, instr-weighted 58.2%→~75–88%.

Effort/model toggle map (R26/R27 — prompt + WAIT at every boundary)

On approval → /model opus + /effort xHigh (Tasks 0–4; ALL Fable5 via Agent(model:fable)). Task 5/6/8 waves → /effort ultracode. Task 7 launches + between-wave synthesis → /effort max. Task 12 → Max. Non-obvious debugging → Max.

Blockers

(none)

Log

  • 2026-07-11 (session 1, Task-8 validation slice — Drew-approved pre-window de-risk): Ran reconcile→gate→template on the triage cracks. Reconcile→bank WORKS: raw 0/23 (§41 wall) → via canon_sig_reconcile v3.2 4/15 banked into ov077 (func_801506A4/8016A73C/80167540/80155800, byte-identical). Templating a reconciled body ×133 FAILS 0/4 — reconciled bodies are ov077-TU-specific (casts + collision-renames), need per-sibling re-reconcile (§41c). → Task-8 prerequisite: port the h_norm --reconcile M2 path into hseq_sweep. Kept the 4 ov077 banks. decision-log 2026-07-11 (R31). Paused before building the wiring per Drew.
  • 2026-07-11 (session 1, Task 6 — DONE + paused): Ultracode triage Workflow (119 agents, 0 err, 5.3M tok): m2c draft (+§8 jtbl) → match_one closeness → class + lever + seed. cheap 29 (23 closeness-0) / permuter 29 / fable5 61. Curriculum → docs/phase26-triage.md. Attempted to bank the 23 cracked "wins" into ov077 (Drew: "bank the wins but pause before task8") → 0/23 gate — the isolation-MATCHes carry standalone types/Ghidra-sigs that hit the §41 def-side wall in the real TU (redefinition of struct Obj / conflicting types); banking needs the Task-8 --reconcile pass. Seeds preserved in .run/phase26-seeds/ + .run/ov077_bank/. PAUSED before Task 8 per Drew. src pristine, ov077 green.
  • 2026-07-11 (session 1, Task 5 — GO/NO-GO = GO): Ran the real byte-gate on the substantial matched-exemplar band. Discovered + fixed the decl class (remap_hseq.gather_externs carries file-scope externs). 532 members banked, R22 136/136 green, distinct 30.3→30.9% / instr 58.2→58.5%. Per-family: 3 tracker-miss PURE families bank 100% ×133 (399 byte-perfect free win); 9 type-using families → §41 reconcile (Task 8); 16 pinned → Task 7. Machinery byte-proven 100% correct on clean families → GO to scale. decision-log 2026-07-11 (R31). Committed.
  • 2026-07-11 (session 1, Task 4): Added family_sweep --hseq (additive hseq_sweep(), h_norm path byte-untouched): manifest-driven templating via remap_hseq, unique per-group verified-out, static __asm__("$N" pin guard (skips the ×1-only pinned cracks → Task 7). Dry-run (--stage-only): substantial band stages 1507 clean / 267 groups, 1643 correctly skipped as pinned (16/29 families pinned, incl. the decision-log-named ones). Drafts byte-correct by construction; whole-TU gate = Task 5. Committed.
  • 2026-07-11 (session 1, Task 3): Built the T2a imm engine (imm_value/imm_map_tier1/remap_hseq) — diff-driven Tier-1 literal swap with an asm-side ambiguity guard — + wired T2b cross-address self-rename. Tier-2 probe deferred (build-if-needed; byte-gate arbitrates). V3 (.run/v3_imm.py): 0 DIFF on all compilable pairs (5 MATCH), ambiguity guard + cross-address self-rename confirmed; comprehensive whole-TU gate validation is Task 5. Committed.
  • 2026-07-11 (session 1, Task 2): Built tools/family_hseq.py (full-frontier h_seq survey) + the shared word-diff classifier in family_remap.py (PURE/IMM/STRUCT, register-drift aware). Reproduces the fleet metrics + the 663/186/1.85M tail cross-check exactly; classification matches the Plan-agent table; 581 substantial target families / 3.22M templatable ins, 345 matched-sibling families / 1.14M ins = the zero-crack corpus. docs/family-hseq.md committed. Committed.
  • 2026-07-11 (session 1, Task 1): Extended reloc_targets for the add/addu indexed-global idiom (the "reach-1 tail" was largely this tracker blind spot, not unique code — decision-log + cookbook §40b). symbol_map/remap gained backward-compatible to_addr (cross-address T2b) + imm_map hook; sequential→single-pass substitution (fixes the latent chained-rename bug). norm_stream/h_norm untouched. V0 (22/22 regression, 15/15 fix vs splat .s) + V1 (160 pairs, 0 regressions) both green. Committed.
  • 2026-07-11 (session 1, planning): Phase Start (Tier 1, Fable5+Max+plan-mode). Megaplan analyzed; survey reproduced from sigs+src (R14) — fleet metrics match PhaseEnd_25 exactly; 186-not-986 substantial-family correction; #2 family is cross-address; 93 matched-sibling families found (0.51M ins). Tooling recon (Explore) + design pressure-test (Plan agent) → the reloc-tracker blind-spot discovery (addu-preserves-hi; 890×121 family is PURE reloc; 63-fam zero-crack corpus; sequential-substitution latent bug). Drew's gate-1 decisions: carried queue → end of phase; structural milestone. Plan approved; task list built (R28). Task 0 complete with this commit.