Commit Graph

221 Commits

Author SHA1 Message Date
Drew T 808ec6ff7e feat(phase-25): T5b batch-1 COMPLETE — continuation +541 fns (fleet 72.02->72.18%)
- batch-1 cheap tier (83) now 100% drafted: the 29-continuation recovered via
  resumeFromRunId (9 session-cap failures re-run, 20 cached-replay, 0 errors).
- 22/29 -O2 match_one-MATCH; gate banked 8 clean (main 3, _a 2, _after 3) +
  family_sweep +533 siblings across 133 overlays (5 exemplars, ~0 tokens).
- R22 clean-fleet 136/136; dedup-check 1813/0; 0 NON_MATCHING (G4).
- backlog: func_801457A4 (MATCH but -O0-only -> batch-3), func_80135004/8013AD38
  (need the T7 caller-decl reconcile), func_80168828 (close=8, permuter fuel).
- frontier map now 93 exemplars measured (.run/t5_frontier.jsonl).
- docs/gen3-parking-lot.md: captured the Gen3 native-port recomp architecture
  (PsyQ-SDK HLE boundary on Vulkan; recomp-front-end + decomp-incrementally hybrid).
- session totals: fleet 71.36 -> 72.18% (+2820 fns). Cheap tier done; giants next (hold).
2026-07-09 15:47:30 -06:00
Drew T 897939eb46 feat(phase-25): T5b batch-1 (partial) — +1877 fns (fleet 71.47->72.02%)
- T5b measure-wave over the <=149-ins cheap tier (83 targets, generated §12-robust
  t5_scaleup.js, Opus xHigh). Drew stopped at ~50 on HTTP-529 overload; processed the
  54 landed drafts (0 truncated) as T5b.
- 46/54 match_one-MATCH (85%); gate banked 16 clean (main 1, _a 10, _after 5) +
  family_sweep +1861 siblings/1 fail across 133 overlays (14 exemplars, ~0 tokens).
- R22 clean-fleet 136/136 byte-identical; dedup-check 1813/0; 0 NON_MATCHING (G4).
- frontier map now 64 exemplars measured (.run/t5_frontier.jsonl). Def-side loose-typing
  wall confirmed dominant at scale (~30/46 match_one-MATCH gate-rejected -> backlog);
  fleet-wide caller-decl reconcile = the #1 T7 lever. 8 near-miss -> permuter fuel (T5c).
- more T5b batches (29 cheap + 34 giants + 5 _o0) + T5c/T5d -> T6 remain (phase OPEN)
2026-07-08 22:56:01 -06:00
Drew T 938eb7ae06 feat(phase-25): T5 pilot — measure-wave validated, +402 fns (fleet 71.36->71.47%)
- worker_wave (Opus xHigh) over 10 draftable family exemplars: 7/10 match_one-MATCH
  incl. the 369-ins giant func_80166994; whole-binary gate banked 3 clean
  (func_801596F0, func_8014D3E0, func_801320D8) + family_sweep +399 siblings x~N
  (0 failed, ~0 agent tokens) across 133 overlays
- R22 clean-fleet 136/136 byte-identical; dedup-check 1813/0; 0 NON_MATCHING (G4)
- findings (frontier map -> T6): byte-weight != tractability (func_8014D3E0 22x1997
  is a $sp stack-switcher, sibling-ported); dominant gate-failure is the def-side
  loose-typing wall (4/7 -> T7 caller-decl reconcile); family_sweep is same-address
  (cross-address h_norm remainder -> T5c/T7)
- CURRENT_PHASE T5 pilot log
2026-07-08 20:16:31 -06:00
Drew T 5ef2d4d2ab docs(phase-25): T4 CLOSEOUT — v4 retrain FAILED (negative), keep v3; T5 handoff
- A/B gate-true: v4 <= v3 (marginally worse on medium, tie easy/hard) -> discard v4, keep v3 (frozen ceiling)
- 'corpus quality > size' confirmed; 7B is capacity-bound (0/5 even on trained fns, not truncation)
- decision-log (R31): the local-7B tier is off the endgame critical path; engine = frontier-crack -> deterministic-propagate -> byte-gate + permuter
- gen2-mips-matching-model: the A/B + the maxlen-2048 truncation flaw (drop-over-length OR grad-checkpointing, NOT CPU offload) for any future retrain
- CURRENT_PHASE: T4 done/failed; NEXT = T5 (Ultracode measure-wave); phase OPEN, no PhaseEnd
2026-07-08 18:36:50 -06:00
Drew T 99e23dcc91 docs(phase-25): R31 confirmed by Drew (binding) — strategic-pivot capture discipline 2026-07-08 15:23:40 -06:00
Drew T 191e7cef04 docs(phase-25): add docs/decision-log.md (R31) — capture strategic pivot 'why' while fresh
- new append-only STRATEGIC log (complements cookbook=technical, PhaseEnds=build-history): context/belief -> dead-end -> pivot -> why -> hindsight
- substrate for the future retrospective + public 'how to AI-decomp' wiki (Drew, 2026-07-08)
- seeded forward-only with this session's 2 fresh pivots (handoff-misread close/defer; split-TU mechanical ceiling); no backfill from compressed summaries (R30 logic)
- R31 proposed (ratify at PhaseEnd, P10): capture pivot rationale in decision-log while fresh; extends R30 (technical) to strategic/decision
2026-07-08 15:19:11 -06:00
Drew T c62f853710 feat(phase-25): T7.3 — propagate 2 h_exact engine-core stragglers via dedup_propagate (+~200 members)
- func_80128EA8 + func_80132EC4: h_exact-identical fleet-wide but stub in 100 overlays each; family_remap could not extract them (DEFINE_func macro, not an inline def) so they were T7 remap-fails
- dedup_propagate --addr --tier h_exact instantiates the shared engine_core.h macro at each stub sibling, byte-gated (118 overlays byte-identical per fn)
- R22 clean-fleet 136/136 from clean tree; dedup-check 1813/0; fleet 71.32%->71.36%
- remaining edge cases deferred to Phase 26: 2 h_norm-macro remap-fails (8012A568/80138C30, family_remap can't extract macro bodies), 8013C360 (-O0 cluster)
2026-07-08 13:48:05 -06:00
Drew T aa0736a4f8 docs(phase-25): T7.2 log + cookbook §40a — decl-reconcile pass
- CURRENT_PHASE: T7.2 done (1,729 banked, fleet 71.32%, clean-fleet 136/136); resume points to T7.3 + Close; Phase-26 backlog (16 split-TU families, 683 diffs, 127 draftable)
- cookbook §40a: the decl-reconcile pass — (1) --no-preclassify (match_one isolation can't see engine_types.h, false-negatives lifted types; real-TU byte-gate is arbiter), (2) split files are separate TUs → blind lift-all unsafe (Buf cross-TU layout collision, PsyQ MATRIX/VECTOR shadowing), (3) byte-neutral verify per lift
2026-07-08 13:20:36 -06:00
Drew T 903d594728 feat(phase-25): T7.2 decl-reconcile — type-lift + mechanical sweep banks 1,729 (fleet 70.82%->71.32%)
- build_engine_types: --strip 4 base ov077 types + --file _after --exclude Buf (24 types) -> src/shared/engine_types.h; byte-neutral (ov077 stays d19c9580)
- family_sweep --no-preclassify: match_one isolation cannot see engine_types.h (only -Iinclude), so it false-negatives type-lifted families; route remappable exemplars straight to the harvest_verify real-TU byte-gate (the sole arbiter, G3/P9)
- banked 1,729 member-matches (base-type families 532 + _after-type families 1,197), byte-gated per (overlay,split) group across 133 overlays
- R22 clean-fleet verify 136/136 byte-identical from a fully clean tree; dedup-check 1813 validated / 0 failed
- deferred 16 families (~2,128 members) to Phase 26: _a.c PsyQ MATRIX/VECTOR shadowing + cross-TU Buf collision + _o0.c -O0 cluster (need per-type reconciliation, not mechanical)
- tools: family_sweep.py --no-preclassify; build_engine_types.py --file <split.c> / --exclude <names>
2026-07-08 13:18:08 -06:00
Drew T 6280d24c16 docs(phase-25): cookbook §40 — structural-family mechanical symbol-remap (R30 capture)
The mechanical remap method (crack one exemplar -> remap per-overlay symbols to bank the ~133
siblings ~free). Captured now (R30) before the fresh-session handoff. h_norm families are templates
not free dedup; family_remap/family_sweep; plain harvest_verify gate; type-lift for local types;
uppercase func_ hex. Fleet 66.02->70.82% in one deterministic pass.
2026-07-08 11:25:27 -06:00
Drew T c993029f0e feat(phase-25): T7 mechanical family sweep — matched-free harvest; fleet 66.02%->70.82% (+16,512 members)
The proven mechanical remap lever (tools/family_remap) applied at fleet scale by tools/family_sweep:
for each matched ov_SC01_077 fn with unmatched same-address h_norm-siblings, remap its matched C to
each sibling (positional per-overlay symbol substitution) + plain harvest_verify byte-gate. BANKED
16,512 member-matches (+133 validation) across 133 overlays, 0 remap-fail. R22 CLEAN-FLEET verify:
136/136 byte-identical from a fully clean tree (make clean + extract-all + check-all). Fleet
byte-identical 66.02% -> 70.82%. Pre-classify deferred 29 type/decl families (type-lift pass) + 4
diff + 4 remap-fail edge cases -> .run/sweep_deferred.txt.
2026-07-08 11:10:56 -06:00
Drew T 9a4104247d feat(phase-25): T2 — structural-family target manifest (tools/family_manifest.py)
Regroups the unmatched frontier by h_norm: 44,101 families; 2,764 multi-member / 11.1 MB.
Per family: the ov_SC01_077 drafting exemplar + INSTANCE leverage (not h_exact-reach). The
endgame decomposes into 3 levers by ov_SC01_077 membership:
  draftable 127/6.7MB (unmatched member -> draft exemplar, T5/T7)
  matched-free 156/2.3MB (matched member + unmatched siblings -> free --tier h_norm, T3)
  absent 2481/2.1MB (no member -> draft from another overlay)
-> docs/family-manifest.md (digest) + .run/family_manifest.json.
2026-07-08 09:12:55 -06:00
Drew T 41e454ec1f chore(phase-25): T0 — refresh sigs/surveys, regen worklist+backlog, fix sig_image h_norm doc
- housekeeping: deleted stale root gccdump.lreg (gcc default -da RTL dump, dumpbase
  "gccdump"; a one-off RTL-inspection run at root CWD, NOT a committed tool). Practice:
  RTL dumps go to a .run/ CWD or -dumpbase .run/gccdump (R12)
- make sig-overlays (134 sigs); worklist.py --refresh -> build_fuel_manifest + backlog
  render: docs/worklist.md + docs/backlog.md regenerated (stale Jun-26 ranking killed;
  the banked whale func_80144B9C dropped from backlog, P9)
- fix tools/sig_image.py docstring: h_norm is the live norm_stream normalizer, not a
  "T5 placeholder" (R21/R30)
- CURRENT_PHASE.md: Phase-25 plan-of-record + T0 frontier survey (R14): h_norm 2,764
  multi-member families / 11.1 MB; 46% of large solo monsters (3,989/8,670) are family
  members; reach-134 h_exact warm-up = 130 classes / 4.11 MB
2026-07-08 01:02:58 -06:00
Drew T f62cd42c32 feat(phase-24): T7 §G — func_801372B0 banked ×134; ×1→×134 giant endgame COMPLETE; fleet 65.99→66.02%
- func_801372B0 (207 ins, reach-134) propagated ×134: unique-renamed its local SVEC/GLINE
  -> Svec_801372B0/Gline_801372B0 (a DIFFERENT same-named SVEC/u16 lives in _after.c, so a
  bare-name lift would double-define fleet-wide) + lifted to engine_types.h; ov_SC01_077
  byte-neutral (d19c9580); dedup_propagate --recover -> 134 byte-identical, E_func_801372B0.
- Clean fleet check-all 136/136 (R22), dedup-check 1812->1813/0, fleet 65.99->66.02%.
- Completeness scan (R14): NO matched giant remains ×1. Only small reach-134 ×1 fns left
  (3 now-propagatable stragglers + 17 local-type-blocked) = the T8 tail.
- The giant endgame is fully banked ×134 (whale + 6 §G cracks + func_801770E0 + func_801372B0);
  the 2 remaining reach-134 giants are permanent walls (func_80178004, func_801412A8 — G4).
- cookbook §39: native-DEFINE-path for -O2 giants (whale shared-header is -O0-only) · the
  overlay_files post-whale-split gap · find_site extern-comment class · unique-rename
  typedef-lift · R14 handoff-staleness.
2026-07-07 23:39:27 -06:00
Drew T 8cfbbf2d47 feat(phase-24): T7 whale func_80144B9C banked ×134 (-O0 reach-134 rollout) — clean fleet 136/136
The single biggest byte-weight lever (770 ins ×134 ~ +1.6% byte-weight), banked across all 134
overlays as -O0 compiled C (was ×1 in ov_SC01_077, commit:0463).

- ROLLOUT (tools/rollout_whale_o0.py): per single-file overlay, LINE-split <ov>.c at the whale
  (splat emits in vram order), carve the yaml code subseg into before/<ov>_o0b(-O0)/<ov>_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). Makefile WHALE_O0B_OBJS wildcard -O0.
- 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).
- MILESTONE: clean fleet check-all 136/136 (R22); dedup-check 1811/0; FLEET REAL 225816->225949,
  byte-identical 65.91->65.95% function-count (the gain is byte-weighted). Validated on ov_SC01_000
  + spot-checks SC02/SC03/SC07 before the full fleet.
- cookbook §38 + SETUP inventory.
2026-07-07 22:23:10 -06:00
Drew T 3b0cc190b2 feat(phase-24): T7 whale func_80144B9C CRACKED + banked ×1 (-O0 struct-assign) + ×134 infra
- CRACK (cheap Opus, no Fable5/calls.c): the 770-ins reach-134 whale's 2-insn residual was a
  STRUCT ASSIGN `D_80078E50 = *ent;` (sizeof(ENT)==0x24), NOT an explicit memcpy() call — gcc-2.7.2
  -O0 expands a >MOVE_RATIO-word struct copy via emit_block_move->emit_library_call(memcpy),
  precomputing dst/src into pseudos then addu into $a0/$a1 = the exact 2 missing moves.
- -O0 SPLIT: 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; address-sorted
  line-split preserves all banked C). ov_SC01_077 == d19c9580.
- memcpy: memcpy=0x8005C324 in symbols.resident.txt (overlays+resident only; main untouched vs its
  MEMCPY.o) + __asm__("memcpy") on the engine_core.h block-copy macro (non-builtin C name -> no
  built-in codegen, same call).
- MILESTONE: CLEAN fleet check-all 136/136 byte-identical (R22), dedup 1810/0. reach-134 -> ×134 (W9) next.
2026-07-07 22:01:58 -06:00
Drew T c106774776 feat(phase-24): T7 §G — 6/8 giants cracked, 4 ×134; fleet 65.75→65.91%
- MATCHED 6 reach-134 giants: func_801571C4 (permuter), func_8014EA4C/801372B0/
  801770E0/80176D94/80148094 (Fable5, sequential idiom-banking chain)
- 2 genuine walls stay INCLUDE_ASM (G4): func_80178004 (close=7), func_801412A8 (close=29)
- propagated x134: func_801571C4/8014EA4C/80176D94/80148094 (134 overlays byte-identical;
  dedup 1810 groups/0 failed; genuinely-clean make-clean+extract-all+check-all = 136/136)
- func_801372B0/801770E0 banked x1 (x134 follow-up: pin/asm + local-type self-containment gaps)
- tools: p16_permute.py comment-fix (unblocked the permuter fleet-wide) + permuter_ils.py (warm-restart ILS)
- knowledge: cookbook §37 + docs/gcc-2.7.2-map/t7g-giant-harvest.md
2026-07-07 20:20:43 -06:00
Drew T 8ba3b82307 feat(phase-24): T7 — 3 Fable5-cracked giants ×134 (func_801392FC/8013A530/8013AF20); fleet 65.64->65.75%
- func_801392FC (182, close=2->MATCH): CROSS-BB COMBINE LAW (a backedge-crossing count is a variable,
  not a foldable (s16)load; reorg steals the sll into the delay slot) + VOLATILE-FRAME-PARITY (volatile
  count-load avoids the cse-common -> combine keep-load -> stale-allocno reload slot). cookbook §36.
- func_8013A530 (204, close=10->MATCH): the RC-6 'reload knot' WAS the pins; the $0-ADD OPAQUE COPY
  (iVar7 = fc + zr, zr=$0) assembles to addu $v1,$a1,$zero but doesn't reserve the reg + 3 zero-byte
  levers. regalloc.md RC-12/RC-13, §36.
- func_8013AF20 (185, close=15->MATCH): the 'impossible' const-hoist order was libgpu addPrim's 24-bit
  BITFIELD store (store_fixed_bit_field emits 0x00ffffff first) + delete the inherited barrier; P_TAG
  lifted to engine_types.h (byte-neutral). loop.md, RC-7, §36.
- banked via the §35 recipe (fix_arity_callers --any-proto -> sig_unify -> harvest_verify ->
  dedup_propagate --recover). clean fleet check-all 136/136, dedup 1806/0, 0 NON_MATCHING.
- SESSION: 7 giants ×134 total (1 R14-free, 2 Opus-solo, 4 Opus->Fable5); fleet 65.48 -> 65.75%.
  gcc-2.7.2 reference tree extended (expmed.c/mips.md/... added). Giant queue (§G) stored for next session.
2026-07-04 04:14:43 -06:00
Drew T f38bded1d6 docs(phase-24): T7 harvest — §35 (ranking law + banking recipe + loop idioms); 3 residuals -> backlog
- cookbook §35: the region-a sibling-giant harvest. RANKING LAW (difficulty = global-array
  hoisting, NOT $s-reg count — param/buffer giants one-shot Opus even at all-8-$s); the ×134
  banking recipe (fix_arity_callers --any-proto -> sig_unify -> strip/anonymize local typedefs ->
  harvest_verify -> dedup_propagate; skip cast_call_sites on no-proto); new loop idioms
  (dest-off-base giv, index-form source, sltiu/slti-without-CSE, div2 range-extension).
- 3 deferred residuals logged to docs/backlog.md (Fable5 batch fuel): func_801392FC close=2,
  func_8013A530 close=10, func_8013AF20 close=15 — each single-class, ×134, seed in .run/t7/.
- CURRENT_PHASE: T7 harvest complete (4 giants ×134 banked, 3 deferred); next decision = Fable5 batch.
2026-07-04 00:40:45 -06:00
Drew T 6802997180 feat(phase-24): T7 — 2 more giants ×134 (func_8012D098 + func_8012EC04, one-shot Opus); fleet 65.56→65.64%
- func_8012D098 (189 ins, ALL 8 $s regs) + func_8012EC04 (178, sibling+GTE-tail): both MATCHED by
  Opus alone applying §32/§34 — NO Fable5. Finding: the '3 hardest 8-$s-reg giants' were mis-ranked;
  their $s pressure is param/buffer-derived, not global-array hoists -> Opus one-shots them.
- banking recipe (per-giant integration is mechanical, §30a): fix_arity_callers --any-proto
  (no-proto the conflicting caller extern vs the matched def-sig) -> sig_unify (callee proto) ->
  strip draft-local typedefs already in engine_types.h + anonymize named locals -> harvest_verify
  ×1 -> dedup_propagate --recover ×134. (skip cast_call_sites — it mis-casts no-proto void f().)
  clean fleet check-all 136/136, dedup +2 groups/0 failed, 0 NON_MATCHING.
2026-07-03 23:50:05 -06:00
Drew T 994368fbcd feat(phase-24): T7b/T5 — 2nd giant func_80138ED0 MATCHED + banked ×134; fleet 65.52→65.56%; §34 idioms
- func_80138ED0 (159 ins, reach-134): Opus applying §32 -> close=21 (all semantics/control-flow/
  constants exact, +the giv-init fence lever) -> Fable5Max reading the vanilla gcc-2.7.2 source ->
  MATCH (every regalloc/sched class C-reachable, no permuter).
- banked via the standard pipeline (validates it on a real un-reconciled sibling): cast_call_sites
  reconciled func_8013914C (u8*,u16*)->(s32,s32)+cast; reconcile_decls a NO-OP (2 data bases
  giant-local -> no fleet conflict, confirms no false-positive); harvest_verify ×1 d19c9580 ->
  dedup_propagate --recover ×134 (pins/asm body propagates fine). clean fleet check-all 136/136,
  dedup 1800->1801/0, 0 NON_MATCHING.
- NEW §31 idioms (cookbook §34 + regalloc.md RC-11 + loop.md): gcc-2.7.2's 3-qty local-alloc SORT
  BUG (local-alloc.c:1441 — <=3 qtys allocate in creation not density order; decoy-qty fix) + the
  zero-byte asm allocation toolkit (input-only/multi-input/def+use dummies) + the giv-init fence +
  gdb-on-cc1. gcc-2.7.2 reference tree completed (18 .c); SETUP §5.6.
- T5 satisfied: reconcile_decls proven on 2 real giants (func_80129CF8 reconcile-path byte-proof +
  func_80138ED0 no-op/full-pipeline). CURRENT_PHASE T5 logged.
2026-07-03 21:09:38 -06:00
Drew T 787b756e6d docs(phase-24): T7b — distill reconcile_decls (cookbook §33, SETUP, design-doc RESOLVED); R14-correct §32 wall
- cookbook §33: the reconcile_decls mechanism (oracle + byte-neutral cast taxonomy + pipeline
  placement + the func_80129CF8 byte-proof); §32 'BANKING WALL' note R14-corrected (×134 was free,
  the wall was only the ×1 loose-draft reconcile).
- SETUP.md: reconcile_decls tool-inventory row.
- canonical-decl-reconcile-design.md: ✅ RESOLVED banner — the premise reframe (automation not
  unlock), the answered open questions, T4 no-op, the validation.
- CURRENT_PHASE: T7b/T2+T3 progress-log entry; NEXT = T5 sibling (func_80138ED0) via Fable5Max.
2026-07-03 17:59:19 -06:00
Drew T eb53ae988e feat(phase-24): T7b/T1 — func_80129CF8 ×134 (the "×134 wall" was an R14 misdiagnosis); fleet 65.48→65.52%
- R14: diagnosed the prior "×134 BLOCKED / all overlays excluded" by RUNNING it — refuted.
  func_80129CF8's ×1 bank was already fleet-canonical; dedup_propagate --recover propagates it
  to all 134 overlays byte-identical (no new tool needed). The "wall" was a stale-asm /
  incremental-tree artifact (the T5c/T6-§A trap).
- banked ×134 via existing dedup_propagate --recover; clean fleet check-all 136/136,
  fleet 64.90→65.52%, dedup 1799→1800/0, 0 NON_MATCHING (G4).
- T7b reframed: the reconcile tool automates the manual decl-reconcile for FRESHLY-matched
  giant drafts (the 6 sibling giants + wave tail), not an 'unlock' of already-reconciled giants.
- CURRENT_PHASE: T1 done + the R14 finding logged; plan plan-…mossy-dawn.md (T1-T6).
2026-07-03 17:44:29 -06:00
Drew T 8b48f482f9 feat(phase-24): T7 — Fable5 cracks giant func_80129CF8 + §32 idiom; banked ×1 (×134 needs the canonical-decl tool)
- Fable5Max cracked func_80129CF8 (191-ins region-a camera giant; match_one MATCH, 0-off): struct-base
  hoisting via SOURCE-LOCAL pointers (gcc-2.7.2 has no cross-bb CSE → a callee-saved base can only come
  from a local, NO pins), branch-polarity-off-the-opcode, S12 reused-temp fence, expand_block_move
  struct-assignment for the grouped copy, dead-local-aggregate for the frame. Distilled → cookbook §32.
- banked ×1 in ov_SC01_077_a.c (d19c9580; clean fleet 136/136) after reconciling its loose-typed decls
  (u8[]/s32[]/struct BigCopy/s8-vs-u8; func_80012F74 s16-vs-s32) to canonical + byte-neutral access casts;
  RView (GsRVIEW2-shaped 32B) lifted to engine_types.h.
- FINDING (byte-proven): ×134 propagation is BLOCKED by the fleet-wide loose-typing wall — the giant's
  shared callees/data are declared incompatibly across overlays, so the macro's externs conflict per
  overlay (dedup_propagate --recover only fixes the propagated fn's CALLER extern, not its callee/data).
  Unlike the flagship func_80132784 (compatible → ×134), loose-typed giants bank ×1, not ×134.
- Drew's call (A, invest): build the fleet-wide canonical-decl reconcile tool = the ×134 giant unlock.
  Spec + conflict taxonomy + byte-neutral cast patterns: docs/canonical-decl-reconcile-design.md.
- clean fleet check-all 136/136 BYTE-IDENTICAL (R22). No new governance rules.
2026-07-03 16:40:04 -06:00
Drew T 99ccc37480 feat(phase-24): T6.4 — find_site trailing-comment externs → func_8014E048 + func_80157580 ×134
- find_site extern-collection: allow a trailing `/* comment */` after the `;`. The
  comment-blind regex `^\s*extern\b.*;\s*$` stopped the backward scan at
  `extern u8 D_801152A8[];   /* canonical TU type */`, dropping every EARLIER extern →
  compiles_standalone failed on the now-undeclared callees/data (func_80135A4C,
  func_80133784, D_801152A8). R14: THIS — not "pin/asm" as the backlog framed it — was
  func_8014E048's real self-containment blocker.
- propagated func_8014E048 (the T5b S11 pins+barrier crack) + func_80157580 ×134;
  dedup 1797→1799 groups (0 failed). CLEAN fleet check-all 136/136 BYTE-IDENTICAL (R22).
  Fleet byte-identical 65.40% → 65.48%.
2026-07-03 15:17:50 -06:00
Drew T 5b3697553f feat(phase-24): T6 — 13 leaf-MATCH fns propagated ×134 (fleet 64.90→65.40%)
find_site + dedup_propagate --recover + build_engine_types fixes, then re-bank
the 13 recover_integration leaf-MATCHes and propagate each across all 134 overlays.

- find_site: match INDENTED inline defs (was column-0 only, silently dropping every
  recover_integration-banked def from propagation — T6 blocker 1). Unit-tested:
  indented defs match; indented call-exprs (if/assign/bare/return) correctly rejected.
- dedup_propagate --recover: on a straggler byte-gate failure, FIRST no-proto that
  overlay's conflicting caller extern + re-gate (Part B, byte-neutral, same lever as
  fix_arity_callers --any-proto); else EXCLUDE only that overlay (Part A, ×N-1) rather
  than the historical all-or-nothing drop. Wired into gate_stage.
- build_engine_types: comment-aware find_defs/find_typedefs (blank_comments). The
  generated header's own "...typedef lift" comment was captured as a bogus `typedef
  vec`, self-colliding and blocking every --strip. NOTE: full --strip still conflicts
  with the _a/_o0 split files, so split-file overlays need a TARGETED lift.
- banked + propagated 13 fns ×134: func_8014F74C 801542A4 8015BE94 8015F380 80160F00
  801653B8 80166244 8016E778 801732C4 8017331C 80173374 80174554 801745AC.
  func_8014F74C needed PosT/MoveT lifted to engine_types.h (targeted, byte-neutral).
- dedup 1784→1797 groups (0 failed). CLEAN fleet check-all 136/136 BYTE-IDENTICAL (R22:
  make clean && extract-all && check-all). Fleet REAL 224073, byte-identical 65.40%.

R14: the confounding stale-asm/ tree (13 missing .s) that masked the first --recover
test is fixed by re-extract; the 3 pre-existing --auto-from stragglers (0x80174650/
8012A018/80165CA0) are pin/asm + uncaptured-local-macro (SHB) bodies, correctly dropped.
2026-07-03 15:00:46 -06:00
Drew T 0cda15c6de fix(phase-24): T5c — restore main's clean-rebuild: propagate the Phase-21 PsyQ renames to 62 stub refs
Pre-existing latent breakage (Phase-21 close commit:0292, "+62 PsyQ names"), found during T5b's
R22 fleet verify. A genuinely-clean `make clean` + re-extract + build of `main` failed with
dozens of `can't open asm/nonmatchings/800c3/func_*.s` — clean-rebuild broken since Phase 21,
masked all along by incremental builds reusing stale pre-rename .s/.o (the exact R22 failure mode).

- Root cause (byte-proven): Phase-21 xdedup renamed 62 PsyQ library functions to their proper
  names (InitHeap, FlushCache, GetTPage, SysEnqIntRP, SpuWrite, CdMix, __main …) in
  symbols.us.txt, but never regenerated/renamed the committed src/*.c stub refs that call them by
  the OLD func_<ADDR> name. splat's FRESH regeneration of a stub .c uses the CURATED names (move
  src/800c3.c aside -> splat writes INCLUDE_ASM(InitHeap) + emits InitHeap.s); the committed stubs
  were simply stale.
- Fix: rename all 62 INCLUDE_ASM(func_<ADDR>) -> the curated name across 12 files (800c.c 1,
  800c3.c 22, apicard1/2/4 4/6/2, boot.c 1, libcd1.c 8, libetc.c 6, libgpu.c 3, sgap.c 1,
  snd1.c 7, snd2.c 1). Pure rename to match splat's canonical output; byte-neutral.
- VERIFIED: main clean-builds 143dbb89 from a fully clean tree; full clean fleet check-all 136/136.
- Lesson (cookbook): a symbols.us.txt rename must be propagated to (a) shared-macro bodies
  (engine_core.h — the T5b GetTPage fix) AND (b) INCLUDE_ASM stub refs (this), AND verified by a
  genuinely-clean check-all (make clean + full re-extract), never incremental. Added a lint check.
2026-07-03 02:50:03 -06:00
Drew T 6c2fb9f04f fix+feat(phase-24): T5b — S11 CRACKED (func_8014E048 banked) + fleet GetTPage linkage fix
Both concerns byte-verified from a fully-clean tree (ov_SC01_077 d19c9580, ov_SC07_009 2a6499b6
+ 133 overlays). Fleet is 135/136 — the 1 remaining failure is `main`, a SEPARATE pre-existing
Phase-21 breakage (62 dangling INCLUDE_ASM refs, tracked in CURRENT_PHASE, fix in progress),
NOT introduced by this commit.

[FIX (partial) — pre-existing Phase-21 latent breakage, found during T5b's fleet verify]
- A genuinely-clean `make check-all` failed 135/136 (overlays: `undefined reference to func_80058B40`;
  main: dozens of `can't open asm/nonmatchings/800c3/func_*.s`). This commit fixes the OVERLAY side.
- Root cause: Phase-21 xdedup renamed func_80058B40 -> GetTPage in symbols.us.txt (one of the
  +62 PsyQ names) but did NOT update the two shared engine_core.h macros that CALL it
  (DEFINE_func_80139680, DEFINE_func_8012E28C — in all 134 overlays + ov_SC01_077_a). Since
  Phase 21 a clean rebuild couldn't link; incremental builds reused stale .o's and masked it
  (the R22 failure mode) — every "check-all 136/136" Phase 21->23 was incrementally-stale.
- Scope = exactly 1 symbol (static scan of all func_/D_ refs in the shared headers vs symbols).
- Fix: rename the 4 occurrences -> GetTPage (byte-neutral, same addr 0x80058b40 -> identical jal;
  G6 curated-name). ov_SC07_009 link-fail -> byte-identical 2a6499b6.
- Lesson: a symbols.us.txt rename must be propagated to shared-macro bodies AND verified by a
  genuinely clean (make clean + full re-extract) check-all, never incremental.

[FEAT — T5b: the S11 class crack, Fable5 spike]
- The S11 LUID(x)alloc "intrinsic" verdict was MAP-INCOMPLETENESS. func_8014E048 (143 ins,
  reach-134; "not source-steerable" since the map wave; 28-off even after T5's directed permuter)
  -> MATCH (143/143) -> whole-binary BANKED (ov_SC01_077 d19c9580). Derived by reading gcc-2.7.2
  source + RTL dumps (12 experiments .run/gccmap/exp/e1a..e1k.c).
- NEW LEVERS (byte-proven): S12 reused-s32-temp fence (u16 temps DON'T work — combine folds the
  unpromoted-HI zext temps away); S13 head-skip escape (body-local param copies conflict-steer the
  scratch contest; volatile-asm dead-read wedge fence; multi-input dead-read K2 rebalance);
  cse-opaque asm-copy; RC-4b pinned store-temp; RC-10 preference-cascade mechanics.
- Integration reconciles (both T6 classes): engine_core.h caller decl s16*->u16* (codegen-neutral)
  + canonical data decls w/ *(u16*) casts (D_801152A8 u8[] / D_801152AC s16). x134 lift blocked by
  dedup_propagate self-containment (pins/asm) -> T6 target (joins func_80132784).
- Distilled (R30/R16): sched.md §6 (S12/S13) + regalloc.md §F (RC-10 + RC-6/S11 downgrade) +
  cookbook §31 triage update; backlog re-logged (capped); memory updated.
2026-07-03 02:02:26 -06:00
Drew T 0eadf313ee feat(phase-24): T5 — §31-directed permuter mutation + grinder input-changed gating
- tools/permuter_weights.py (NEW): classify(klass,where) -> regalloc|schedule|cse|None
  + render_settings_toml emitting the [weight_overrides] table decomp-permuter merges over
  the gcc defaults (main.py:336 / helpers.py per-key replace). Biases pass-selection toward
  each class's §31 levers (perm_reorder_decls RC-1/3, perm_reorder_stmts RC-2/S1,
  perm_temp_for_expr S2, perm_commutative cse); value/type noise -> ~0.1. NO submodule edit.
- p16_permute.setup(..., klass=, where=) writes it (+--klass, backlog auto-lookup);
  grinder.py auto-threads klass/where_stuck. klass=None -> gcc defaults (undirected superset).
- grinder fix (R14): replace the blind tried.clear() idle churn with input-changed gating
  (draft_sig=(best_draft mtime, closeness) — re-open a fn only when the worker improved it).
- VALIDATED: regalloc profile drove func_8014E048 masked 36->29 (match_one -drz 35->28) where
  the undirected search stalled; re-logged (28, improved draft promoted). Flagship S11/RC-6
  count-exact seeds improve but do not gate (intrinsic, §31 "two probes dont grind") -> T5b fuel.
- distill: cookbook §3b + SETUP inventory (R16/R30). No build-input changed -> 136/136 untouched.
2026-07-03 00:14:29 -06:00
Drew T b2b1d0eeae chore(phase-24): T4 close — flagship banked x1, count-exact seeds -> T5, xN -> T6
- func_80132784 (400 ins) banked x1 via the T2+T3 permuter (commit commit:0438); xN
  propagation capped by per-overlay declaration plumbing (ov_SC02_005 straggler +
  extern/type mismatch) -> logged as a T6 integration-recovery target
- count-exact seeds (E048/76D94/48094/412A8) parse+compile+search clean but need
  T5 directed mutation (intrinsic RC-6/S11 residuals) / T5b Fable5
- regenerated digests; dedup-check 1783 validated/0 failed; fleet 64.86%; P6 rules check done
2026-07-02 23:44:38 -06:00
Drew T 5984749421 feat(phase-24): T2 — floor-free relocation-masked permuter scorer (-drz)
- tools/masked_diff.py: shared objdump -drz masking oracle (jal/j 26-bit + HI16/LO16
  immediate mask; -z keeps nop runs -> no GTE under-count). object-vs-object (permuter,
  +reloc-operand equality) and object-vs-.s (match_one) modes.
- match_one.py refactored onto masked_diff (-dr -> -drz); regression-clean on count-exact
  seeds (35/52/72/110, leaf-MATCHes), output format unchanged (gate_stage/grinder compatible)
- tools/masked_scorer.py MaskedScorer: drop-in for decomp-permuter's Scorer; scores masked
  .text closeness (bottoms out at 0) not the stock mnemonic-diff floor
- tools/permuter/run_masked.py: rebinds src.main.Scorer -> MaskedScorer (NO submodule edit,
  R3/R20); p16_permute.run_permuter wired to it
- VALIDATED: masked_self=0; masked_cand~match_one; STOCK floor 1750-2100 vs masked 36-77
  (the wander cause); live permuter base score = masked 77 (not stock 1930), descends to 74
- R14 SELF-CORRECTION: -drz confirms func_80132784 is 4/400 count-exact (T1's -dr 204 was a
  16-nop-collapse artifact); backlog re-logged close 4. The flagship IS 4 ins away.
- no build-input changed (136/136 untouched); 2 compile FAILs surfaced -> T3 (GTE asm, typedefs)
2026-07-02 23:10:54 -06:00
Drew T 394e3a81b3 chore(phase-24): T1 — re-log map-wave seeds (byte-verified) + backlog/gate_stage hygiene
- re-logged 7 map-wave seeds in .run/backlog.jsonl with match_one-verified
  closeness (dropped 19 stale/unreproducible records, .bak kept):
  func_8014E048=35 (was mis-logged 'failed'), func_80176D94=52,
  func_80148094=72 (best draft vG2, not the named file), func_801412A8=110;
  T6 leaf-MATCHes func_8014F4C0/func_80155800=0; best_draft -> .run/backlog_drafts/
- R14 FINDING: the 'func_80132784 is 4/400' premise is NOT reproducible from any
  on-disk draft (best=204-off, wrong instr count 384!=400 -- match_one -dr collapses
  ~16 nops on this GTE seed); true closeness pends T2's -drz scorer -> T4 reframed
- gate_stage.py: fixed the stale 'sig_unify SKIPPED with --src-file' doc-drift
  (code runs it; sig_unify.py:151 has --src-file support)
- wave_targets --class REGALLOC + grinder now surface the 4 count-exact permuter
  seeds with true closeness; no build-input changed (136/136 invariant untouched)
- added T5b (Fable5 S11/RC-6 map-extension spike) per Drew
2026-07-02 22:55:05 -06:00
Drew T 80b89d8a2d feat(phase-23): LLM matching tier + the Fable5 wall-breaker + the gcc-2.7.2 codegen map (v1.22.0)
- LLM TIER (T1-T10.9): tools/serve_local + api_draft + lora_grind + bulk_harvest + the LoRA
  pipeline (v3 model). Local v3 saturated <=15 (~1300 banks, $0). Frontier GLM-5.2 (~$4)
  confirmed the def-side wall INTRINSIC + the idiom well DRY at the leaf (both angles).
- THE PIVOT (07-02): Fable5Max reading the gcc-2.7.2 SOURCE matched func_8014EE14, a §20/§10
  store-vs-load giant "CONFIRMED unsteerable" for 22 phases -> the "wall is intrinsic" verdict
  is MODEL-RELATIVE. Generalized to Opus agents applying §30 (2 more giants, 3-5x cheaper).
- §31 THE CODEGEN MAP: 4 Fable5 agents read the whole gcc-2.7.2 source -> docs/gcc-2.7.2-map/
  {sched,regalloc,loop,cse_expr}.md (935 lines, byte-proven residual->lever catalogs) +
  cookbook §31 (index+triage). Broke hoist-vs-remat/delay-slot/coalescing walls. Correction:
  gcc-papermario is 2.8.1 not 2.7.2 -> tools/reference/gcc-2.7.2/ (SETUP §5.6).
- THE WAVE (8 reach-134 near-misses, Opus + §31): 3 leaf-MATCH by lookup (47-137k tok vs
  200-250k walls) + 5 tight permuter seeds (func_80132784 240->4-off!), zero dead-ends.
- 5 giants/hard-fns banked x134 (func_8014EE14/F2E0/150528/149374/144090); fleet 63.66->64.86%,
  136/136 byte-identical, 0 NON_MATCHING. cookbook §30/§30a/§31. No new governance rules.
- FINDING: matching is SOLVED by the map; bottlenecks are now the permuter (S11 seeds) +
  whole-binary integration (auto-bank leaf-MATCHes) -> Phase 24. worklog -> logs/Phase23.md.
2026-07-02 21:51:25 -06:00
Drew T 3b6f2c5f94 docs(phase-23): §31 — the gcc-2.7.2 codegen map (4 Fable5 agents read the source)
- docs/gcc-2.7.2-map/{sched,regalloc,loop,cse_expr}.md: source-cited, byte-proven
  pass -> residual -> C-lever catalogs (935 lines). cookbook §31 = the index + triage.
- WALLS BROKEN (byte-proven steerable, were "CONFIRMED unsteerable"): §10/§20
  hoist-vs-remat (cross-call address-caching), store-vs-load (/s), dbr delay-slot
  (D1+S2 fresh-local: func_801770E0 53->49), birthing-boost both directions.
  Incidental bank: func_80149374 x134 (fleet 64.86%).
- GENUINE walls -> permuter: S3 chain-priority sink, S11 LUID(x)alloc coupling,
  RC-6 pressure-lock, cse 1000-insn table flush.
- CORRECTION (loop agent): tools/reference/gcc-papermario is gcc 2.8.1 NOT 2.7.2
  (behavioral biv-elim diff). Vanilla gcc-2.7.2 -> tools/reference/gcc-2.7.2/
  (gitignored); SETUP §5.6 + §31 flag it. All banked levers stand (match_one-validated
  vs the real cc1). Also corrected: spill-slot = declaration order; §25 4th rank rule.
- the payoff: the cheap tier (Opus agents + local model) can now apply compiler-internal
  levers by triage-table lookup, without reading 80k lines of source.
2026-07-02 20:12:19 -06:00
Drew T e74dd52b19 docs(phase-23): cookbook §30a — §30 generalizes via Opus agents + 2 new levers (IV-combine, inline-limit) + mechanical macro-widen integration 2026-07-02 17:34:53 -06:00
Drew T 6678c6868a feat(phase-23): Fable5Max cracks §20 "unsteerable" giant func_8014EE14 ×134
- Fable5Max agent (Agent model=fable) matched a 248-ins reach-134 GIANT on the
  §20/§10 store-vs-load wall (22 phases "CONFIRMED unsteerable") by reading the
  gcc-2.7.2 source (tools/reference/gcc-papermario) + RTL -da dumps. Leaf
  MATCH(248 ins) -> whole-binary banked:1 -> dedup_propagate ×134. Verified:
  check-all 136/136 byte-identical, dedup-check 1780 validated/0 failed.
- 3 byte-proven idioms -> cookbook §30 (corrects §29's "not a bigger model"):
  (1) store-vs-load is a deterministic MEM_IN_STRUCT_P /s aliasing flag, not a
      scheduler tie-break; steer via ((struct{s32 f;}*)p)->f (anon struct keeps
      /s AND propagates ×134) to grant, *p to deny
  (2) def-side return-type wall has a MACRO escape: widen a discarding caller
      macro's extern void->s32 (byte-neutral, check-all-verified) -- extends §29
  (3) birthing-boost prologue-order lever: __asm__("":"=r"(x):"0"(x)) re-tie in a
      later bb kills sched.c's REG_N_SETS==1 priority boost
- tools/glm_parallel.sh: K concurrent OpenRouter/GLM cloud drafters (parallel
  api_draft), key read from .env at runtime
- §10/§20 "store-vs-load unsteerable" backlog now re-test candidates:
  func_8014F2E0, func_80150528, func_8014EA4C
2026-07-02 16:56:56 -06:00
Drew T 6127367017 docs(phase-23): T10.7 conclusion — def-side wall intrinsic (GLM 1/7); GLM = drafter+teacher not wall-breaker
- cookbook §29: reasoning-model reconciliation idioms (match-pointer-type-to-TU-decl, call-site cast
  for value mismatch, cast-a-callee-definition, data-type match) + the narrow-param hard limit
- gen2-mips-matching-model.md + CURRENT_PHASE: Option-3 verdict (GLM reasons the wall expertly but
  banks 1/7; wall INTRINSIC, Fable5 §3c triple-confirmed); GLM role = $0.03-0.08/fn hard-band drafter
  + idiom teacher; real lever past the wall = public flip, not a bigger model
2026-07-01 21:05:18 -06:00
Drew T bce95a13cd docs(phase-23): T10.7 GLM5.2 A/B result — 10x codegen edge, but def-side wall caps banks (3/18)
- GLM5.2 vs v3 on 18 hard-band fns: 10/18 vs 1/18 match_one; 3/18 vs ~1/18 whole-binary bank
- def-side loose-typing wall (Phase 16/20) caps banking for ANY drafter (Fable5 review §3c: HOLDS)
- 6 hardest beyond GLM too (0/6 at MAXTOK=16000); ~$1.02 of $25 spent
- 3 strategic options handed to Drew (direct-drafter / flywheel / wall-reconciliation)
2026-07-01 20:01:14 -06:00
Drew T 2d0d63953e docs(phase-23): Fable5 strategy review — scope-vs-reality scorecard, wall re-tests, resource map
- scorecard: original 2026-06-10 scope vs 22 phases of byte-verified reality (what held,
  what emerged beyond scope, what deviated and should be revisited)
- adversarial pass: P21 no-shortcut + giant scheduler walls HOLD; P16 loose-typing wall has
  a TIMESTAMP GAP (declared 06-19, pre-dating cast_call_sites/block-scope-externs/v3) -> re-test
- July-2026 resources: frontier-on-hard-band (T10.7 re-aim), continuous architect-tier judgment,
  RE-ELEVATE THE PUBLIC FLIP (community labor = the only lever that scales into the proven tail)
- strategic fork: posture A/B/C on the byte-match goal; recommends dual-metric (B), Drew's call
- ranked recs 1-6 + explicit endorsements of what not to change
2026-07-01 17:25:47 -06:00
Drew T 70aaad4efb chore(phase-23): regenerate backlog + fleet digests (≤15 campaign end, fleet 64.6%) 2026-07-01 14:20:12 -06:00
Drew T 8dc42f12b5 docs(gen3): parking-lot for asset export/Unity + verified mesh-state survey
- docs/gen3-parking-lot.md (NEW): town mesh/texture + Musashi->Unity export ideas, PARKED (Gen3).
  Verified survey (read-only, 2026-07-01): BFM uses the libgs TMD model path — real jal
  GsMapModelingData + GsLinkObject5 call sites (EXE 0x8001C2xx-0x8001C9xx model subsystem +
  ov_SC02_005); render = stock libgpu; no libgs sort/anim calls (custom anim -> Musashi harder);
  textures via VRAM rip + type-0 'graphics' blobs; no exporter tooling yet. Decisive next probes listed.
- CURRENT_PHASE.md: T10 done + T10.6 campaign in-flight + T10.7 OpenRouter-next notes (crash-recovery)
2026-07-01 00:52:23 -06:00
Drew T 265e930f65 chore(phase-23): regenerate backlog + fleet digests (T10 banks) 2026-06-30 23:23:04 -06:00
Drew T e9f199530e docs(phase-23): T10 harvester built + measured — 65% bank-rate, parallel gate ~75x, vLLM justified
- gen2-mips-matching-model.md: T10 RESULT (bulk_harvest phase-separation; 52/80=65% on fresh
  SC03 <=15-ins; gate 0.4s/fn/8w vs ~30s/fn serial; drafting now the sole bottleneck -> vLLM)
- SETUP.md: bulk_harvest.py inventory row + gate_stage/harvest_verify parallel-safe params (R21)
- CURRENT_PHASE.md: T10 done (built+measured), T10.5 vLLM split out as Drew-gated; progress log
2026-06-30 23:22:46 -06:00
Drew T 72dabb470c feat(phase-23): broad v3 harvest (48 banks) + final propagate sweep; docs
- bounded broad v3 harvest banked 48 small fns across SC01/SC02 overlays (mostly
  reach-1 ×1; fleet 64.16->64.18%), final propagate sweep +4 groups (1687->1691)
- check-all 136/136 byte-identical, dedup-check 0 failed
- docs/community-matching-model-plan.md (publishing the drafter — parked)
- docs/sister-decomps.md (VS cross-project plan + idiom-discovery rationale — parked)
- CURRENT_PHASE.md: 2026-07-01 session arc (injection lever +0.34%, the type-walled-14
  deferred, the saturation-campaign plan)
2026-06-30 13:54:53 -06:00
Drew T fdd3bf3c28 feat(phase-23): inject-extern lever on _a.c — +3 reach-134 fns (fleet 64.09→64.16%)
- inject_capped_externs --src-file ov_SC01_077_a.c freed 3 more reach-134 fns
  (0x8012A018/0x8012BA10/0x8012FDA8); 077 byte-identical; dedup_propagate
  registered 2 clean ×134 groups + 2 ×133 (ov_SC01_000 straggler kept ×1)
- 1685->1687 shared groups, check-all 136/136, dedup-check 0 failed
- injection lever total this session: 63.82% -> 64.16% (+0.34%, ~0 LLM tokens)
2026-06-30 11:20:13 -06:00
Drew T 205fc202e9 feat(phase-23): macro-extern-injection lever — 8 reach-134 fns freed ×134 (fleet 63.82→64.09%)
- tools/inject_capped_externs.py (new): source each propagation-capped reach≥2
  inline match's externs from ov_SC01_077's own file-scope decls, inject them
  block-scope so the lifted macro is self-contained (the Phase-20-backlog
  macro-extern-injection lever; byte-neutral, fail-safe via compiles_standalone)
- 8 reach-134 fns freed from ov_SC01_077.c, 077 byte-identical; dedup_propagate
  --auto-from registered 7 new shared groups ×134 (1678->1685), check-all 136/136
- the LLM reach≥2 measurement run already banked +7 (v3 banks reach≥2: 6/15 in 005
  vs v2's 0/15) — committed earlier (commit:0359, commit:0360)
- cookbook §28d + SETUP tooling inventory (R16/R21/R30)
- fleet 63.82% -> 64.09%, 0 NON_MATCHING, dedup-check 1685/0 failed
2026-06-30 11:15:11 -06:00
Drew T ecc95da031 chore(phase-23): regen reports after the reach≥2 measurement run 2026-06-30 11:02:19 -06:00
Drew T 1eadbc73e9 docs(phase-23): 8-hour autonomous run — corpus-v3 + v3 + local serving; fleet 63.67->63.82%
The run (Drew away): built tools/serve_local.py (Unsloth GPU serving, replaces ejected LM
Studio); the prompt fix (translate-every-instruction, 0/3->2/3 on the empty-leaf class);
corpus-v3 (mine the 1623 engine_core.h DEFINE_func macros + struct types: 1312->2891 pairs,
2534+291 trainable); v3 trained (loss 1.275->0.085) eval 23/40 (57.5%); v3 production batch
banked ~352 fns + 45 new shared groups -> fleet 63.67->63.82% (+502 byte-identical), 136/136
byte-clean, 25 auto-commits, $0. v3 banks the empty-leaf/setter class v2 couldn't.

- docs/gen2-mips-matching-model.md: corpus-v3 + serving + prompt-fix + v3 eval + harvest
- docs/SETUP.md: LLM matching tier added to the Tooling inventory (R21)
- phase-ends/CURRENT_PHASE.md: run progress + next levers (reach>=2 targeting, dedup-collapse)
2026-06-30 07:36:33 -06:00
Drew T e91859fb4a feat(phase-23): grinder per-binary fix (5-layer) — unlock non-077 near-miss grinding
The grinder/backlog pipeline was ov_SC01_077-hardcoded 5 layers deep (same class as the
T7 lora_grind bug). Fixed all so the permuter grinder can process a non-077 near-miss:
1. gate_stage.append_record stores the source "binary"
2. backlog.FIELDS keeps it (else append_record dropped it)
3. backlog.load_best/_open_stubs is fleet-aware: a fn matched in ov_SC01_077 but
   propagation-stuck stays OPEN in its overlay, so it surfaces via that record instead
   of being dropped as "matched" (the grinder must SEE it to grind it)
4. p16_permute.setup takes the target binary's asm-subdir (was hardcoded 077)
5. grinder resolves per-binary asm + gates grouped by binary + allows unknown nins
Backward-compatible: legacy records (no binary) default ov_SC01_077.

Validated end-to-end: the 3 fresh reach-134 close=1 ov_SC01_000 fns now surface, resolve
to ov_SC01_000's asm, and gate via ov_SC01_000.

TWO byte-evidenced findings (redirect the fuel strategy):
- the reach>=2 close=1 fuel is MODEL semantic-misses, not permuter fuel: func_8012E27C's
  target is "return 1" but the 7B drafted an empty "void f(void){}" (corpus overfit
  empty-leaf); func_8012BF4C/AD64 are trivial sw/sh setters drafted empty. A corrected
  draft banks them (+3 byte-identical via the fixed gate, @commit:0326); the permuter cannot
  add a missing return/store. Lever = corpus-v3 leaf variety, not the permuter.
- x reach is propagation-capped: the 3 are inline-matched in ov_SC01_077_a.c (the stuck-
  local cap) -> dedup_propagate "nothing to propagate" -> banked x1. Lever = dedup-collapse.

check-all 136/136 throughout. docs/gen2-mips-matching-model.md + CURRENT_PHASE updated.
2026-06-30 00:58:13 -06:00
Drew T 366f7e4c7f feat(phase-23): T9 — reach>=2 targeting (lora_grind --min-reach); shared-code is the model's weak band
Add a sig-based reach oracle + --min-reach N to lora_grind so the mass-run can prefer
SHARED functions (one bank propagates x reach — the fleet-% multiplier). The oracle reads
the same .run/sig.ov_*.jsonl dedup_propagate uses (validated: 0 mismatch over 60 stubs +
the func_8017CE24=2 ground truth), so a reach>=N target is exactly one dedup_propagate
will stamp x reach after the bank.

Bounded reach>=2 mass-run (ov_SC01_000, 15 shared <=15-ins stubs): 0/15 banked, vs the
reach-1-heavy spot-run's 7/15. The model is weakest exactly on reach>=2 (shared) code:
(1) the corpus skipped the shared DEFINE_func macro bodies (export_pairs reads only src/
defs -> 96.6% of the corpus is overlay-unique), and (2) the shared engine fns are the
harder regalloc/schedule residuals. So reach>=2 model-only is NOT a fleet lever by itself.

BUT the reach>=2 drafts are high-value FUEL: 5/15 are close<=3 reach-134 near-misses
(3x close=1: func_8012E27C/BF4C/AD64) -> x134 each if closed. The real lever is
reach>=2 draft -> permuter-grinder close (x134), which needs the SAME per-binary fix T7
applied to lora_grind: grinder.py calls run_gate with no binary (-> 077) and the backlog
stores no binary field. That two-part fix is the next step. byte-neutral: check-all 136/136.

- docs/gen2-mips-matching-model.md: T9 RESULT
- phase-ends/CURRENT_PHASE.md: T9 done; next = grinder per-binary fix, then corpus-v3
2026-06-30 00:12:45 -06:00