Commit Graph

98 Commits

Author SHA1 Message Date
Drew T 1ab9905368 feat(phase-26): §8d scope_data_externs — the ×133 sweep blocker fixed; func_8015AE2C banked ×134
- ROOT CAUSE (R14 — the session-7 diagnosis was half right): the isolated region builds [ OK ]
  WITHOUT the body, so §8b isolation was never implicated. `family_remap.gather_externs` prepends
  carried decls at FILE scope; D_801812A4 is a fn-ptr dispatch table the sibling declares FOUR
  incompatible ways at BLOCK scope inside its own later functions, so the carried file-scope decl
  ESTABLISHES A GLOBAL THE TU NEVER HAD and every later block-scope extern must now agree with it.
  Byte-proven asymmetry: BLOCK(int)->BLOCK(struct*)->FILE(void*) builds; FILE(void*)->BLOCK(int)
  errors. It was the ONLY hard error in the build — all 27 carried function externs were fine raw.

- THE FIX (demote, don't reconcile): tools/scope_data_externs.py emits a carried D_ extern at BLOCK
  scope inside the function body when the TU has no file-scope decl of it above the insertion point.
  Byte-neutral (an extern emits no code; type + access opcodes unchanged) and never worse than raw,
  so it needs no oracle, no type comparator, no fn-ptr parser. Restores fidelity — the original
  declares these symbols at block scope in exactly this way. Wired into jtbl_family_bank as the
  `scoped` stage: raw -> scoped -> recovered -> reconciled (scoped is the base for the later stages).

- reconcile_decls is the WRONG instrument for this class, twice: its oracle answers "what does the
  FLEET call this symbol" when the question is "what can THIS TU see", and its DATA_DECL_LINE_RE
  cannot parse `extern void (*D_x[])(void *);` — silently skipping the very symbols that were
  failing (the phase's third silent-skip bug, after find_site braces + overlay_files splits).

- R17 TRIAGE RULE, first real test, held: `conflicting types` = the compiler REFUSED TO COMPILE =
  a C front-end diagnostic = our Python. Reading cse.c/global.c would have taught nothing.

- RESULT: func_8015AE2C (562 ins, reach 134) swept 133/133 siblings, 0 failures. R22 clean-fleet
  136/136 BYTE-IDENTICAL (534 changed src files); dedup-check 1813 validated / 0 failed; 0
  NON_MATCHING (G4). instr-weighted 63.0 -> 63.6%; distinct-code 39.1 -> 40.5% (+256 unique fns /
  +79,957 ins) — one core, ~0 agent tokens.

- knowledge captured during the producing session (R30/R31/R21): cookbook §8d, decision-log
  2026-07-13 session 8, SETUP tool-inventory row; CURRENT_PHASE session-8 checkpoint.
2026-07-13 20:45:15 -06:00
Drew T 5a08180617 feat(phase-26): §8 ×134 automation — func_8012ACE0 banked fleet-wide (133/133, R22 136/136)
- the jr-function ×134 harvest pipeline, proven end-to-end: per family sibling,
  jtbl_carve (per-sibling jtbl-rodata carve, computed from THAT sibling's own jtbl
  address — the fn is at the same vram across overlays but its jtbl floats) -> make
  extract (auto ld_interleave) -> remap_hseq + canon_sig_reconcile -> whole-binary gate
- tools/jtbl_carve.py: per-overlay §8 carve generator (config data-tail split +
  <ov>_JTBL_INTERLEAVE var)
- tools/jtbl_family_bank.py: the sibling sweep driver (idempotent, revert-on-fail, byte-gated)
- tools/family_remap.py: extract_unit now carries single-line typedefs (jr-function bodies
  define local `typedef struct{} Foo_<addr>;` that must template with the body — the
  propagation cap for these; additive, byte-gate-protected)
- func_8012ACE0 family: 133/133 siblings BANKED, 0 failures; R22 clean-fleet 136/136
  byte-identical; 0 NON_MATCHING (G4)
- metrics: distinct-code 39.1% (50,698 unique fns), instr-weighted 63.0%
- opportunity (has_mid_jr families): 237 total (5,805 members) = 46 small mid/tiny
  (771 members, same mechanical pipeline) + 191 substantial (the Fable5 cores, Task 7 paused)
- NEXT: R22 profiling/parallelization; then the other 45 small jr families
2026-07-12 19:02:25 -06:00
Drew T 095a611e75 feat(phase-26): §8 jtbl-rodata tooling — overlay PoC proven (func_8012ACE0, R22 136/136)
- overlay jr-functions can now bank as C: gcc switch jump tables form a .rodata island at
  the overlay TAIL; carve a matched fn's jtbl into a dotted [.rodata, <code-subseg>] subseg
  + ld_interleave (data->rodata->data sandwich) places it byte-exact. cookbook §8a + SETUP.
- tools/ld_interleave.py: --section .<binary> param (derives the <binary>_TEXT/DATA/RODATA/
  DATA2/BSS symbol prefix); default .main = the EXE, byte-identical (backward-compat proven)
- Makefile + config/overlays.mk: <bin>_JTBL_INTERLEAVE hook + a $(strip)-guarded extract
  branch (gotcha caught: a trailing #comment on the := left whitespace -> non-empty -> the
  branch misfired on resident with the EXE defaults)
- PoC: func_8012ACE0 (25-ins jr-fn in ov_SC01_077) reconciled (canon_sig_reconcile) + banked
  BYTE-IDENTICAL d19c9580 -- the first overlay jr-function matched through the C pipeline
- R22 FULL-FLEET clean rebuild: 136 passed, 0 failed (main 143dbb89 unaffected by the
  ld_interleave change); 0 NON_MATCHING in any default build (G4)
- P9 findings: func_80159C84/func_8015444C (the 2 carried Fable5 jr bodies) are rtu_match
  FALSE-matches (incomplete jtbls: 52B vs 56B -> never bank); the maspsx "hang" scare was a
  truncated experimental-file artifact (real pipeline builds in ~1s)
- metrics: distinct-code 39.1% (50,572 unique fns), instr-weighted 62.9%
- NEXT: the ×134 automation (generate the per-overlay carve + template the reconciled body)
2026-07-12 16:37:37 -06:00
Drew T 025cc03f69 feat(phase-26): tiny-band mechanical harvest — 17,975 member-matches, R22 136/136
- family_sweep --hseq --band tiny: 180 tiny matched-exemplar families ->
  17,975 member-matches BANKED / 5,617 gate-rejected (h_seq-collision
  false-templates — the whole-binary byte-gate refused every one; G3/P9),
  266 overlay .c files touched (~76% bank rate)
- R22 clean-fleet (make clean + extract-all-136 + check-all) -> 136/136,
  0 failed; dedup-check 1813 validated / 0 failed; 0 NON_MATCHING in any
  default build (G4)
- metrics: distinct-code 35.2 -> 39.1% (50,571/84,996 unique fns),
  instr-weighted 60.9 -> 62.9%. mechanical size-bands (substantial/mid/tiny)
  now harvested; remaining levers = the two harvest gaps (§8 jtbl-rodata,
  reconcile fn-ptr-extern)
- regen docs/family-hseq.md + docs/progress.fleet.md; CURRENT_PHASE.md log
2026-07-12 15:38:40 -06:00
Drew T 89162fd6b8 feat(phase-25): task A giant batch 1 — 2 more giants ×134 (func_80135480, func_80163EC8) + §44 levers; 4 Fable5 seeds
- cheap-Opus batch over the 6 frontier giants: 3 banked ×134 this session (func_80166994 §43
  committed earlier; + func_80135480 258-ins block-scoped-pointer-split; func_80163EC8 234-ins
  cross-jump-duplicated-tail, 1 benign $v0 pin). 266 siblings byte-identical, 0 failed
- R22 clean-fleet 136/136; instr-weighted 57.2->57.7%, distinct-code 28.2->29.3%, dedup 1813/0
- cookbook §44 — 5 reusable levers: §43-extension (K&R s16 also covers callee-stash sign-extend),
  pointer-var-decl (avoid &sym CSE-hoist), block-scoped-pointer-split, cross-jump-duplicated-tail
  (cracks a §31-D1/D2-"permuter-only" class), + the intrinsic-wall taxonomy (what cheap-Opus can't)
- R14: §43 does NOT universally transfer (only 1 of 6 giants was K&R-s16; each is its own class);
  giant #1's prior "MATCH" note was stale/false (verify vs bytes)
- 4 giants -> pin-free/structural Fable5+permuter SEEDS (func_80133CD4 flagship §37 allocno-tie,
  func_8014D820 RC-6 pin-free, func_801670E4 scheduling, func_8016CBC0 coalescing); escalation
  = permuter-first then Fable5 §34, queued in the CURRENT_PHASE resume block
- SESSION CHECKPOINT: phase 25 OPEN; fresh session resumes the giant-seed escalation round
2026-07-11 02:27:23 -06:00
Drew T c62fe7f7ea feat(phase-25): task A giant #1 — func_80166994 (369 ins) cracked ×134 via Fable5 + the K&R s16-param idiom (§43)
- Fable5 subagent cracked func_80166994 (trail/afterimage ring recorder, 369 ins) — FULLY
  STRUCTURAL, zero register pins -> swept ×134 CLEAN (exemplar + 133 siblings byte-identical).
  R22 clean-fleet 136/136; instr-weighted 56.8% -> 57.2%; distinct-code 27.3% -> 28.2%
- NEW IDIOM cookbook §43: a K&R s16-param DEFINITION dissolves the §17/§29 "narrow-param wall".
  On MIPS K&R promotes s16->int (ABI-identical to the canon-sig s32), body keeps the in-place
  sll aN,16 narrow/extend the (s16)cast form can't reproduce. void->s32 return-flip pair:
  split //@EDIT (self-fn, ov077-specific) + engine_core.h ec_edit ×5 (byte-neutral, callers discard)
- family_sweep --edit-remap: split-edits now OPTIONAL (apply where present, never skip; the
  whole-binary byte-gate is the sole arbiter, G3/P9) — a sibling lacking the ov077 canon-sig decl
  still banks via ec_edit + body. edit-absent tracked, not skipped
- R14: the prior wave's "@stuck: none — MATCH" note on func_80166994 was STALE/FALSE (re-ran DIFF
  366/369). Verify a MATCH claim vs the bytes, never a stale note
- structural cracks are the ×134-SAFE ones (contrast §42e pin-heavy families that cc1-SIGABRT in
  sibling TUs). Other 6 giants -> cheap-Opus applying §43+§31, Fable5 only on new-class evidence
2026-07-11 01:03:09 -06:00
Drew T c0379f0738 feat(phase-25): progress.py --weighted — byte/instruction-weighted metrics (the honest headline numbers)
- weighted_metrics() from .run/sig.*.jsonl + src stubs (executable code only, resident + 134
  overlays; main EXE excluded). Two framings: fleet instr-weighted (per-overlay, the decomp.dev
  -display number) + dedup distinct-code (each unique h_exact once, the distinct-RE number)
- --fleet now emits THREE labeled metrics into docs/progress.fleet.md: fn-count 74.48% (×134-
  inflated), instr-weighted 56.8% (shipped .text), distinct-code 27.3% (of 84,996 unique fns)
- --weighted prints the two weighted numbers standalone; degrades gracefully if sigs absent
- corrects the stale "~30-35% byte-weighted" estimate: the giant campaign since Phase 19 raised
  the fleet instr-weighted number to 56.8%; the distinct-code 27.3% is the unique-monster-tail truth
- SETUP §tooling row updated (R21)
2026-07-11 00:42:22 -06:00
Drew T 5fcb040dc3 feat(phase-25): task B — family_sweep --edit-remap; 2 array-decay families ×134 (+266 fns), 4 cc1-crash-walled
- family_sweep.py: new --edit-remap MANIFEST mode (§42e) — per family, symbol-remap the
  split-scope //@EDIT old||new per sibling + apply once-global engine_core.h ec_edits
  (byte-neutral), stage the family_remap body, gate via harvest_verify (the sole arbiter)
- BANKED 266/266 (0 failed): func_80136824 + func_80136334 (array-decay ptr-flip) ×133
  siblings each — full ×134. R22 clean-fleet 136/136, fleet 74.40% -> 74.48%, dedup 1813/0
- R14 FINDING (cookbook §42e addendum + decision-log): the other 4 byte-drift families
  (func_80133AB0 zero-reg pin, func_8016DF5C/8013D9B0 GTE-pin, func_80156044 trampoline)
  cc1-SIGABRT (Error 134) in the SIBLING TU — hand pins are ov077-TU-context-specific,
  NOT mechanically ×134-recoverable; backlogged as ×1/permuter fuel. rtu_match/match_one
  are blind here (neutralized/isolation compiles crash too); only make build is truth
- 0 NON_MATCHING in any default build (G4)
2026-07-11 00:03:39 -06:00
Drew T 0241772225 fix(phase-25): canon_sig_reconcile def-finder (\n -> (?:^|\n)) unblocks crack propagation; recover func_8014FE60 x134; fleet 74.36->74.40%, R22 136/136
- R14 CORRECTION of the prior "family_remap limitation" call: it was a MISDIAGNOSIS. family_remap
  succeeds on all droppers; the "remap-fail" family_sweep reports was a mislabeled canon_sig_reconcile
  throw ("no definition of func_X found in draft") — the def-finder regex required a leading \n, so a
  //@EDIT-stripped raw draft with the fn definition on line 1 was not found.
- FIX: def-finder regex \n -> (?:^|\n) (also match a def at draft start; strictly additive, low-risk).
- Recovered func_8014FE60 fully: 133/133 siblings banked (fix + engine_core.h DEFINE_func_8014FDF4
  extern void->s32 global flip, byte-neutral fleet-wide; caller discards return).
- Residual (the genuine, small --edit-remap): func_8016DF5C/80136334/8013D9B0/80156044 reconcile but
  byte-drift per sibling (out-of-body fixes: pointer //@EDIT, no-proto, return-flip not carried per sibling).
- cookbook §42e (the two-layer diagnosis + the forward ×134-leverage-realism rule); decision-log corrected.
- R22 clean-fleet 136/136 BYTE-IDENTICAL from a fully clean tree; NON_MATCHING 7 (0 in default build, G4).
2026-07-10 21:05:25 -06:00
Drew T 6c0887b097 feat(phase-25): crack fan-out over the frontier map — wave 4, 24/26 MATCH + 1330 swept; fleet 73.97->74.36% (+1350 fns), R22 136/136
- Frontier map (docs/phase25-frontier-map.md, committed commit:0506): rtu_match-measured all 42 draftable
  families -> 37 crack targets; endgame = 42 draftable + 235 matched-free + 2481 absent.
- Crack fan-out wf_b54b5d98-380 (26 tractable-band exemplars): 24/26 MATCH -> 20 banked byte-identical,
  incl. func_8014FBC0 (22 ins x1996 inline-asm trampoline), func_80132144 (27 x539), func_8016CF04
  (engine_core.h void->short flip). Swept x134: 1330 siblings / 931 failed (//@EDIT/trampoline/engine_core
  families -> --edit-remap backlog). Batch = 20 exemplars + 1330 = 1350 fns.
- 5 durable levers -> cookbook §42d: return-type flip BOTH ways (void<->s32/short); address-recompute-vs-cache
  (the unifying read-global rule); the full-inline-asm trampoline idiom + family_remap-inside-asm; memcpy->
  struct-assign at scale; phantom-frame induction.
- Deferred (backlog, map tiers): func_8016D1D8/80165240 (M-linkwall), func_80164E40 (sig-reconcile),
  func_801457A4 (-O0), func_8012E364/801549F8 (permuter).
- R22 clean-fleet 136/136 BYTE-IDENTICAL from a fully clean tree; NON_MATCHING 7 (0 in default build, G4).
2026-07-10 19:49:39 -06:00
Drew T 8fa29f2dda feat(phase-25): T7 F-band wave 3 part 2 — corrected rtu_match fan-out, 7/9 cracked + 266 swept; fleet 73.89->73.97%, R22 136/136
- NEW tools/rtu_match.py: real-TU-faithful, PARALLEL-SAFE per-fn match check. Compiles the WHOLE
  split TU (candidate spliced, INCLUDE_ASM neutralized via -DINCLUDE_ASM(a,b)= + -Isrc/<source>)
  in a per-fn temp dir -> no asm/, no shared overlay build. Closes match_one's isolation blind
  spot (in-TU decl/global-type/memcpy-builtin drift) so a MATCH HOLDS at the whole-binary gate.
- Corrected Ultracode fan-out (wf_80762f2c-822, 9 xHigh workers): 7/9 real-TU MATCH -> all 7
  banked byte-identical (individual + combined d19c9580), ZERO drift (vs wave-2's ~50% attrition).
  Banked: func_8012FCC4 func_80133AB0 func_80134A74 func_80136824 func_8014DD8C func_80168828
  func_8016C188. func_8012FCC4's "irreducible" delay-slot was a wrong-callee-arity bug.
- Swept x134: 266 siblings banked / 266 failed (the 2 //@EDIT families func_80133AB0/80136824
  can't per-sibling-reconcile via family_sweep -> backlog: a --edit-remap enhancement). Batch =
  7 exemplars + 266 = 273 fns.
- func_8014DD8C: engine_core.h DEFINE_func_8014D790 extern void->s32 flip (byte-neutral fleet-wide,
  caller discards return) -- R22-confirmed neutral across all 136.
- 7 durable levers -> cookbook §42c (callee-arity delay-slot, pointer-global *(T**)&, array-decay
  CSE, §17 zero-reg copy, void->s32, register-arg capture, free-floating load hoist). rtu_match -> SETUP §6.
- 2 DIFF -> permuter (func_801670E4 70->48, func_80185BA4 c=65), seeds .run/crack3/wave3/.
- R22 clean-fleet 136/136 BYTE-IDENTICAL from a fully clean tree; NON_MATCHING 7 (0 in default build, G4).
2026-07-10 17:23:20 -06:00
Drew T 69d1d37262 feat(phase-25): T7 F-band wave 3 — func_80164930 cracked + swept ×134 (read-global fix); fleet 73.85->73.89%, R22 136/136
- func_80164930 (81 ins) CRACKED + swept x134 = 134 fns (133/0 siblings, family_sweep --reconcile).
  The crack = the read-global fix: flip the file-scope decl s16->u16 (byte-neutral to the store-only
  caller func_801647A4) + reference the global directly, so the read lowers to direct-addressed `lhu`.
- TWO DURABLE FINDINGS (cookbook §42b):
  (1) THE STALE-OBJECT GATE TRAP: a piped `make build >/dev/null` that FAILS leaves a stale .o, and
      `asm-differ -o` then reports a phantom score-0. This invalidated wave-2's "iso-drift" labels --
      a rigorous re-check (rm .o + build exit-code + real whole-binary SHA) shows all 4 remaining
      iso-drift drafts NOCOMPILE (unreconciled callee externs vs the TU canonical-sig layer). Every
      gate MUST rm the split .o + check the exit code (compounds the §42a --out gotcha).
  (2) canon_sig_reconcile `*(T*)&D_sym` READ-global drift: &sym forces the address into a held register
      (kills direct %hi/%lo -> schedule drift); write-only globals unaffected. Fix = file-scope exact-type
      decl + direct ref (a block-scoped `extern u16` vs ambient s16 is a hard cc1 conflicting-types error).
- Frontier reassessed: the 9 remaining wave-3 targets each need real-TU reconcile-cracking (NOT gating the
  broken wave-2 drafts); each cracks -> ~134 fns (all x134 families). ~1,200 fleet potential.
- R22 clean-fleet 136/136 BYTE-IDENTICAL from a fully clean tree; NON_MATCHING 7 (0 in default build, G4).
2026-07-10 14:58:19 -06:00
Drew T b936dec411 docs(phase-25): T7 F-band wave 2 — 4 banked + 399 swept ×134 (fleet 73.73→73.85%, R22 136/136)
- Ultracode 14-worker wave 2 (§42 playbook): 9/14 iso-MATCH -> 4 banked, 5 real-TU drift, 5 near
- Banked: func_80133784 (203-ins 29-100 win), func_8017B614 (memcpy-fix held), func_8017EF50, func_80145CEC
- Swept ×134: 399 member-matches / 0 failed (auto-committed commit:0502)
- cookbook §42a: real-TU-verify rule (iso-MATCH != real-TU bank; 5/9 drifted), memcpy->struct-assign fix, 5 levers
- Session total: fleet 73.66% -> 73.85% (~673 fns across 2 waves); dedup 1813; NON_MATCHING 7 (0 in default build)
2026-07-10 12:52:20 -06:00
Drew T 67a8fe670d docs(phase-25): T7 F-band ≤28 regalloc crack wave — 4 banked + 266 swept ×134
- Ultracode 9-worker wave (register-pin/§31-density levers) cracked 7/9 to byte-0 in isolation
- Gated: 4 banked byte-identical (func_80134C20/801345F8/80141A60/80180F10); 3 real-TU drift; 2 near
- Swept ×134: func_80134C20 + func_801345F8 = 266 siblings (func_80141A60 frame-pad = exemplar-only)
- Fleet 73.66% -> 73.73%; R22 clean-fleet 136/136; dedup 1813; NON_MATCHING 7 (0 in default build)
- cookbook §42: density-lever catalog + 3 tooling gotchas (harvest_verify --out, reconcile fn-ptr, R22 extract-all)
- src banks already committed commit:0500 (family_sweep --commit)
2026-07-10 04:22:52 -06:00
Drew T 1ea7c2925d feat(phase-25): T7-M3 — 2 no-proto exemplars banked + swept ×134 (engine_core.h fleet-neutral)
- 4 clean M3 fns: rewrote their engine_core.h macro-internal externs to no-proto (10 decl edits,
  byte-neutral — every caller passes matching args): func_80131B14/8015D01C/8012D664/8016F0AC
- banked 2 in ov077 via canon_sig_reconcile v3.2 (now sees the no-proto canonical): func_8012D664
  (44), func_8015D01C (58); swept ×134 -> 266/266 members banked (100%)
- 4 M3 residue deferred (func_80131B14/8016F0AC arity, func_8013D9B0 TU-internal, func_80182988
  loose-typing macro)
- R22 clean-fleet 136/136 byte-identical (the fleet-wide EC no-proto change verified neutral);
  dedup-check 1813/0; 0 NON_MATCHING (G4)
2026-07-10 01:43:05 -06:00
Drew T c908c3913a feat(phase-25): T7-M2 — 4,389 def-side-wall members swept ×134 (fleet 72.29→73.58%)
- tools/family_sweep.py --reconcile <rawdir>: the Q5-proven per-sibling path — symbol-remap the RAW
  exemplar draft (family_remap.symbol_map) then RE-RUN canon_sig_reconcile v3.2 against EACH sibling's
  own TU (block-scope-vs-ambient decisions depend on the sibling's decompile state), then the plain
  whole-binary byte-gate. Plain remap of the ov077-reconciled body banks 0; per-sibling reconcile banks 94%
- swept the 35 M1 exemplars across 133 overlays: 4,389 / 4,655 member-remaps banked (266 per-sibling
  loose-typing-wall misses -> backlog); 266 overlay source files gained real C defs
- fleet 72.29% -> 73.58% (+1.29%), REAL 251,804; R22 clean-fleet 136/136 byte-identical (make clean +
  extract-all-136 + check-all); dedup-check 1813 validated / 0 failed; 0 NON_MATCHING (G4)
- cookbook §41c (the ×134 def-side-wall sweep). ~0 agent tokens (local cpp+build only)
2026-07-10 01:20:38 -06:00
Drew T 20747321c4 feat(phase-25): T5b batch-2 — def-side wall cracked mechanically (canon_sig_reconcile); +5 giants, 3x134 (fleet 72.18->72.29%)
- 29 giants drafted (Opus-xHigh wave), 16 R14-isolation-MATCH but 0 auto-banked: ALL
  blocked by the DEF-SIDE canonical-sig wall (Ghidra-typed draft sigs conflict with the
  engine_core.h canonical, which lives inside DEFINE_ macros so sig_unify can't reach it).
- NEW tools/canon_sig_reconcile.py: strip ambient-dup typedefs/externs -> rewrite def to
  the canonical sig -> cast changed params AT USE (never intermediate locals: a local adds
  a pseudo -> regalloc shift -> byte-diff, measured 70ff4748 != d19c9580). Byte-neutral.
- BANKED 5 giants mechanically: func_8013B274 func_80130D48 func_80167DBC (family_sweep
  x134) + func_8016DC20 func_8018514C (exemplar-only). ~404 new fn-defs.
- R22 clean-fleet 136/136 BYTE-IDENTICAL (from make clean + extract-all + check-all),
  dedup 1813/0, 0 NON_MATCHING (G4).
- 11 walls backlogged (non-identical ambient types SVEC/ApplyMatrixSV, macro-local data
  symbols D_*, u8 redef, byte-diff) + 13 nears (permuter-ILS/Fable5 fuel). Frontier +29.
- Cookbook §41 (the reconcile recipe + the at-use-cast-not-locals regalloc proof) +
  decision-log R31 (the "giant tier was plumbing not matching" pivot). R30/R31.
2026-07-09 20:56:35 -06:00
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 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 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 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 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 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 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 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 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 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 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 70aaad4efb chore(phase-23): regenerate backlog + fleet digests (≤15 campaign end, fleet 64.6%) 2026-07-01 14:20:12 -06:00
Drew T 265e930f65 chore(phase-23): regenerate backlog + fleet digests (T10 banks) 2026-06-30 23:23:04 -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 bff03dbdb5 fix(phase-23): T7 — lora_grind broad-rotation banking (two gate bugs); ov_SC01_000 7/15
The 500-fn calibration banked 0/222 across the binary rotation. Root-caused (R14, by
reading the code + the run's own backlog — resolving a flat contradiction between two
scout agents) to TWO independent bugs in lora_grind's use of gate_stage.run_gate, NOT
model quality:
- Bug A: good_sha() passed the sha1sum line "<sha>  <name>" vs harvest_verify's bare
  sha1() -> 0 banks for EVERY binary incl. 077 (so the "0/12" was a bug artifact, not
  an exhausted tail)
- Bug B: the gate call left src/asm/out at the hardcoded ov_SC01_077 defaults -> non-077
  drafts dropped at the 077 stub-filter, silently (and the asm mis-resolution contaminated
  the backlog near-miss classification)

Fix (tools/gate_stage.py): run_gate resolves src/asm/out/good_sha from `binary` when unset
(binary-agnostic, no silent ov_SC01_077 default an overlay inherits; good_sha bare-hash
normalized) + a loud negative-control guard (0-overlap binary/src mismatch warns, so a 0
can never again masquerade as 'nothing matched'). tools/lora_grind.good_sha fixed at source.
Byte-neutral: make check-all 136/136.

Proof: ov_SC01_000 spot-run banked 7/15 (47%) byte-identical (@commit:0322); reach-2
func_8017CE24 propagated x2. ROI finding: 6/7 banks are reach-1 (overlay-unique) -> broad
rotation is high bank-RATE / low fleet-% ROI; the fleet lever is reach>=2 targeting (T9) +
corpus-v3 (T8). Backlog now correctly classified (4x close=1 = grinder fuel).

- docs/gen2-mips-matching-model.md: T7 RESULT section
- phase-ends/CURRENT_PHASE.md: T7 done; next = T8 corpus-v3 / T9 reach>=2 selection
2026-06-29 23:44:12 -06:00
Drew T b4c312a30c feat(phase-22): FIRST free-local-model banks — 4 open stubs matched by the v2 LoRA
The fine-tuned 7B (bfm-match-7b-v2) drafted real OPEN ov_SC01_077 stubs; whole-binary gate banked 4
(func_80160B34 func_8015CC74 func_8016084C func_801705C0). Sample: 9/22 match_one proxy -> 4/22
whole-binary banked (18%; the proxy->gate gap is the TU-plumbing wall). Model is format-robust (raw .s
== normalized). api_draft: NORMALIZE_ASM bridge (unused — model handles raw .s) + ghidra_c-empty fix.
2026-06-29 21:58:09 -06:00
Drew T f154822f7b feat(phase-22): cheap-tier A/B experiment harness + findings
ab_match.js (per-arm-model fan-out fork of worker_wave) + ab_score.py (disk-truth
match_one scorer, --measured for real $). Haiku drafters vs Opus on 20 reach1 fns:
proxy 10 vs 15 matches, Haiku ~4.8x more matches/$, parity on <=52-ins band. Whole-binary
gate banked 4 (proxy over-counts; TU-plumbing wall). backlog/fleet refreshed.
2026-06-29 12:52:39 -06:00
Drew T c1230fa6ea feat(phase-22): T2 close=0 recovery batch — 14 fns ×134 (fleet 63.29%->63.66%)
- R14 corrects cookbook §26 ('close=0 recovery exhausted'): recover_giant + the
  whole-binary gate still banks a ~15-20%% tail. Banked 7 close=0 reach-134 fns
  (func_80156ECC/80147E44/8015ADB0/801661CC/80166054/8012CFA8/8012A62C); dedup_propagate
  --auto-from swept those + 7 pre-existing inline-matched bonus fns ×134 (14 total)
- the other ~33 close=0 are the genuine DEF-side loose-typing / masked-residual wall
- func_80132784 HARD-DEFER (hoist-vs-remat + register-lifetime-reuse not C-expressible)
- §28c distilled: close=0-not-exhausted recipe + the dedup_propagate registry-skip
  recovery (register via append_groups; bytes were already check-all-correct)
- make check-all 136/136 byte-identical (R22); dedup 1619->1633 validated/0 failed;
  0 NON_MATCHING (G4)
2026-06-26 04:14:06 -06:00
Drew T d789d9c242 feat(phase-22): T2 — giant func_80163C2C banked ×134 via Blk16/Buf32 type-lift (fleet 63.25%->63.29%)
- second struct-walled close=0 giant (167 ins): lift Blk16(u32x4)+Buf32(2xBlk16) to
  src/shared/engine_types.h, remove the Blk16 dupes from ov_SC01_077.c + the -O0 split
  ov_SC01_077_a.c (byte-neutral), recover_giant, harvest_verify MATCH, dedup_propagate
  ×134 (+22378 ins byte-weighted)
- struct-walled trio done: func_80156B74 + func_80163C2C banked; func_8014F74C is a
  masked residual (grinder fuel, not type-liftable)
- make check-all 136/136 byte-identical (R22); dedup 1618->1619 validated/0 failed;
  0 NON_MATCHING (G4)
2026-06-26 03:51:11 -06:00
Drew T b5a1fe6dab feat(phase-22): T2 — giant func_80156B74 banked ×134 via engine_types.h type-lift (fleet 63.22%->63.25%)
- struct-walled close=0 giant (cookbook §28 case #3) is bankable: lift the S8/B8
  typedefs from ov_SC01_077.c's prelude to src/shared/engine_types.h (shared via
  engine_core.h; byte-neutral), recover_giant block-scopes externs, whole-binary
  harvest_verify MATCH, dedup_propagate ×134 (214 ins, +28676 ins byte-weighted)
- cookbook §28b: the type-lift recipe + the serialize-make-jobs gotcha (concurrent
  make corrupted an .o and dropped the registry write; re-ran dedup_propagate idempotent)
- make check-all 136/136 byte-identical (R22); dedup 1617->1618 validated/0 failed;
  0 NON_MATCHING (G4)
2026-06-26 03:45:35 -06:00