Commit Graph

163 Commits

Author SHA1 Message Date
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
Drew T 3642b5458a feat(phase-29): the type-lift's payoff — 13 cores propagated ×138, −831 stubs, R22 140/140
With the §20 local-type cap lifted (commit:0863), dedup_propagate --auto-from planned 17
self-contained cores that were previously skipped "not self-contained (local types)".

- BANKED: 12 cores via --auto-from + func_80175308 (propagated separately, 138/138) = 13 ×138.
  func_80175308 is the PROVABLE unblock — the core the SESSION-13 checkpoint named as
  local-type-blocked. No claim is made that all 17 were unblocked by the lift; measuring that
  needs a pre-lift re-scan I did not run (P9).
- 5 correctly DROPPED as cross-overlay stragglers (0x8012A018, 0x80172C50, 0x80173A60,
  0x80144090 in ov_SC01_000; 0x801495C4 in ov_SC07_006): h_exact sharing is all-or-nothing and
  those overlays' bytes diverge. --recover NOT used (the documented quadratic thrash hazard).
- GATES: R22 clean-fleet 140/140 BYTE-IDENTICAL (2nd full cycle this session); make report green;
  dedup-check 1854 -> 1867 validated / 0 failed, C1 236964/236964; 0 NON_MATCHING (G4).
- FLEET: instr 79.0 -> 79.3% | fn-count 88.38 -> 88.61% | INCLUDE_ASM stubs 41112 -> 40281 (-831).
  distinct-code stays 67.6% — correct: propagation replicates already-distinct-matched code;
  only a fresh crack moves that number.
- STILL BLOCKED: 13 cores "not self-contained (local types)", blocked by exactly the 8 deferred
  VARIANT entities (MATRIX 3-def, Buf 3-def, Vec8, Prim, Handler, Blk8, V8, Prim_8016E7C8).
  Next lever = a per-camp FIELD-ACCESS RECONCILE, not a lift (lifting them blindly is what broke
  103 overlays earlier this session).
2026-07-23 20:18:50 -06:00
Drew T 5ab80517de feat(phase-29): broad §20 type-lift lands — 154 types fleet-wide, R22 140/140 (§64)
The 3-session-carried blocker ("needs collision-vetting + -O0 strip precision") was
misdiagnosed on all three counts; fixing the instruments first (R35) changed every answer.

- (1) the "case-variant collision" is a TAGGED TYPEDEF counted twice with OVERLAPPING spans:
  the inner span starts at `struct` so it emits a VARIABLE definition, the alias is redeclared,
  and the highest-first strip leaves the outer end offset STALE -> over-deletes past the span.
  MEASURED 13 pairs / 6142 occurrences / 0 standalone tags. build_engine_types.resolve_type_defs()
  is now the ONE shared model (R33) + assert_disjoint() enforces span disjointness (R32).
  The case-insensitive exclude was a heuristic over a structural fact — it would also have
  wrongly dropped the legitimate Obj/obj + Vec/vec pairs. Key by (kind, name) — the C namespace.
- (2) the "-O0 strip precision" bug is a VISIBILITY bug: ov_SC01_077_o0.c is the 1 TU of 3226
  that deliberately omits engine_core.h, so the strip DELETED its types; `multiple definition of
  D_801DAA08` was 3 steps downstream (undeclared -> parse error -> implicit int -> tentative def
  -> link collision) and named a symbol no diff touched. bet.type_visible() derives the visible-
  header set from the include graph and keeps such defs local, named.
- (3) a third blocker, introduced this session and caught by R22: --candidates classifies per
  ENTITY but emits per NAME, so passing `Prim` dragged in the deferred VARIANT `typedef Prim` and
  repointed 103 overlays at the header's different layout. Compiled clean, per-binary pre-filter
  green, R22 37/140 — the 103 failures were EXACTLY the 103 Prim-stripped overlays (set equality).
  Fixed by the strip invariant "remove a local def only if what becomes visible is TEXTUALLY
  IDENTICAL", placed at the MUTATION so a selector bug cannot reach the source.
- lift_types.py: (kind,name) entity keying, --candidates derived selector (retires the ad-hoc
  102-type pipeline), divergence + visibility reports, whole-line strip (411 whitespace-churn
  lines -> 0), complement-based single-pass rewrite (no mid-loop offset mutation).
- RESULT: 154 types lifted, 2958 files stripped, engine_types.h +510 lines. R22 clean-fleet
  140/140 BYTE-IDENTICAL; tools-health OK (corpus 0/0, cdecl ALL GREEN, audit-binaries 140,
  dedup-check 1854/0, C1 235170/235170); 0 NON_MATCHING (G4). Metrics unchanged 79.0/67.6/88.38
  — honest: a type-lift banks no functions, it unblocks the NEXT propagate.
- DEFERRED + NAMED: 8 VARIANT entities (MATRIX 3-def, Buf 3-def, Vec8, Prim, Handler, Blk8, V8,
  Prim_8016E7C8) = the per-camp field-access reconcile, the remaining hard part of roadmap B4;
  14 carried tags; 5 types kept local in the -O0 TU.
- cookbook §64 (the three laws + the pre-filter lesson: a pre-filter is evidence ONLY about what
  it filtered — ov_SC01_077 passed the Prim-broken run too; pre-filter on a binary that FAILED),
  decision-log (R31), CURRENT_PHASE.md log.
2026-07-23 19:54:19 -06:00
Drew T b3597c08e0 feat(phase-29): 2 §20-unblocked cores propagated x138 (+276) via the type-lift
func_8012B4B8 + func_8012E138 — freed by the Mat32/Cam8012E138 fleet lift
(commit:0859) — propagated x138 (live 138->0 each, +276 stubs). R22 clean-fleet
140/140. No --recover needed (clean h_exact).

decision-log: the §20 type-lift is safely executable when SCOPED to clean types
(lift_types.py + R22); classify-first, lift the 1-def/copy-only-variant types now,
defer the fleet-split variants (MATRIX/Vec8/Buf/M8) to a per-camp reconcile pass.
2026-07-23 18:04:44 -06:00
Drew T b921c00912 feat(phase-29): lift_types.py — fleet-wide §20 type-lift; Mat32+Cam8012E138 lifted (R22 140/140)
Builds tools/lift_types.py: targeted fleet-wide lift of a SPECIFIC type list into
src/shared/engine_types.h, using build_engine_types' brace-aware parser (NOT the
[^;]* regex that under-counted multi-field structs — R35, caught twice). It picks
each type's CANONICAL (majority) def across the fleet, writes it once to the header,
strips every local copy, and reports variant overlays. The whole-binary gate (R22)
is the byte-arbiter.

Applied to the 2 CLEAN types the §20-blocked fresh-138 cores need:
- Mat32 (138 canonical + 1 copy-only draft variant in ov_SC07_006) + Cam8012E138
  (unique) -> lifted, 139 local copies stripped. R22 clean-fleet 140/140.
- Unblocks func_8012B4B8 + func_8012E138 for x138 propagation (next).

DEFERRED (variant-heavy, high-risk — fleet genuinely split): MATRIX (3 defs), Vec8
(2 near-even 180/139), Buf (3), M8 (2) — lifting them would force ~929 files to one
camp's field layout and break variant field-access. Needs a per-camp reconcile pass.
func_80175308/func_8012A1BC still blocked (need those or other types).
2026-07-23 17:54:14 -06:00
Drew T 1dd80e9287 feat(phase-29): ov_SC07_006 fresh-138 — 2 cores propagated x138 (+274) + integration-wall finding
Propagation of the 7 fresh-138 cores banked in commit:0855. Only the 2 self-contained
ones cleared all three integration walls:
- func_80130C08 x138, func_80137178 x138 (+274 stubs). R22 clean-fleet 140/140.

The other 5 are blocked, each by a different integration wall (drafting was solved —
all 7 bodies byte-matched; INTEGRATION is the bottleneck):
- func_8012B4B8/func_80175308/func_8012E138/func_8012A1BC: §20 local-type
  propagation cap ("not self-contained") — need build_engine_types type-lift to
  propagate x138 (roadmap B4; ~+552 stubs when unblocked). Stay x1.
- func_80169228: per-member divergence (whole SC03 cluster byte-diverges) — a
  genuine partial family; --recover thrashes it (killed + reverted). Stays x1.

decision-log: fix_header_decl fragility correction (shared multi-caller decls break;
gate_stage's call-site-cast is the integration spine, not header-decl rewriting).
2026-07-23 17:07:29 -06:00
Drew T 3c8fd8a0b0 feat(phase-29): ov_SC07_006 fresh-138 wave — 7 x1 core banks (gate_stage reconcile)
Crack wave w9lidyi5b (24 fresh LIVE=138 families): 20 self-assessed MATCH, 3 near.
Banked x1 (R22 clean-fleet 140/140):
- 2 self-contained via plain harvest_verify: func_8012B4B8 (§52b-wall crack),
  func_80169228.
- 5 via gate_stage's reconcile ladder (cast_call_sites in the draft's own TU):
  func_80175308, func_8012E138, func_80130C08, func_8012A1BC, func_80137178.

Correction (decision-log follow-up): fix_header_decl v1/v2 is FRAGILE for shared
multi-caller decls — rewriting an engine_core.h decl breaks callers that use the
return differently (CC1-FAIL). func_8014CD80 was a lucky single-caller/ignored-return
case. gate_stage's call-site-cast is the right tool for multi-caller plumbing (banked
5 where fix_header_decl broke the build). Remaining ~13 near/deeper-plumbing drafts
staged in .run/drafts-sc07006-fresh/. Propagation x138 next.
2026-07-23 13:55:29 -06:00
Drew T 7f18dbad2f feat(phase-29): func_8014CD80 x138 — the fresh-138 def-side blocker is RECOVERABLE (R35 reversal)
Bounded probe (SESSION-13, token-free) that REVERSED the same-session "fresh
reach-138 well is spent" verdict. Target func_8014CD80: 138 live, 0 matched, NO
DEFINE macro, a universal body (only universal callees + param offsets, zero
overlay-local D_* refs), clean MATCH draft from batch-1.

- Blocker was a def-side header decl: engine_core.h DEFINE_func_8014CD0C()
  forward-declares it `void func_8014CD80(s32,void*,void*)` while the byte-true
  def is `int func_8014CD80(s32,u16*,u16*)`. gate_stage's arity pre-pass is
  param-COUNT-only (misses return/ptr-type); §54 reconcile_def_sig fixes the
  wrong direction.
- One byte-neutral header edit (void->int, void*->u16*; call site passes u16[3]
  arrays + ignores the return -> codegen unchanged) -> harvest_verify banked x1
  BYTE-IDENTICAL -> dedup_propagate --addr propagated 138/138 overlays
  byte-identical (live 138->0) -> R22 clean-fleet 140/140.
- Fleet 78.7->78.8% instr, 88.22->88.26% fn-count from this one family;
  tools-health green (dedup 1851/0).

Quantified market (decision-log 2026-07-23): of the 75 fresh (>=100-live)
families, 46 carry an engine_core.h caller forward-decl, 38 SIMPLIFIED = the
func_8014CD80 pattern -> each a candidate x138 (~+1.5-2.8pp instr). NEXT: build
tools/fix_header_decl.py + a fresh-family wave. func_80165CA0's 0/135 was a
non-universal BODY (different failure mode), not this blocker.
2026-07-23 12:06:26 -06:00
Drew T 57ef4ebcb5 feat(phase-29): ov_SC07_006 reach-138 batch-1 propagation + live-count re-scope (SESSION-13)
Propagation of the 6 batch-1 x1 banks (§55b: banks committed first in commit:0848,
then targeted propagate as a standalone step):

- dedup_propagate --addr: func_801325B8 -> +3 onboarded-tail siblings
  (ov_SC07_007/010/011). func_8014A048/func_801678F0 byte-diverge in the SC07
  cluster (kept x1); func_8014FE60/func_80167540 local-type-blocked §20 (x1).
- func_80165CA0: consolidated its h_exact subgroup (dedup group registered, +0
  new), then family_sweep --hseq 0/135 — a PER-MEMBER WALL (cf func_80133AB0
  0/136). The x135 "fresh family" prize does not exist here.
- Net batch-1 yield ~9 newly-matched functions; fleet 78.6->78.7% instr, distinct
  flat; ov_SC07_006 84.6->84.8%. R22 clean-fleet 140/140; tools-health 1850/0.

The finding (R14/R35, decision-log 2026-07-23): nins*reach leverage over-counts —
rank by LIVE-siblings. build_wave_args.py --rank live now ranks by the true lever
and reports the fresh(76)/onboarded-tail(44) split. The reach-138 family well is
largely SPENT via wave+gate; the fresh families are the hard tail (def-side
plumbing/DIFF/per-member walls), not free x138 fuel.
2026-07-23 11:43:28 -06:00
Drew T b76ad85157 feat(phase-29): ov_SC07_006 reach-138 crack-wave batch-1 — 6 x1 banks
Option (b) from the SESSION-12 checkpoint: fresh-exemplar crack-wave on the
P27-onboarded ov_SC07_006 (84.6% -> 84.8%). New reusable builder
tools/build_wave_args.py emits wave_binary.js args from a fuel manifest.

- Drafting wave (wave_binary.js, 24 xHigh drafters over the top-24 reach-138
  WAVE families by leverage): 16 self-assessed MATCH, 8 hit the session usage
  limit (redraft later).
- Byte-gate: plain harvest_verify banked 2 (func_801325B8, func_80165CA0);
  gate_stage reconcile ladder (arity pre-pass + cast/sig_unify) banked +4
  (func_8014FE60, func_8014A048, func_801678F0, func_80167540). 7 near, 6
  reconcile-fail, 2 CC1-FAIL, 2 DIFF (the incomplete session-limit drafts).
- R14/R35 leverage reality-check: nins*reach over-counts. 5 of 6 are already
  matched in ~135 overlays (only the onboarded SC07 tail ov_SC07_007/010/011
  is live, +2-3 each). func_80165CA0 is a TRUE fresh family (135 live) — the
  x135 sweep prize, propagated next.
- R22 clean-fleet 140/140 (engine_core.h arity edit fleet-safe); tools-health
  green (dedup 1849/0). Propagation is the next commit (§55b: banks first).
2026-07-23 10:51:36 -06:00
Drew T 11a22b5c77 feat(phase-29): func_80167714 propagated ×134 (h_exact; 4 SC07 byte-diverge, kept ×1) 2026-07-22 15:18:58 -06:00
Drew T 64bfe59bc0 fix(phase-29): gate_stage gated EVERY non-077 binary against ov_SC01_077's SHA — one-line default, one month
THE BUG (tools/gate_stage.py main(), introduced commit:0181, 2026-06-21, Phase 21 T3):

    good_sha=a.good_sha or DEF_SHA,      # DEF_SHA = ov_SC01_077's locked hash

DEF_SHA is TRUTHY, so it beat run_gate's per-binary lookup
(`good_sha or _check_sha(binary) or DEF_SHA`) and made that lookup DEAD CODE on
every CLI invocation. gate_stage therefore BUILT one binary and compared it to a
DIFFERENT binary's hash: it can never match, every draft reports as "near", and
NOTHING COULD EVER BANK outside ov_SC01_077 from the CLI. A "near" is
indistinguishable from a genuine codegen residual, so the failure looked like a
compiler wall for a month.

WHY IT HID: the programmatic callers take a different path and were all correct —
grinder/idiom_hunt pass good_sha=None (per-binary lookup), lora_grind/bulk_harvest
pass an explicit per-binary sha, orchestrator is 077-only where DEF_SHA is right.
That is exactly why the grinder banked func_80181F78 in ov_SC03_014 (Task 13B)
while my CLI ladder banked 0/10 on the same tree. Two paths disagreed for a month
and nothing compared them (R34's lesson, from the inside).

BLAST RADIUS, MEASURED (not assumed): 0 of 6,708 backlog records come from the
affected path — by source: worker 2724 / bulk-harvest 2275 / lora-grind 766 /
grinder 522, all correct. THE BACKLOG NEEDS NO RE-RUN. The void verdicts are the
manual CLI gates on non-077 binaries, i.e. exactly the Task-5 wave's "the gate
banked ZERO" on 12 preserved cracks — never a codegen finding at all.

FIXED: pass a.good_sha through; run_gate reads config/check.<bin>.sha (R33).
VALIDATED end-to-end: the raw draft that produced {banked:0, near:1} now gives
{banked:1}.

RE-RUN RESULT — 7 of the 12 preserved t5wave cracks are now banked:
  func_8018F694 (478) · func_8019059C (673) · func_80135A4C (181) ·
  func_80135888 (113) · func_80135D20 (100) · func_801749C8 (105) ·
  func_801299C8 (158, was filed "PLUMBING: prototype declaration")
STILL BLOCKED (5, believed genuine): func_8012AAAC, func_80135260, func_801365B8,
func_80165CA0, func_80191C50.

⚠️ SUPERSEDES the earlier retraction: the "0/10 ladder" was not vague interference
— it was the gate comparing against the wrong binary's hash. Task 14 stages 2-3
were priced against a number that could only ever have been zero.

- R22 clean-fleet 140/140 BYTE-IDENTICAL; all 6 verified stub-free
2026-07-22 14:12:32 -06:00
Drew T 1074f2f202 feat(phase-29 Task-14 stage 1): the ARITY pre-pass — and the shared-state constraint it cost
DIAGNOSED, not assumed. The 12-draft integration probe banked 1/12 and reported the SAME
label for 10 of the 11 failures: `conflicting types for built-in function 'memcpy'` — the
§58 red-herring (a WARNING, from an unrelated TU position). Splicing three top-reach
failures individually and reading real cc1 stderr gave the actual causes:
  conflicting types for `func_XXXX'     3/3   <- loose-typing ARITY conflict
  redefinition of `struct V8'                 <- a SECOND class (type-lift), stage 2

A banked shared caller macro in engine_core.h declares the function with FEWER params than
its byte-true definition takes (the original calls K&R-style with fewer args than the callee
reads); a C89 prototype makes that a hard error. tools/fix_arity_callers.py --any-proto
already fixes it and was simply NEVER WIRED into gate_stage's ladder (only family_sweep
carried §57). Now wired as a TU-side pre-pass.

MEASURED: 2 of 7 top integration candidates banked (func_8016EFC8, func_80164418, both
reach-138) vs the 1/12 old-ladder baseline. R22 140/140; tools-health OK (dedup 1848/0).

INCIDENT — this stage BROKE 138/140 AND R22 CAUGHT IT (nothing was ever committed):
pairing `--apply --any-proto` with `--revert` for the unbanked drafts corrupted declarations
fleet-wide. `--revert` rewrites ()->(void), which inverts a PLAIN apply but NOT --any-proto,
so an unbanked fn whose real decl was `extern void func_801708B0(void *a0)` came back as
`(void)` — in engine_core.h (included by all 138 overlays) and 6 sites in ov_SC01_077's own
sources. harvest_verify --binary ov_SC01_077 reported BYTE-IDENTICAL and was RIGHT about that
binary; the other 137 were structurally invisible to it. Repaired to the exact lines.

ROOT CAUSE FIXED: the ladder now snapshots every file the pre-pass touches and undoes by
RESTORE + re-apply-for-the-banked-set-only — exact by construction, cannot invent a signature.

NEW HARD CONSTRAINT (cookbook §61): any ladder stage mutating SHARED state must be undone by
snapshot restore, never an inverse transform, and validated FLEET-WIDE (R22) rather than by
the per-binary gate that authorised it. §55b's propagation law, one level down. The planned
type-lift stage edits engine_types.h and inherits it by default.

ALSO FIXED: the first wiring passed only --drafts (the narrow-param FILTER) without the
required --funcs, so the stage exited `no funcs given` as a SILENT NO-OP and the gate reported
0/6 as though diagnosed. sh() does not raise on non-zero exit -> explicit rc check added.
2026-07-21 18:19:04 -06:00
Drew T 5c894c1e62 feat(phase-29 Task-13B): func_80141B90 x138 + the reach repricing + the length profile
PROPAGATION (§55b, its own targeted batch): dedup_propagate --addr 0x80141B90 --recover
-> "138 overlays byte-identical after propagation"; 117 remaining stubs -> 0; 1 new
dedup group. This was the ONLY one of the 21 directed-run banks worth propagating.

THE REPRICING (R14 — measure a bucket's VALUE, not just its conversion rate):
the directed run converted 27% (21/77) but moved the fleet ~0.03pp, because h_exact
reach of the 21 is: func_80141B90=138, TEN at reach-1 (nothing to propagate), rest 2-10.
Instruction-weighted, the ENTIRE permuter bucket is worth ~0.36pp at 100% conversion.
The mechanism is validated; the fuel was small. Priced frontier (ins-weighted / 13.08M):
  LENGTH-DRIFT |d|<=2   472,178  ~3.6pp  (339 fns)   <- the real permuter-adjacent lever
  integration           419,162  ~3.2pp  (305 fns)   <- Task 14's ladder
  WIDTH                  71,593  ~0.55pp (45)
  permuter (current)     46,571  ~0.36pp (74)
  BRANCH-POLARITY         9,462  ~0.07pp (22)
So WIDTH/BRANCH-POLARITY are NOT worth prioritizing; my earlier "~200 candidates"
framing undersold LENGTH-DRIFT 10x and oversold WIDTH.

NEW: permuter_weights._LENGTH profile (perm_temp_for_expr/perm_expand_expr are the only
passes that change instruction COUNT; the reorder/decl-order levers that dominate the
regalloc+schedule profiles cannot, so they are down-weighted here) + residual_class
._drift_route (|d|<=2 -> permuter/`length`, larger stays structural — same class,
opposite tool) + classify() accepts a PROFILE NAME directly (the measured profile beats
re-parsing a free-text label). 17 unit tests green.

grinder: --profile filter (probe ONE residual class's conversion) + a PERSISTENT attempt
ledger. `tried` was in-process only, so every fresh --once run re-permuted the previous
run's losers — the permuter is deterministic given (base.c, target.o), so that CPU can
never produce a new win. Measured: a 20-target probe drew 19 already-tried targets.
Keyed by draft_sig so an improved draft legitimately re-opens the function.
2026-07-21 15:05:56 -06:00
Drew T bffbb8b9b7 feat(phase-29 crack-wave3): func_8016B234 + func_8016C998 banked ×1 in ov_SC01_077
- func_8016B234: §58b self-def — engine_core.h func_8016B234 (void)->() no-proto
  (byte-neutral: only 0-arg callers fleet-wide); typedef preamble stripped.
- func_8016C998: §59(1) local struct rename Slot/Blk32->Slot_998/Blk32_998
  (collide with TU's Slot) + D_801D9CA0 extern moved to block scope (TU's other
  decls of it are all block-scope; a file-scope one collided).
R22 clean-fleet pending (engine_core.h touched).
2026-07-19 11:47:54 -06:00
Drew T 2605f206d3 feat(phase-29 crack-wave): func_80150170 ×138 dedup-propagate (+137, 138/138)
The hexR=138 dedup core (banked ×1 in commit:0716) -> dedup_propagate --addr
0x80150170 --source-overlay ov_SC01_077 --recover: 138 overlays rebuilt
byte-identical, 1 new group registered in config/dedup.us.yaml (0 stubs left).
~+13k ins (95 ins × 137 new members). (First attempt SIGTERM'd mid-gate at the
2-min timeout -> reverted the half-gated state, re-ran clean fail-closed.)
2026-07-18 23:15:06 -06:00
Drew T c9e12a079b feat(phase-29 crack-wave): +6 cores banked ×1 in ov_SC01_077 (R22 140/140)
Ultracode 11-core crack-wave over the freshly-regenerated draftable structural
frontier (R35: the Jul-14 manifest still listed already-banked families). 9
match_one MATCH / 2 near; 6 of 9 banked whole-binary byte-identical.

Banked (ov_SC01_077, ×1 — ×138 sweep deferred, Drew paused after the bank):
- func_80150170 (95, hexR=138 dedup core) — engine_core void->s32 narrow
- func_8016D1D8 (148) — data-label + typedef-scope
- func_8016D688 (60)  — data-label (D_801D9C20)
- func_80165240 (63)  — normalize_self_decls (caller-decl -> void(void*x3))
- func_80164E40 (25)  — engine_core void->s32 narrow
- func_801457A4 (79)  — -O0 (relocated into _o0b object)

- engine_core.h: 3 decls narrowed void->s32 (byte-neutral fleet-wide; callers
  ignore the return) — R22 clean-fleet 140/140 confirms neutrality.
- config/symbols.ov_SC01_077.txt: D_801D9C20/60 u8 data-label mirror so a
  re-extract re-emits the labels the D1D8/D688 banks reference (R22 corollary;
  fixed a type:data->type:u8 splat-format bug that broke ov_SC01_077 extract).
- 3 NOT banked (801549F8, 8013BD74, 8013C0F8): all match standalone, blocked
  ONLY by the §8 jtbl-rodata carve (NOT codegen; C0F8 was NOT a real DIFF).
- .run/giants: 2 near (8014D820 close-11 intrinsic-sched, 8012E364 close-22)
  + the 3 jtbl-blocked drafts preserved (R20).

R22 clean-fleet: 140/140 byte-identical; tools-health OK (dedup 1846/0,
C1 234205/234205); 0 NON_MATCHING linked (G4). Fleet 75.2/60.6/87.04 (flat —
×1 banks; the ×138 sweep is the deferred fleet-mover).

cookbook §58 (R30): match_one MATCH != bank — it compiles standalone so it is
blind to (a) Ghidra symbol names, (b) def-sig conflicts vs the fleet, (c)
callee-decl conflicts, (d) -O0-vs-O2; crack-wave drafts need a reconcile pass.
2026-07-18 22:58:15 -06:00
Drew T 53433df1b3 feat(phase-29): func_8013D53C 14/137 + NSD hardened (rewrite-to-canonical, (void) fix) + Cmd lift
- func_8013D53C: NSD (self-decl caller-thread) + a byte-neutral Cmd_8013D53C type-lift clear the plumbing
  -> 14/137 h_seq members bank; 123 have genuine per-member codegen DIFFs (hard cse.c-wall crack -> permuter
  fuel). Reverted the 123 bankless byte-neutral NSD edits (churn on matched code, §57a NB).
- NSD hardened, 2 bug-fixes validated on D53C: REWRITE the divergent decl to canonical instead of DROPPING
  it (drop broke def-after-caller forward visibility -> 'func undeclared'); and '(void)' is a genuine 0-param
  conflict, not skippable like a true no-proto '()' (the bug that filed D53C's arity class as 'not this pass').
- earlier this session: broad --fix-def-sig sweep = HONEST +137 only (staging != banking, R14/R35); NSD is
  SURGICAL-ONLY (broad application poisons whole groups; --fix-def-sig is broad-safe). cookbook §57a.
- R22 clean-fleet 140/140 byte-identical; tools-health OK (dedup 1846/0, C1 234205/234205); 0 NON_MATCHING (G4).
  fleet 75.2% instr / 60.6% distinct / 87.04% fn-count. session-total from 74.6: +0.6pp instr, ~+421 members.
2026-07-18 20:30:43 -06:00
Drew T 65c93ea035 feat(phase-29 type-lift): func_8016CBC0 family 1->138/138 (+137) via the 6-typedef engine_types.h lift
- func_8016CBC0's 137 members were NOT self-decl-blocked (§57 survey: 0 divergent self-decls) but blocked
  on the exemplar's 6 LOCAL typedefs (Rec_/Blk_/SVEC_/CLR_/Poly_/Mtx8_8016CBC0). Lifted all 6 verbatim into
  src/shared/engine_types.h (fleet-visible via engine_core.h) + removed the locals from the exemplar TU.
  No fleet name-collision; exemplar rebuilds byte-identical d19c9580 (the type-lift is byte-neutral).
- family_sweep --hseq --only 0x8016CBC0 --no-preclassify --normalize-self-decls -> 137/137 banked, 0 failed
  (the decl-normalize stage a correct no-op here — 0 self-decls). 0 func_8016CBC0 stubs remain fleet-wide.
- R22 clean-fleet 140/140 byte-identical; tools-health OK (dedup 1846/0, C1 234205/234205); 0 NON_MATCHING
  linked (G4). fleet 74.9->75.1% instr / 60.1->60.6% distinct / 86.96->87.00% fn-count.
- R14 lesson: two families that both looked like a 'stuck 137-family' needed DIFFERENT levers
  (decl-normalize §57 vs type-lift) — route by the real cc1 error, not the shape. session-total +270 members.
2026-07-18 17:50:07 -06:00
Drew T cceec3b8ea feat(phase-29 crack-wave): type-lift SVec/Fr_801670E4 -> engine_types.h (func_801670E4 sweep enabler) 2026-07-18 12:16:04 -06:00
Drew T 6dcc4fb16f feat(phase-29 crack-wave): type-lift Blk16_956C/Ent_956C -> engine_types.h (func_8012956C sweep enabler) 2026-07-18 12:07:24 -06:00
Drew T 1cb018bc00 feat(phase-29 §8e): bank giant func_8013F350 (490) x1 — the 4-table [0,0,4,0] span + tables= persistence
- jtbl_carve §8e hardening (the F350 lesson): a pre-§8e Phase-26 merged-double span had NO
  recoverable structure — spec derivation now uses the payload ZERO-WORD rule over persisted
  table starts (tables= comment on the JTBL_PADS line), with source priority
  {untouched+line=reuse verbatim | untouched+no-line=skip | touched=union of .s refs,
  line tables=, --span-tables override, --like exemplar role-transfer}; spec_from_starts
  replaces interval-carry; None-tolerant legacy comments; --like/--span-tables CLI.
- F350 carve: tables 8860(8e)+8880(5e,trimmed) fused BEFORE the existing 8898/88B8 double via
  the zero-checked 4-gap -> ov_SC01_077.o JTBL_PADS := 0,0,4,0 (tables= persisted).
- splice reconciles (§56, byte-neutral): §30#2 def-side widen void->s32 (TU extern +
  engine_core discarding-caller macro extern); D_80115158/D_8011515C macro-canonical redecls
  + §18 width-preserving store casts (sh under u8[]/u8); func_801416D4 canonical (s16) redecl
  + §17a-1 fn-ptr (s32) call cast; D_80187BD0 block-scalar decl dropped (file array covers).
- whole-binary gate [ OK ] sha1 d19c9580 == check. 3 of 4 giants now banked x1.
2026-07-18 02:55:34 -06:00
Drew T d6db1343b8 feat(phase-29 T4): type-lift + propagate 2 local-type cores x138 (func_8014E284, func_80137DD4)
The 2 Task-3 cores banked x1 but skipped by dedup_propagate ("not self-contained: local types").
Lifted EntSC01077 (func_8014E284) + P_TAG_80137DD4 (func_80137DD4) into src/shared/engine_types.h
(fleet-included via engine_core.h), and inlined func_80137DD4's file-local `#define OTE` into the body
(byte-neutral macro expansion, re-evaluated per use to preserve codegen). Both now self-contained ->
dedup_propagate --recover = 138 overlays byte-identical, 0 stragglers, 2 new dedup groups.

~+32.7k ins (108+129 x138). R22 clean-fleet 140/140 byte-identical; tools-health OK; dedup 1846->1852;
C1 coverage 234205. §55c local-type propagation cap lifted for these 2.

SESSION-2 close: this session banked ~94k ins across 4 fns x~137 overlays (2 non-jtbl giants fully
propagated + this 2-core type-lift); fleet 71.4->72.1% instr (+0.7pp), 140/140 throughout. The 4 jtbl
giants remain deferred on the byte-proven 8-align jtbl-carve gap (root cause half-pinned: cc1+maspsx
both emit .align 2, so the +4B pad is a downstream as/ld_interleave artifact) -> teed up as the next task.
2026-07-17 18:37:00 -06:00
Drew T c7fedced10 feat(phase-29 T4): propagate giant func_8014F4C0 (141) x134 + bank x1
Task-4 giant-bank #2. func_8014F4C0 (141 ins) banked x1 in ov_SC01_077_after.c (its earlier
"gate reject" was pure §55b propagate-damage — gated clean on the healthy tree, no fleet change).
h_exact family -> dedup_propagate --addr 0x8014F4C0 --recover: ov_SC01_000 was a cross-overlay
straggler (all-or-nothing h_exact), --recover reconciled the conflicting caller externs and kept
it -> 134 overlays byte-identical after propagation, +1 dedup group in config/dedup.us.yaml.

R22 clean-fleet 140/140 byte-identical; tools-health OK; ~+19k ins.

GIANT TAXONOMY (session finding, cookbook §56 + CURRENT_PHASE): the 12 preserved giants split into
- NON-jtbl (func_8013FAF8, func_8014F4C0): bank clean on a healthy tree, propagate x137 via macro/h_seq.
- jtbl (func_80131340/func_80159C84/func_8013C414/func_8013F350): each needs a per-overlay jtbl carve
  x137 AND hits an 8-align gap -> func_80131340 DEFERRED (byte-proven: gcc emits a non-first jump
  table .align 3 while the original packs it 4-aligned -> +4B padding shifts the whole data island,
  +5B/3077-diff image-wide %lo breakage). A jtbl_carve 8-align/isolation fix unlocks ~4 giants x137.
2026-07-17 17:40:54 -06:00
Drew T def16c8b18 feat(phase-29 T4): bank giant func_8013FAF8 (312) x1 + cookbook §56 (giant-splice reconciliation)
Task-4 giant-bank #1 of the 12 preserved p29t3 drafts. func_8013FAF8 (312 ins, a
menu/HUD prim builder stubbed in 138 overlays) BANKED x1 in ov_SC01_077, whole-binary
byte-identical; R22 clean-fleet 140/140; tools-health OK (dedup 1843/0, audit-binaries OK).

The README billed it "pure def-sig plumbing" but it was a 5-conflict multi-symbol
reconciliation (~5 gate iterations), all byte-neutral + gate-arbitrated (G3/P9):
- def-sig s16/s16 vs canonical s32/s32 -> NARROWED the extern fleet-wide (404 decls/265
  files). NOT --fix-def-sig: the s32 variant diverges at insn 22 (match_one, R35). Neutral
  because every fleet caller passes (s16)-cast or small-const args (verified).
- 3 data-symbol conflicts (D_80115128 lh / D_800B9A02 lhu / D_80187AC0 s32[]) declared
  BEFORE the splice (block-scope §55a-blocked) -> the TU's §18 cast-at-use-site convention
  (*(s16*)&, *(u16*)&, ((s32*)&sym)[i]) forces the load width regardless of decl signedness,
  keeps the TU decl untouched, propagation-safe. No CSE-hoist across 5 uses.
- 2 fn-extern conflicts (func_8013FFD8 s16 arg0, func_80141100 int(int)) -> reconciled the
  draft decl to the TU def + byte-neutral call-site cast. Still MATCH 312/312.

Stubs 138->137, 1 def, 0 NON_MATCHING (G4). Fleet holds 71.4/53.3/86.42 (the ×1 exemplar is
negligible until propagation ×137, batched per §55b). Technique -> cookbook §56.
2026-07-17 12:50:11 -06:00
Drew T fd564a2cf7 feat(phase-29 T3): propagate the 3 self-contained cores ×137 (+410 instances; fleet 71.0->71.4% instr)
- targeted dedup_propagate --addr per core (NOT --auto-from), --recover for stragglers:
    0x8014ADE0 -> 138 overlays byte-identical
    0x801325B8 -> 134 (ov_SC07_011 byte-diverges -> auto-excluded, kept x1 — what --recover is for)
    0x801387B8 -> 138 overlays byte-identical
  = ~410 member-instances; 3 new dedup groups (1840 -> 1843), C1 coverage 233795/233795.
- 2 of the 5 banked cores (func_8014E284, func_80137DD4) stay ×1: "not self-contained (local types)"
  -> blocked on the build_engine_types type-lift (the §19/§20 propagation cap). Carried.
- R22 clean-fleet 140/140 BYTE-IDENTICAL; audit-binaries OK; dedup 1843/0; 0 NON_MATCHING (G4).
  Fleet instr 71.0 -> 71.4% / fn-count 86.30 -> 86.42% / distinct-code 53.3%.

- SELF-CORRECTION (R14/R35), now fixed in cookbook §55c + CURRENT_PHASE: my earlier claim that this
  propagate "needs ~2h+" was WRONG. That timing was taken while the tree still carried the partial
  damage of a killed --auto-from (90/140 overlays broken), so every member-gate was failing/retrying.
  On a HEALTHY tree a targeted --addr propagate is ~233s/core (all 3 = ~27 min) — ~20x faster. Only
  --auto-from is genuinely fleet-slow. A timing taken on a broken tree measures the breakage, not the
  tool — recover the tree FIRST, then measure.
- cookbook §55: the wave's new byte-proven levers (§49-variant birthing-boost suppression via
  reg_n_sets 1->2; sched1 birthing/LUID + "cc1 -dL" movable introspection; switch-tree vs jtbl
  CASE_VALUES_THRESHOLD=5; block-scope-extern beats *(T*)&sym) + the GATE-ORCHESTRATION law
  (--no-propagate per group then ONE targeted --addr; commit banks BEFORE propagating; a reverted src
  needs a re-extract; gate_stage's default harvest_verified.txt accumulates -> phantom banks).
2026-07-17 02:04:38 -06:00
Drew T 2f38e31e76 feat(phase-26a): A3h — propagate 14 fleet-wide byte-exact stubs ×134 (Bucket P)
The standing-lead harvest (A3f/A3g continuation), measured precisely first (R14). Of the
~1,060 still-open byte-exact functions in the backlog:

  - Bucket G (67 open in ov_SC01_077): re-gated through the A3e-fixed gate_stage
    --no-propagate -> 0 banked. HONEST: A3f already took the bankable 33; the residual is
    the known hard classes (jtbl-rodata / register-pins / struct-collision) + stale backlog
    rows whose LATEST state is a WAVE mismatch. Correct G3/P9 rejection.

  - Bucket P (88 matched in ov077, open in siblings): the clean lead. dedup_propagate --addr
    (A3g primitive) skipped 70 as h_exact reach<2 (per-location byte VARIANTS -> family_sweep
    territory, not plain propagation) and propagated the 14 genuine PURE fleet families:
      5 top (func_80129C40/8012A6D0/80130A18/80131D68/80136DFC) + 9 more; 2 stragglers
      dropped all-or-nothing (0x80173A60, 0x8014C568 -> --recover candidates).

Each propagated x~133 (dedup_propagate internal gate: 134 overlays byte-identical).
R22 CLEAN-FLEET (make clean + extract-all + check-all): 136 passed, 0 failed of 136.
dedup-check: 1826 -> 1840 validated, 0 failed | C1 227211/227211.

DELTA:
  instr-weighted  66.8% -> 67.4%  (+~1,862 member instantiations shipped from C)
  distinct-code   46.8% -> 46.8%  (flat: propagation adds MEMBERS, not new distinct code)
  673 files (671 overlay .c instantiations + engine_core.h) + dedup.us.yaml + progress.fleet.md

Remaining standing lead: the ~72 variant Bucket-P + ~905 Bucket-X (absent from ov077) fns,
all latest-row closeness==0 -> route through family_sweep --hseq (per-sibling remap), next.
2026-07-14 17:41:24 -06:00
Drew T 60e26e07f8 feat(phase-26a): A3g — propagate the 3 fleet-wide banks ×134 (bounded, gated, R22-clean)
The 3 of A3f's 33 banks that are shared fleet-wide, stamped across all 134 overlays. Done the way
the earlier run should have been: TARGETED (--addr, not --auto-from), dry-run-sized first
(3 functions × 134 members = ~400 gates, not an unbounded fleet sweep), on a clean tree at HEAD.

  func_80130650 (31 ins) · func_80149450 (13 ins) · func_80174684 (9 ins) — each ×134.

  dedup_propagate internal gate : 134 overlays byte-identical, 3 groups registered
  R22 CLEAN-FLEET (the real proof, not the tool's incremental check that lied during the crash):
      make clean + extract-all + check-all -> 136 passed, 0 failed of 136
  dedup-check: 1823 -> 1826 validated, 0 failed | C1 coverage 225335/225335

DELTA (reconciles exactly):
    functions byte-identical  284,559 -> 284,958   (+399 = 3 fns × 133 other overlays)
    instr-weighted            66.7% -> 66.8%   (+13,167 shipped .text instructions)
    distinct-code             46.8% -> 46.8%   (flat: propagation adds MEMBERS, not new distinct
                                                code — the 3 bodies were counted at A3f)
    403 src files (3 ×134 instantiations + engine_core.h) + config/dedup.us.yaml

The other 30 of A3f's 33 are overlay-unique (×1) and need no propagation. The larger prize remains
the ~310 byte-exact stubs in the OTHER overlays (A3e), not yet attempted.
2026-07-14 16:47:42 -06:00
Drew T 82d79e7a32 fix(phase-26a): A6/A7 — the family engine could not see half its corpus; 17 fns banked x134 free
R22: check-all 136 PASSED / 0 FAILED. dedup-check 1823 validated / 0 failed (C1 coverage 224,933/224,933).
Fleet instr-weighted 66.5% -> 66.7%.

=== dedup_propagate: it was blind to HALF the corpus ===
overlay_files() used a hardcoded suffix allowlist ("_a","_o0","_o0b","_after") that predated the
Phase-26 jr carves -> 404 of the fleet's 811 overlay .c. The 407-file gap held 36,135 INCLUDE_ASM stubs
and ~32,000 inline defs, and overlay_files gates ALL of dedup_propagate (source_text / find_site /
apply_plan / struct_check / reconcile_caller_extern). Now a GLOB — never an allowlist, because the NEXT
split family would re-open it. The asm_subdir is always the file stem, an invariant the old four entries
already satisfied.

find_site's def-detector required the signature line to END in ')' and the next non-blank line to START
with '{'. It therefore silently dropped THREE shapes: K&R definitions (`s32 f(arg0)` / `s32 arg0;` / `{`),
multi-line signatures, and single-line bodies. K&R is the project's house style for exactly the biggest,
highest-reach functions — func_8015AE2C (562 ins), func_80166994, func_80133CD4, func_8015A3C8 — and they
live in the _jr_* files overlay_files could not even open. Fixing either alone would have been useless:
the glob exposes the files, and find_site would still drop their biggest prizes. Both fixed together.
  * The signature's closing paren is now found by a real paren-walk, not line.count() or split(')')[-1]:
    a single-line body containing a call (`void f(int a){ g(a); }`) has balanced parens of its own, so
    both shortcuts land on the WRONG paren and then misread the body's ';' as a prototype terminator.
  * AGREEMENT ASSERTION (the audit's): find_site vs family_remap.extract_unit -> 701 agree / 0 disagree.
    Negative controls hold (a prototype+call is rejected; a 1-line body with a call is a def).

=== THE HARVEST (free work, byte-gated) ===
--auto-from ov_SC01_077 now nominates what it could never see: 20 planned, 17 propagated x134, 3 dropped
as cross-overlay stragglers. 134 overlays rebuilt BYTE-IDENTICAL; 17 new dedup groups.
Includes ALL FOUR functions A1 caught the registry lying about (func_80128ED8 / 8012C098 / 8012C0EC /
8012C750): 0 stubs remaining, real shared macros. THE LOOP CLOSES — A1 found the lie, and THIS is the
bug that had made it true (3 of the 4 are defined in ov_SC01_077_jr_8012ACE0.c, which the allowlist could
not open, so the propagation never ran and dedup_integrate greenlit the result).

=== family_remap: 96 PHANTOM exemplars -> 0 ===
extract_unit globbed only src/<ov>/<ov>*.c, so a function matched via a SHARED body had no source form
and read as NOT MATCHED. 93-96 of 218 h_seq "matched" exemplars were phantom, carrying 2,157 candidate
members of which 1,834 are still-stubbed, PURE/IMM-clean, symbol_map-clean and unpinned — staged and
gated today, dropped before the first build then. It is now TOTAL over BOTH shared-body mechanisms:
  (1) the DEFINE_func_<ADDR>() macro — reconstructed as the exact INVERSE of dedup_propagate.make_macro
      (derived from the generator, not re-guessed from the text);
  (2) a DIRECT definition in a shared header, #included per overlay — the whale (func_80144B9C, 770 ins,
      -O0), which the registry explicitly records as "NOT a DEFINE_ macro".
  CENSUS: 216 matched exemplars, 216 real, 0 PHANTOM.

symbol_map named the symbol by HOW IT WAS LOADED, not by WHAT IT IS: reloc_targets labels every lui/%lo
pair "data", and a FUNCTION's address taken via lui/%lo (an address-taken callback) is exactly that shape
(splat's own .s: %lo(func_8017E1D4), 7 occurrences). The map got a D_<ADDR> key while the C writes
func_<ADDR>, so the word-bounded substitution matched NOTHING and silently no-op'd — the sibling kept the
EXEMPLAR's function pointer and the loss was booked as a BYTE failure, indistinguishable from a compiler
wall. Now emits both keys (addresses are unique; the pass is simultaneous, so the extra key is free).

gather_externs was line-oriented, so a WRAPPED comma extern was invisible in both directions (the first
line has no ';', the continuation has no `extern`). ov_SC01_077.c:271-272 declares NINE symbols that way,
and the exemplar referencing them (func_8013D178) is a 133-member family — every sibling was staged with
NO declaration, failed to compile, and bisect-stormed its whole gate group. Now statement-oriented, and
an unresolved symbol is REPORTED, never silently dropped.

=== family_sweep.stub_map / build_engine_types ===
stub_map: func_-only -> a curated-name stub read as "already matched" -> phantom exemplar. Now corpus-derived.
build_engine_types hard-exited on 1,070 of 1,470 type-bearing overlay .c (73%; the audit measured 573/709
= 81% on its narrower set) because 1,929 TAGGED-struct typedefs tripped a guard whose own comment asserts
"our source has only ANONYMOUS-struct typedefs" — true in Phase 20, false since the harvest agents started
writing tagged structs. inject_capped_externs routes every type-bearing body HERE as the type-heavy tail's
ONLY sanctioned unblocker, so the tail's unblocker could not run on the corpus the tail lives in.
A contained def (the typedef's span encloses the body) is liftable — it just must not be counted twice;
only a PARTIAL overlap is malformed. Verified on a file that used to hard-exit: 5 tagged typedefs folded +
forward-declared, 46 types written, exit 0.

  ** AND THE SHARPEST LESSON IN THE AUDIT: this one was never silent. It printed "[overlap] ... handle
     manually" every single time. But the message reads like a rare edge case rather than a four-fifths
     coverage failure, so nobody ever COUNTED it. A loud failure that nobody counts is exactly as
     invisible as a silent one. R32 must be "assert your coverage", not merely "fail loud". **

R14 self-catches, recorded because I hit both while fixing them: my first shared-header scan read a macro
body's `extern void f(void); \` as a DEFINITION (the trailing continuation means the line does not end in
';', so the decl guard never fired) — the exact bug fixed at commit:0552, reintroduced by me and caught only
because the whale resolved from the WRONG file. Column-0 anchoring fixes it by construction. And my
phantom census returned 0/0 twice because I guessed the manifest schema instead of reading it.
2026-07-14 10:34:06 -06:00
Drew T 9b93c254c2 feat(phase-26): func_8015AE2C (562 ins, x134) banked — Fable5 MATCH + 3 isolation bugs fixed
Exemplar banked byte-identical (d19c9580); R22 clean-fleet 136/136.
Fable5 crack: MATCH 562/562, pin-free, jump table verified.

THREE REAL BUGS the bank exposed in jr_isolate_all (each byte-proven; each would have
silently corrupted every future heavy-core bank):

1. --only filtered `banked` as well as the cut set, so already-banked jr went untracked
   and their carves were never followed. --only selects what to CUT; it must not erase
   the record of what is already banked.
2. carve ownership was read from splat .s — but splat emits NO .s for a MATCHED function
   (its .c holds real C), so the lookup found nothing. Now resolved from the extracted
   IMAGE via family_remap.reloc_targets (byte-exact: func_801734BC -> 0x801d8c68 etc).
3. THE STRUCTURAL ONE: a region may host at most ONE .rodata carve, because an object's
   .rodata is a single CONTIGUOUS section. Cutting at func_8015AE2C (jtbl 0x801D8B54)
   left the banked func_801734BC (jtbl 0x801D8C68) inside the same region, so the object
   emitted a 0x34 .rodata spanning BOTH tables (image +33 B). Every already-banked jr in
   a cut object is now cut too -> exactly one carve per object. Cookbook 8b's "bank
   same-subseg families ASCENDING" note warned about this; it is now enforced by
   construction instead of left to discipline.

Also required (per the crack's own analysis, all byte-verified):
- engine_core.h: DEFINE_func_8015BEC4's zero-arg thunk returns func_8015AE2C(), so the
  extern must drop its (void) prototype and the def must stay K&R/unprototyped.
  Byte-neutral across all 136 (R22 green).
- recovery chain: cast_call_sites (27 callees) + reconcile_decls (3 data syms). The raw
  body declares callees with types that conflict with their real engine_core.h defs; the
  original never redeclares them, it CASTS at the call site (cookbook 20).

Layout now exact: .rodata 0x801d8b54/0x1c (7 entries, pad trimmed) + 0x801d8c68/0x14 +
0x801d92a0/0x20 — one table per object, each at its true address.
2026-07-13 18:26:32 -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 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 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 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 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 8e6658ee85 feat(phase-24): T7 §G — func_801770E0 banked ×134 (native DEFINE-macro path); fleet 65.95→65.99%
- func_801770E0 (152 ins, reach-134) propagated ×134 via dedup_propagate --recover.
  Chose the NATIVE DEFINE-macro path over a hand-rolled shared header: func_8014E048
  (pins+asm) is already ×134 via a DEFINE macro, proving that path handles pin/asm -O2
  giants (the whale needed a shared header only because it is -O0 -> separate object).
  Clean fleet check-all 136/136 (R22), dedup-check 1811->1812/0.
- R14: func_8014E048 was ALREADY ×134 (T6 §A) — the whale-session handoff was stale;
  only func_801770E0 + func_801372B0 actually remained ×1.
- tooling (reusable): dedup_propagate.overlay_files now also scans the whale-rollout
  _o0b/_after splits — post-whale-region fns (func_801770E0 in _after.c) were invisible
  for both source-def-find and stub-replacement. func_801770E0 extern block made
  contiguous (a comment between externs made find_site drop 5 externs; byte-neutral).
2026-07-07 23:21:20 -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