Commit Graph

486 Commits

Author SHA1 Message Date
Drew T ba35785ec4 feat(phase-29): bank func_801777BC (59 ins) x138 — the giv-init base-register lever (§70)
- MATCH (59 ins), real-TU verified by the agent before handing back (cc1 rc=0, 59/59, 0 diffs).
- Propagated x138 with ZERO exclusions -> confirms the ×3 cap on func_80174CB0 was purely the
  carried-extern collision: a body with no externs propagates clean.
- R22 clean-fleet 140/140, 0 failed. dedup-check 1884 validated / 0 failed, C1 coverage complete.
- FLEET CROSSES 80.0% instr-weighted (10,509,526 / 13,141,652); fn-count 89.02%; distinct 67.7%.
- THE LEVER (cookbook §70): residual was ONE instruction, addiu $t0,$t1,0xC vs $t0,$a0,0xC -- a giv
  based on a copy of the param. Reading gcc-2.7.2 loop.c/cse.c proved the natural form can never
  emit the target: cse.c:make_regs_eqv makes the copy canonical (it out-lives a0) and
  loop.c:update_reg_last_use won't extend a0's last-use (giv-init UID >= max_uid_for_loop). Fix:
  walk the PARAMETER itself, so record_initial sees the biv init as hard reg (reg:SI 4),
  valid_initial_value_p accepts it (precondition: no calls), and emit_iv_add_mult bases the giv on
  $a0 -- yielding both required instructions free.
- META: this compiler-source reasoning was done by an ORDINARY Opus 5 drafting agent, unprompted --
  the tier Phase 23 reserved for Fable5. One data point, recorded as such; the cheap action is to
  give routine drafting agents the gcc source path.
2026-07-25 00:49:04 -06:00
Drew T e112eff601 fix(phase-29): find_site — a comment-only line halted the extern scan (§68); func_80174CB0 x1 -> x3
TWO mislabels in one tool, both found by making it print what the compiler actually said.

1) compiles_standalone() returned a bare False and the caller filed EVERY failure under
   "overlay-local TYPE (the real cap)". The dominant real cause is undeclared FILE-SCOPE EXTERNS.
   Now returns (ok, stderr) and the skip is classified by actual cc1 output.
2) find_site()'s backward walk over "preceding contiguous externs" skipped BLANK lines but not
   COMMENT-ONLY lines, so a full-line /* ---- */ between two extern groups dropped every extern
   above it. Comment lines are now skipped like blanks and filtered out of the emitted body so
   make_macro never meets a `//`.

RESULT, measured honestly: func_80174CB0 went from "not self-contained" to a 138-member PLAN, but
--recover banked only x3 (ov_SC07_006/007/011); 135 overlays excluded. Those exclusions are NOT
byte divergence (all 138 share h_exact) -- they are the CARRIED EXTERNS colliding with each target
overlay's own decls. The carry is necessary but not sufficient: it must reconcile per-target-TU
(cdecl.compatible(), the shape reconcile_tu already uses). Spec updated in CURRENT_PHASE.md.

- R22 clean-fleet 140/140, 0 failed. dedup-check 1883 validated / 0 failed, C1 coverage complete.
- fleet instr 79.9% (10,501,384 / 13,141,652); +246 ins from the x3.
- WHY THIS MATTERS beyond the numbers: the Phase-21 backlog already prescribed "macro-extern-
  injection frees them x134 (~+0.3%)" and it was never built, because the mislabel told every later
  session these were the known-hard type wall. A wrong diagnostic label cost ~4 phases.
- cookbook §68. NOTE the exclusion message is ALSO mislabelled ("byte-diverge / irreconcilable"
  conflates differing bytes with a non-compiling instantiation) -- logged to fix.
2026-07-25 00:17:08 -06:00
Drew T 00b6448f4e fix(phase-29): dedup_propagate — the "overlay-local TYPE (the real cap)" skip was a MISLABEL
compiles_standalone() returned a bare False and the caller attributed EVERY failure to the
overlay-local type cap. The dominant real cause is undeclared FILE-SCOPE EXTERNS: the body
references extern decls living outside the extracted def block (func_80174CB0: 22 of them;
carrying them makes it compile cc1 rc=0).

- compiles_standalone now returns (ok, stderr); the skip is classified by actual cause:
  "missing file-scope extern (CARRY-FIXABLE): <names>" vs "overlay-local TYPE (the real cap)".
- FLEET SIZING (--auto-from ov_SC01_077 --check-only): 7 skipped, ALL 7 carry-fixable, 0 genuine
  type-cap. Three of them (0x80142B2C/0x801535F4/0x80155800) are on the Phase-21 backlog list whose
  note ALREADY said "macro-extern-injection frees them x134 (~+0.3%)" -- never built, because the
  mislabel told every later session they were the type wall. A wrong label cost ~4 phases.
- also: func_80174CB0's local Mtx_/Svec_ typedefs swapped for the canonical shared MATRIX/SVECTOR
  (byte-identical layouts); ov_SC07_006 still BYTE-IDENTICAL 7ca772be.
- value behind the real fix: the 7 (~+0.3pp) + func_80174CB0 x138 (16,974 ins, ~+0.13pp), ~0 tokens.
- _carry_externs itself is SPEC'd but NOT built here: it writes 138 overlay files (§63 class) and
  wants a fresh session with an R22 budget. func_80174CB0 (banked x1) is the test case.
2026-07-24 23:50:38 -06:00
Drew T af59d8a630 feat(phase-29): bank func_80174CB0 (123 ins) — the §65g verdict was a wrong SIGNATURE
SESSION-17 filed this as §65g-class: "not 'run one more tool', but 'needs a transform that does
not exist yet'". Refuted. It needed the correct self-declaration.

- The TU expands DEFINE_func_80174C80() carrying `extern s32 func_80174CB0(s32, s32);`, while all
  ~100 prior drafts defined `void func_80174CB0(s32, s16)` — matches perfectly STANDALONE, dies in
  the real TU with `conflicting types`. Defining it `s32 (s32, s32)` and recovering param_2's
  s16-ness with an explicit (s16) cast at the func_80012558 use site is byte-identical.
- Drafted by an isolated agent (Opus 5 @ High, 65k tok) pointed at the NAMED blocker with the
  canonical callee sigs supplied — not asked to re-derive the C. It self-verified through the real
  cpp->cc1->maspsx->as chain (cc1 rc=0, 123/123 ins, 0 diffs) before reporting, so the bank was
  first-try clean.
- make check BINARY=ov_SC07_006 BYTE-IDENTICAL (7ca772be); R22 clean-fleet 140/140, 0 failed.
- Propagation ×138 follows as a separate targeted step (§55b: bank -> commit -> dedup_propagate --addr).
- FOLLOW-UP LOGGED: the recovery ladder also relaxed `extern s32 func_80174CB0(s32,s32)` -> `()` in
  src/shared/engine_core.h (+2 overlay files), escalating a binary-local bank to FLEET tier. The
  banked def AGREES with the original prototype, so that edit looks unnecessary — to be tested.
2026-07-24 23:43:15 -06:00
Drew T 25a02d6940 feat(phase-29): propagate 2 integration banks ×138 — fleet 79.7 -> 79.9% instr, R22 140/140
- func_8012B4B8 (84) + func_80169228 (105) propagated via targeted --addr (--check-only first,
  never --auto-from): 138 overlays byte-identical, 2 new dedup groups, ~+26,082 ins.
- R22 clean-fleet: check-all 140 passed, 0 failed of 140. Fleet fn-count 88.90 -> 88.98%.
- The 3 non-banks are diagnosed, not guessed (blocker_probe, both oracles agree): func_801463A0 is
  a real-cc1 MATCH in its own TU that the gate still rejects (§65c rtu-vs-gate divergence, link-level);
  func_80156670/func_80174CB0 carry "drop when banking" typedefs textually identical to the canonical
  ones. Blockers STACK — stripping the cc1-named typedef exposed the next (S8->B8; MATRIX->a callee
  conflict). Remedy named: strip ALL shared-provided typedefs, then run the DRIVER's ladder.
2026-07-24 20:01:31 -06:00
Drew T 1d225747ba feat(phase-29): 2 stranded reach-138 drafts banked from the refreshed spine — R22 140/140
- Ladder-only recovery (no demacroize, so these are NORMAL banks that can propagate x138):
  func_8012B4B8 (84 ins) + func_80169228 (105 ins), both confirmed gone from src, not read off
  the report (§55b trap 4). 2 of 5 candidates.
- DRIFT-CHECK EARNED ITS KEEP (R14): the backlog's close=0 was wrong for 2 of the 7 spine entries —
  func_8012CC88's draft is for ov_SC07_006 and is 13 off in ov_SC01_077 (the documented
  'backlog drafts are overlay-specific' caveat, now confirmed), func_80158638 is 2 off, not 0.
- The cross-file churn is gate_stage's own fix_arity_callers --any-proto pass on the banked fns'
  caller decls (byte-neutral no-proto widening; comments preserved, H5). R22 clean-fleet 140/140.
- Diagnosed the 3 non-banks with blocker_probe (both oracles agree 3/3): func_801463A0 = real-cc1
  MATCH in its own TU yet gate-rejected (the §65c rtu-vs-gate divergence); func_80156670 and
  func_80174CB0 = local_type collisions on 'S8' and 'MATRIX' -> uniquify (T0, draft-only).
2026-07-24 19:52:58 -06:00
Drew T 32de37fff4 feat(phase-29): propagate func_80177940 x137 — 138 overlays byte-identical, R22 140/140
- Targeted `dedup_propagate --addr 0x80177940 --recover` (NEVER --auto-from; --check-only first
  confirmed the plan held exactly this one address, so the de-macroize hazard could not apply).
- 138 overlays rebuilt byte-identical; 0 stubs remain for the address; 1 new dedup group registered.
- R22 clean-fleet: check-all 140 passed, 0 failed of 140.
- Fleet: fn-count 88.86 -> 88.90%, instr-weighted 79.6 -> 79.7% (+13,938 ins = 101 x 138),
  distinct-code 64,874 -> 64,875 unique fns.
2026-07-24 16:41:44 -06:00
Drew T ff7db15954 feat(phase-29): func_80177940 (101 ins, reach-138) BANKED via the permuter loop — R22 140/140
- The loop: permuter (§31 schedule, 900s -j12) 5 -> 1, closing the 4-ins INSN_LUID scheduler tie the
  drafting agent had swept by hand and recorded as un-steerable; read the last instruction (andi vs
  addu); fixed it from the byte-verified sibling func_801778A8's pinned plain-copy idiom; permuter
  again from the corrected seed (cse profile, 1800s) -> MATCH.
- The diagnosis was byte-driven, not guessed: dropping the redundant & 0xf alone COLLAPSED the copy
  (100 vs 101 ins, 52 mismatched), proving the target needs a distinct PINNED register.
- GATE: harvest_verify --chunk 1 -> verified 1 / failed 0, d19c9580 BYTE-IDENTICAL; stub gone from
  source (checked by grep, not the report). R22 clean-fleet: check-all 140 passed, 0 failed of 140.
- NEGATIVE recorded: the pin does NOT transfer to func_8014D820 (pinning its temp t to $v1 -> 285
  mismatched, 303 vs 304 ins). Its run improved 33 -> 27 and plateaued; seed kept for ILS.
2026-07-24 16:34:15 -06:00
Drew T 5c6704f636 feat(decomp): t6-recover gate — +1 fns x0 propagated (fleet None%) 2026-07-24 15:17:45 -06:00
Drew T f1f6238251 feat(phase-29): T16.6/T16.7 — 14th bank via the generalized de-macroize; §65 distilled; R21 inventory debt cleared
- func_8012F40C banked (the callee-conflict variant): relaxing demacroize from "the draft's own
  function" to "any decl the DRAFT declares incompatibly" reaches macros that declare a CALLEE
  differently than the draft does (RotTransPers/RotTransSV). 14 banks total, R22 140/140.
- THE ONE FAILURE, kept honest: func_8012F49C was rtu-MATCH but the whole-binary gate REJECTED it.
  rtu_match is relocation-masked, so a wrong call TARGET is invisible to it -- and this was a callee
  case, exactly where the mask hides the error. Trust rtu MATCH for self-decl corrections, distrust it
  for callee ones (§65c). Reverted its edits and re-banked only the winner rather than leave
  byte-neutral churn on matched code (§57a-4).
- DISTILLED IN-SESSION (R30/R16/R31/R21): cookbook §65 + §65a-§65e (blast-radius tiers; the
  de-macroize escape and the §20 refutation; the rtu-vs-gate divergence; the existing-ladder baseline;
  two-oracle practice); decision-log entry with the HONEST multiple (~2.3x, not the projected 3.7x,
  and it lands on distinct-code not the display number); calibration.md measured table; SETUP.md rows
  for blocker_probe + demacroize PLUS the three the inventory was missing (lift_types, uniquify_type,
  fix_header_decl-as-retired).
- Carried and NAMED, not dropped: 10 match_one-MATCH drafts still blocked by stacked classes, and the
  11 `near` drafts which are unfinished drafts, not recovery fuel.
2026-07-24 14:25:28 -06:00
Drew T 732128b1f4 feat(phase-29): T16.5 — 13 stranded reach-138 drafts recovered and banked via the per-overlay de-macroize (x1)
Every real-TU rtu_match MATCH converted to a whole-binary bank: 13/13, 0 failed.

- BANKED (all BYTE-IDENTICAL, whole-binary gate, stub-gone confirmed by grep not by report):
  func_8012CC88 func_80138DE0 func_80144B14 func_80146750 func_80147364 func_8014CF04
  func_8014D12C func_8014D610 func_80161374 func_8016163C func_80161774 func_80161888 func_801778A8
- Mechanism: existing draft-side transforms (cast_call_sites + reconcile_tu) then tools/demacroize.py
  expands the conflicting DEFINE_func_* instantiations in the overlay's OWN TU with the self-decl
  corrected to the draft's byte-true signature. Writes confined to src/ov_SC07_006/**.
- R22 clean-fleet after the batch: 140 passed, 0 failed of 140. Write-set asserted T1 (3 TU files).
- METRICS, honest: distinct-code 64,860 -> 64,873 unique fns (+13) -- the FULL credit, since
  progress.py marks an h_exact class matched if ANY instance is. instr-weighted 79.6% and fn-count
  88.86% are ~flat, because a de-macroized bank is x1 and cannot propagate x138. That price was
  stated before the work, not after it.
- dedup-check 1879 validated / 0 failed; 0 NON_MATCHING in any default build (G4).
2026-07-24 14:17:20 -06:00
Drew T 09fb069cf2 feat(phase-29): T16.2 — GATE A passed on measured numbers; the §20 DEF-conflict doctrine refuted per-overlay; func_8012CC88 banked
S0 measured all 36 stranded drafts in 9.2s, two oracles agreeing 36/36.

- POPULATION CORRECTED (R14): the audit's "~92% byte-correct" is a whole-wave figure; among the
  STRANDED residue match_one says 24/36 MATCH / 11 near / 1 ERR = 67%. The 11 near are unfinished
  drafts, not integration problems -- and they are exactly the ones that compile and DIFF.
- BLOCKERS (they STACK; cc1 reveals only the first): self_decl_hdr=21, callee_decl=19, data_decl=16,
  self_decl_tu=5, local_type=5. Per function by MAX tier: T0=6, T1=26, not-integration=4.
- T3 BASELINE, measured free: the existing draft-side ladder clears callee_decl 19->3 and data_decl
  16->0 yet converts 1 of 36 to compiling, which then DIFFs -- §61d verbatim. The wave's gate
  orchestration was NOT broken; the ladder simply cannot reach this population.
- NEW tools/demacroize.py: the conflicting extern lives INSIDE a DEFINE_func_* macro BODY, so it
  exists only where instantiated. Expanding those instantiations in the overlay's OWN TU, correcting
  only the conflicting decl to the draft's byte-true sig (never dropping it, §57a-1), dissolves the
  conflict with nothing written outside src/ov_SC07_006/. This is §63's own unexplored
  "per-overlay-local decl" -- and it refutes §20's "the DEF-conflict class is byte-proven
  unrecoverable by text transform" for the per-overlay case.
- MEASURED on the 14 clean candidates: 13 MATCH / 1 DIFF in the real TU.
- END-TO-END: func_8012CC88 banked whole-binary BYTE-IDENTICAL (stub gone per grep, not per report);
  R22 clean-fleet 140 passed / 0 failed of 140 -> the T1 blast-radius claim validated empirically
  (the difference from fix_header_decl, which broke 139/140 from the same per-binary green light).
- GATE A: 32/36 real decl errors (>=12) and 13/36 rtu-MATCH simulated (>=12). PASS.

Price stated honestly: a de-macroized bank is x1 -- full distinct-code credit, ~1/138 of instr.
2026-07-24 14:11:58 -06:00
Drew T bf307f2827 feat(phase-29): s15 propagation (5 cores ×138) + crack-wave efficiency audit
- 5 of the 6 s15 fresh cores propagated ×138 (func_801483E8/8014680C/8017129C/80177AD4/801759D8;
  func_8014A51C §20-capped). R22 clean-fleet 140/140. fn-count 88.66->88.86%, instr 79.4->79.6%,
  distinct-code count 64854->64860, dedup 1879/0.
- EFFICIENCY AUDIT (decision-log): the 2 LLM waves ran 92% match_one MATCH but only ~27% whole-binary
  bank; 6 spot-checked non-banks are ALL match_one MATCH (byte-correct bodies). NOT a missing idiom —
  an INTEGRATION wall (def-side sig / data-extern / unshared struct). We strand ~16 paid-for correct
  functions per wave; a fleet-safe integration-recovery pass would ~3.7× yield for 0 new drafting
  tokens. Next investment = integration tooling, not more drafting. Waves held per Drew.
2026-07-24 11:17:05 -06:00
Drew T 6253238c43 feat(phase-29): s15 fresh-crack wave — 6 more reach-138 cores banked (R22 140/140)
wave_binary over 24 fresh reach-138 ov_SC07_006 families -> 22 match_one MATCH / 2 near.
Whole-binary byte-gate banked 6: func_8014A51C func_801483E8 func_8014680C func_8017129C
func_80177AD4 func_801759D8. R22 clean-fleet 140/140 (engine_core.h reconcile edits verified
fleet-wide, §61).

- The s15 drafter-prompt fix HELD AT SCALE: all 24 winners persisted to the canonical path
  (vs s14's 3/24, recovered from transcripts). match_one isolation (per-pid --work) confirmed.
- Consistent integration ceiling: ~22 match_one MATCH -> 6 whole-binary banks (27%), same as s14.
  The 16 nears are def-side plumbing / data-extern / struct-def reconcile the gate ladder doesn't
  clear; fix_header_decl is off-limits (fleet-blind, §63 UPDATE). Integration recovery is the lever
  to improve before the next batch, NOT the drafter prompt.
- 6 genuinely-unmatched cores -> distinct-code movers (propagation follows).
2026-07-24 11:07:11 -06:00
Drew T f1fd8993bf feat(phase-29): permuter overnight harvest — 29 fresh cores banked + distinct-code 64837->64854
The grinder ran the targeted permuter sweep to EXHAUSTION (all 75 permuter-shaped candidates;
correctly skipped 1575 redraft/structural/integration). It banked 29 distinct functions autonomously
(gate_stage commit=True, byte-gated, fail-closed, §55b un-propagated), 39% conversion.

- All 29 are LOW-REACH (1-5) overlay-unique code in the 0x8017-0x8018 range — confirming the map's
  finding that the permuter-admissible set is the low-leverage tail (the high-reach near-misses like
  func_8014F3E8 close=1 reach=134 are redraft/structural, NOT permuter-shaped).
- Propagation of the 22 reach>1 banks filled only 1 (0x80180710 ×2); the rest are genuinely
  overlay-unique (siblings byte-diverge) — as predicted.
- R22 clean-fleet 140/140 (the 27 overnight per-binary-gated commits verified fleet-wide, §61).
- distinct-code 64837 -> 64854 (+17 unique fns); session total +22 unique (wave +5, permuter +17) —
  the first real distinct-code progress in many sessions. instr 79.4%, fn-count 88.66%, dedup 1874/0.
2026-07-24 09:39:07 -06:00
Drew T 323280ae1a feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 06:08:33 -06:00
Drew T d7c5b40bbb feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 06:07:59 -06:00
Drew T 4e90a814e3 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 04:51:02 -06:00
Drew T 085dc43037 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 03:14:31 -06:00
Drew T ee13e28407 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 03:13:57 -06:00
Drew T 2cdc63af23 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 03:13:23 -06:00
Drew T 73d6bd9d58 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:48:07 -06:00
Drew T 30ce33fe73 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:47:33 -06:00
Drew T 2de617c8ce feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:46:59 -06:00
Drew T e59bbb778b feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:46:24 -06:00
Drew T 7a9315497d feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:45:51 -06:00
Drew T 2348d64f6a feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:18:28 -06:00
Drew T 8d8afe6b44 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:17:54 -06:00
Drew T 231692b377 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:17:20 -06:00
Drew T 48662b0526 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:16:46 -06:00
Drew T be7d091935 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:16:12 -06:00
Drew T 68b9c54a8f feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:15:37 -06:00
Drew T 0c6fd1366a feat(decomp): grinder gate — +2 fns x0 propagated (fleet None%) 2026-07-24 02:15:03 -06:00
Drew T 74036d8996 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:06:14 -06:00
Drew T eb2cbd486f feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:05:41 -06:00
Drew T 0f9fb03c57 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:05:07 -06:00
Drew T 088bcb5cf9 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:04:33 -06:00
Drew T a5166af625 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:03:59 -06:00
Drew T 3bfcc117bc feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 02:03:25 -06:00
Drew T a10f70f091 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 01:41:28 -06:00
Drew T 0aff898d2b feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 01:04:20 -06:00
Drew T 272bd55099 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 01:03:46 -06:00
Drew T 46ea678bc6 feat(decomp): grinder gate — +1 fns x0 propagated (fleet None%) 2026-07-24 00:27:13 -06:00
Drew T 8ea5202135 feat(phase-29): propagate 1 fresh core ×138 + the session's FIRST distinct-code gain
Of the 6 s14 fresh cracks, func_80136F3C propagated ×138 (func_801749C8 dropped as an
ov_SC07_006 straggler; 4 are §20 local-type-capped — future uniquify fodder, low-value
de-duplication per the SESSION-14 finding).

THE POINT (byte-verified): distinct-code UNIQUE count rose 64832 -> 64837 (+5) — the FIRST
distinct-code movement all session. Every other lever today (154-type lift, 6 uniquify cores,
MATRIX rename) was de-duplication and moved distinct-code by 0. These 6 are genuinely UNMATCHED
cores, so banking them ×1 is real new coverage. Percentage is flat (67.6%, denom 87459) but the
direction and the count are the validation the pivot to fresh cracks was correct.

Fleet: instr 79.3 -> 79.4% | fn-count 88.61 -> 88.65% | distinct-code count +5 | dedup 1873/0.
R22 clean-fleet 140/140 BYTE-IDENTICAL.
2026-07-23 22:58:47 -06:00
Drew T e9c950a30c feat(phase-29): fresh-crack wave s14 — 6 reach-138 cores banked ×1 in ov_SC07_006 (R22 140/140)
Ultracode wave_binary over 24 FRESH (unmatched, live=138) ov_SC07_006 families -> 20 self-reported
match_one MATCH. The whole-binary byte-gate (sole arbiter, R14/G3) banked 6:
  func_8014C6F4 func_801463A0 func_8012B77C func_80136F3C func_80156670 func_801749C8
The gap (20 claimed -> 6 banked) is the integration wall the drafters named: §63 header-decl
(void->s32), data-extern reconcile, struct-guard — a recovery pass follows. R22 clean-fleet 140/140
(the gate_stage ladder's engine_core.h reconcile edits verified fleet-wide, not just per-binary).

These are GENUINELY UNMATCHED cores (unlike the session's earlier propagation work), so once
propagated ×138 they move distinct-code — the metric that sat flat at 67.6% all session.

⚠️ WORKFLOW RECOVERY: the 24 drafters reported MATCH but wrote winners under scratch filenames;
only 3 func_<name>.c persisted. All 24 were recovered from the per-agent transcripts (Write calls
+ Bash heredocs) -> .run/drafts-s14r/. wave_binary.js drafter prompt hardened to force a copy-back
+ existence check as the mandatory final step so a future wave can't lose its winners this way.
2026-07-23 22:44:58 -06:00
Drew T d1a1d756e0 fix(phase-29): PsyQ MATRIX name hazard — the true 32B layout now owns the canonical name (R22 140/140)
Oracle (G1, Ghidra types get, /LIBGTE.H, psyq400.gdt): MATRIX = 32 bytes (short m[3][3] @+0x00,
long t[3] @+0x14, 2B pad after m); SVECTOR = 8B; VECTOR = 16B (long vx,vy,vz,pad).

- HAZARD CONFIRMED: the fleet-wide name `MATRIX` held {s32 m[3][3]; s32 t[3]} = 48 BYTES, not a PsyQ
  type at all, while THREE other names (MATRIX_c1, MATRIX_c2, MATRIX2) held the true 32B layout. The
  canonical name carried an invention; any future reader assuming PsyQ semantics would be misled.
- FIXED by pure consistent rename across 205 files: 48B invention -> MATRIX_L48 (KEPT — ~131 files are
  byte-correct against it, and "fixing" it to 32B would change sizeof/array stride hence codegen);
  the true 32B layout now owns MATRIX. R22 clean-fleet 140/140 BYTE-IDENTICAL.
- VECTOR left UNCHANGED on purpose: ours is 12B vs PsyQ 16B (missing trailing pad). I first called it
  dead — wrong, it has 1 live use (engine_core.h gte_ldlv0((VECTOR*)sp)). Offsets already agree so a
  fix is likely byte-neutral, but it is a LAYOUT change and bundling it with a rename would make an
  R22 failure ambiguous. Own R22-gated commit, later.
- engine_types.h gains an oracle-sourced GROUND-TRUTH block: real PsyQ layouts, which of our names are
  true vs invented, why MATRIX_L48 must not be "corrected", and the draft-time rule (address-suffix
  anything you invent — 7 of the 8 collisions this fleet accumulated were bare generic names).
- SCOPE HELD: renamed + documented; did NOT force existing code onto real PsyQ definitions.
2026-07-23 21:35:07 -06:00
Drew T 22af9ab2c5 feat(phase-29): 3 Vec8-freed cores ×138, R22 140/140 — and the honest ROI verdict on the cap
- Propagated 0x8012A464 / 0x8014FFDC / 0x801502EC -> 138/138 byte-identical, 0 stragglers, 3 new
  groups. R22 clean-fleet 140/140; dedup 1872/0; C1 237654/237654.
- FINDING (R14/R31): the §20 propagation cap was gating source-level DE-DUPLICATION, not coverage.
  The whole uniquify campaign (Buf+MATRIX+Vec8, 223 files renamed, ~1559 copies stripped, 5
  propagations, 4 R22 cycles) moved the fleet by +6 functions / +558 ins / -6 stubs and 0.00pp on
  all three headline metrics. The freed cores' members were ALREADY matched individually;
  propagation just consolidated them into shared macros. "Unblocked" != "unmatched".
- SESSION ATTRIBUTION: of -837 stubs / +0.3pp instr / +0.23pp fn-count, -831 stubs came from the
  FIRST batch (broad lift -> 13 cores). The uniquify campaign contributed -6.
- Roadmap B4 re-labelled: a maintainability item, not a coverage lever. Remaining camps
  (Handler/Blk8/V8/Prim/Prim_8016E7C8) are small and now known low-yield — opportunistic only.
- distinct-code sat at EXACTLY 3811442/5634875 = 67.6% at open and close. Fresh cracks are the sole
  mover of that number; point the next session there.
2026-07-23 21:25:39 -06:00
Drew T 23b9b57505 feat(phase-29): uniquify+lift Vec8 camps + propagate 0x8012E778 ×138; blocked queue 10 -> 7
Two units, committed together because they touch overlapping overlay .c files.

- PROPAGATE: 0x8012E778 (freed by the MATRIX uniquify) -> 138/138 byte-identical, 0 stragglers,
  1 new dedup group.
- Vec8 UNIQUIFY+LIFT: camp1 {s16 unk0,unk2,unk4,unk6} (8 bytes) x139 files -> Vec8_c1; the 180-file
  {s32 w[8]} (32 bytes) majority keeps the name. These are two genuinely DIFFERENT types that had
  been sharing one identifier across TUs of the same overlay — the case §64a exists for; reconciling
  them to one layout would have merged a 32-byte and an 8-byte struct. Both camps lifted, 319 local
  copies stripped.
- Pre-filtered on an overlay from each camp, then R22 clean-fleet 140/140 BYTE-IDENTICAL.
- Blocked core queue 10 -> 7 (0x8012a464, 0x8014ffdc, 0x801502ec freed). Session arc 13 -> 7 via
  uniquify (Buf -> MATRIX -> Vec8). Remaining camps all small: Handler, Blk8, V8, Prim, Prim_8016E7C8.
2026-07-23 21:15:58 -06:00
Drew T 72b7a7227a feat(phase-29): uniquify+lift the MATRIX camps — 77 files renamed, 655 stripped, R22 140/140
- uniquify_type --type MATRIX: camp1 {short m[3][3]; long t[3]} x71 jr-split TUs -> MATRIX_c1;
  camp2 {short m[3][3]; short pad; s32 t[3]} x6 -> MATRIX_c2; the 578-file {s32 m[3][3]; s32 t[3]}
  majority keeps the name. All three camps then single-def -> LIFTABLE -> lifted (655 local copies
  stripped).
- Pre-filtered on one overlay from EACH camp (ov_SC01_000 / ov_SC01_077 / ov_SC06_033) — a
  pre-filter is evidence only about what it filtered — then R22 clean-fleet 140/140 BYTE-IDENTICAL.
- Blocked core queue 11 -> 10 (0x8012e778 freed; propagation follows separately per §55b).
- NB: the R22 job was reported by the harness as exit -1 (session fork killed the shell wrapper
  after make completed). Verdict taken from the log's terminal "check-all: 140 passed, 0 failed of
  140", which is only emitted on completion. Read the gate's output, not the wrapper's exit code.
2026-07-23 21:05:35 -06:00
Drew T e393c320e6 feat(phase-29): VARIANT camps -> UNIQUIFY (not reconcile); validated on Buf, R22 140/140 (§64a)
MEASUREMENT CORRECTED THE PLAN. The checkpoint called for a "per-camp field-access reconcile";
measuring the camps refutes that: Vec8 = {s32 w[8]} (32B) in 180 files AND {s16 unk0..} (8B) in
139 files; MATRIX 48B/32B/32B; Buf 16B / 0x20+ / DrawEnv. These are DIFFERENT types sharing an
identifier across TUs of the same overlay — reconciling to a canonical layout MERGES them, the
same failure that broke 103 binaries on Prim. The right op is UNIQUIFY: rename the non-majority
camp (byte-neutral — a type name emits no code; TU-local by construction), which makes every camp
single-def and liftable by the existing lift_types rules.

- NEW tools/uniquify_type.py: deterministic camp ordering (file-count desc, then normalized text,
  so re-runs assign the same suffixes); majority keeps the name, camp n -> <T>_c<n>; rewrites ONLY
  files that DEFINE that camp (a file that merely USES the name gets it elsewhere and is untouched);
  \bT\b word boundaries so `Buf` never matches `Buf80153978`.
- VALIDATED on Buf (578/6/1 files): 11 identifiers across 7 files -> 3 camps LIFTABLE -> lifted
  (585 local copies stripped) -> R22 140/140 -> blocked core queue 13 -> 11 (0x8012ea90, 0x801749c8
  freed). Propagated 0x8012EA90 ×138; 0x801749C8 dropped (straggler in ov_SC07_006).
- YIELD, HONESTLY (P9): ZERO new matched functions. fn-count 88.61% / instr 79.3% / stubs 40281 all
  UNCHANGED; dedup 1867->1868, C1 +138. 0x8012EA90's members were ALREADY matched in all 138
  overlays — the propagation consolidated duplication into one shared macro (DRY), not coverage.
  The value is the PROVEN RECIPE + the queue moving 13->11, not the numbers.
- dedup_propagate (R32): the skip line printed a COUNT and no names, and aggregated three unrelated
  causes into n_local — a body skipped merely for a `//` comment (macro-unsafe, 1-line fix) read
  identically to one genuinely using an overlay-local type. Now named and split by cause.
- cookbook §64a (uniquify-vs-reconcile + the validated recipe + remaining camps by cost).
2026-07-23 20:51:42 -06:00