Commit Graph

339 Commits

Author SHA1 Message Date
Drew T 9df00e71f8 feat(decomp): parallel gate — 11 fns across 9 binaries (10 workers)
md_SC07_003    func_801A2EC8
  ov_SC02_003    func_80185840
  ov_SC01_077    func_8017DAEC
  ov_SC01_080    func_8017E724 func_8018230C
  ov_SC03_029    func_80180B84
  ov_SC03_030    func_80180054
  ov_SC03_105    func_80183DA0
  ov_SC06_030    func_8017DF70
  ov_SC07_002    func_8017D920 func_8017E7E8
2026-09-01 23:23:02 -06:00
Drew T 51abe2d174 feat(decomp): parallel gate — 19 fns across 14 binaries (8 workers)
ov_SC03_110    func_8018035C
  ov_SC04_000    func_8017F98C
  ov_SC04_015    func_8017E520
  ov_SC03_121    func_8017D8D4 func_80180E64
  ov_SC04_011    func_801827DC
  ov_SC03_007    func_801810E4 func_80184AFC
  ov_SC03_105    func_8017F55C func_801831E0
  ov_SC02_003    func_8017F62C
  ov_SC06_024    func_8017E1F0
  ov_SC05_001    func_80183C9C
  ov_SC06_030    func_8017F268 func_80181164
  ov_SC05_010    func_8018340C func_8018388C
  ov_SC04_016    func_8017D118
  ov_SC06_022    func_8017EBE8
2026-08-31 15:19:41 -06:00
Drew T a732097c37 Revert "feat(decomp): parallel gate — 19 fns across 14 binaries (8 workers)"
This reverts commit commit:3394.
2026-08-31 15:09:32 -06:00
Drew T c26ddf136d feat(decomp): parallel gate — 19 fns across 14 binaries (8 workers)
ov_SC04_000    func_8017F98C
  ov_SC04_015    func_8017E520
  ov_SC03_121    func_8017D8D4 func_80180E64
  ov_SC03_110    func_8018035C
  ov_SC04_011    func_801827DC
  ov_SC03_007    func_801810E4 func_80184AFC
  ov_SC03_105    func_8017F55C func_801831E0
  ov_SC02_003    func_8017F62C
  ov_SC05_001    func_80183C9C
  ov_SC06_024    func_8017E1F0
  ov_SC06_030    func_8017F268 func_80181164
  ov_SC05_010    func_8018340C func_8018388C
  ov_SC04_016    func_8017D118
  ov_SC06_022    func_8017EBE8
2026-08-31 14:53:41 -06:00
Drew T 96f4e0ed5d feat(decomp): S67-wave-jtbl gate — +1 fns x2 propagated (fleet 99.2%) 2026-08-31 12:23:50 -06:00
Drew T 257b9d8a3b feat(decomp): S67-wave gate — +2 fns x1 propagated (fleet 99.2%) 2026-08-31 10:31:15 -06:00
Drew T 1c21f0a1e2 feat(decomp): S67-cc1 gate — +1 fns x3 propagated (fleet 99.2%) 2026-08-31 04:10:27 -06:00
Drew T 29cb504546 feat(decomp): S67-cc1 gate — +1 fns x4 propagated (fleet 99.2%) 2026-08-31 03:53:22 -06:00
Drew T ee5cf85351 feat(decomp): O1 resume gate — 7 fns, clean-R22 verified 213/213
parallel_gate merged 8, aborted on a real red (ov_SC06_022 fails a clean rebuild). Reverted that
one file; the remaining 7 verify green.

ov_SC06_022:func_80181664 has now failed the whole-binary gate TWICE, from two independently
written drafts — the O1 wave and then the O1 RESUME, which re-drafted it because a resume replays
the ORIGINAL args and so bypasses the openness/refusal filter added in commit:3301. Two independent
refusals is a wall signal, not a drafting failure: it belongs on the permuter/wall ledger, and the
refusal ledger should be keyed (binary, fn) and consulted by the DRAW — the way twin_sweep already
keys its refusals by (target, exemplar).
2026-08-30 15:54:09 -06:00
Drew T 375238f6df feat(decomp): parallel gate — 71 fns across 47 binaries (10 workers)
ov_SC02_028    func_8018754C
  ov_SC02_005    func_8018BFBC
  ov_SC02_026    func_8017F390 func_8017F538
  ov_SC02_035    func_801803A4
  ov_SC03_015    func_8017DD7C
  ov_SC02_031    func_80181AE0
  ov_SC03_023    func_8017DAD0
  ov_SC03_093    func_8017F768
  ov_SC03_095    func_8017DD30
  ov_SC03_029    func_80187118
  ov_SC03_089    func_80184A08 func_8018545C
  ov_SC03_091    func_80184B28 func_8018558C func_80187954
  ov_SC03_096    func_8017EDAC func_8017F308
  ov_SC03_090    func_80183C3C func_80184958 func_80186AAC func_8018AA88
  ov_SC03_024    func_8017DD7C
  ov_SC03_100    func_80180E18
  ov_SC03_104    func_80181AD0 func_80181CA8 func_80181EA0 func_801827EC
  ov_SC03_112    func_8018172C
  ov_SC03_110    func_8017FB14 func_80180AF0
  ov_SC03_108    func_8017F788 func_8017FD08
  ov_SC03_101    func_801807F4 func_80181374
  ov_SC03_097    func_80180294 func_801803FC
  ov_SC03_115    func_8017E998 func_8017EFB8
  ov_SC03_124    func_801836B8
  ov_SC03_119    func_8017DD7C
  ov_SC03_114    func_8017D740
  ov_SC03_125    func_80180230
  ov_SC03_118    func_8017DD7C
  ov_SC04_007    func_8017F01C
  ov_SC04_010    func_8017D6C4
  ov_SC04_020    func_8017FAD4
  ov_SC04_005    func_8017F5E0
  ov_SC04_019    func_8018B2B8 func_8018B400
  ov_SC05_001    func_80184028 func_80184430
  ov_SC05_006    func_8017F16C
  ov_SC05_004    func_8017F188
  ov_SC05_010    func_80187B80
  ov_SC05_007    func_8017F568
  ov_SC06_000    func_8017DD7C
  ov_SC06_024    func_80186CF0
  ov_SC06_020    func_801808F4 func_8018348C func_801834F0
  ov_SC06_018    func_80188234 func_8018931C
  ov_SC06_022    func_8017F9FC func_801809D4 func_80184818 func_80187414
  ov_SC06_033    func_80187E08
  ov_SC07_002    func_8018672C
  ov_SC07_009    func_8017CFC0
  ov_SC06_030    func_8017DE08
2026-08-29 18:57:37 -06:00
Drew T b95f18dca6 feat(decomp): family-remap gate — +1 fns x0 propagated (fleet 98.8%) 2026-08-29 17:25:09 -06:00
Drew T 6a601a0fce feat(t5): Claude wave t5o — 36 banked (sonnet 29/31, opus 6/8, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-27 15:59:13 -06:00
Drew T e2d1531324 feat(t5): Claude wave t5n — 43 banked (incl. func_8017BEBC @ 741 ins, the campaign's largest single crack; func_8017DAC8 253; func_800CB0C8 157; first md_MAIN_* module targets); the gate was KILLED mid-run and the tree adjudicated by a clean fleet sweep: 213 passed, 0 failed of 213 — every dirty file byte-proven, none reverted (R42) (P31 S64) 2026-08-27 14:03:01 -06:00
Drew T 0decb45580 feat(decomp): ov_SC03_028 (7 fns: func_80183A74, func_801847E8, func_80184914, func_80185864, func_80185C14, func_801887A8 + 1) and ov_SC06_030 (func_8017F65C + 1) — 9 resolver drafts banked once jr_isolate_all could partition their TUs; gate-time isolate + carve, both binaries byte-identical from clean rebuilds (P31 S62 T3) 2026-08-26 15:22:11 -06:00
Drew T 6e25fc910b feat(decomp): integration-resolver pass — 72 banked of 245 staged (zero model tokens)
Drafts the ledgers already recorded as byte-correct (closeness 0 / reloc shape MATCH), re-judged against today's tree by rtu_match + reloc_identity, staged, and gated on the whole-binary SHA. Ledger: .run/resolver/verdicts.jsonl
2026-08-25 23:48:21 -06:00
Drew T 0f0ebdd354 chore(decomp): commit in-tree banked work before the serial lane 2026-08-25 21:52:56 -06:00
Drew T 6645e625d9 feat(decomp): serial idiom lane — func_8017FCAC (138 ins, seeded-crack, group worth 138) 2026-08-25 21:49:22 -06:00
Drew T c5749fde3b chore(decomp): commit in-tree banked work before the serial lane 2026-08-25 21:12:44 -06:00
Drew T dd0538ae05 chore(decomp): commit in-tree banked work before the serial lane 2026-08-25 21:11:18 -06:00
Drew T c8c56678a5 chore(decomp): commit in-tree banked work before the serial lane 2026-08-25 20:12:31 -06:00
Drew T 41d8a0ea58 chore(decomp): commit in-tree banked work before the serial lane 2026-08-25 20:02:29 -06:00
Drew T 274932d209 chore(decomp): commit in-tree banked work before the serial lane 2026-08-25 16:06:04 -06:00
Drew T b604fc1e4e feat(decomp): ox wave dy overlays — 12 banked
Committed before the main batch: gate_main reverts on failure and would take these with it.
2026-08-25 15:50:19 -06:00
Drew T bd50b9191c chore(decomp): commit in-tree banked work before the serial lane 2026-08-25 15:42:21 -06:00
Drew T 2fea549c53 feat(decomp): ox wave dr overlays — 28 banked
Committed before the main batch: gate_main reverts on failure and would take these with it.
2026-08-25 13:55:25 -06:00
Drew T a5eecbbec7 chore(decomp): commit in-tree banked work before the next gate
Uncommitted src/ changes found at gate entry. These are banked functions from a lane that gates with commit=False, not residue — preserved, not reverted. Top-level src/*.c (main TUs) are excluded by construction (S59).
2026-08-25 13:24:01 -06:00
Drew T 5357c8b448 feat(decomp): ox wave de overlays — 192 banked
Committed before the main batch: gate_main reverts on failure and would take these with it.
2026-08-25 11:17:00 -06:00
Drew T 3dd093741f feat(decomp): ox wave cu overlays — 47 banked
Committed before the main batch: gate_main reverts on failure and would take these with it.
2026-08-25 07:51:35 -06:00
Drew T 0f3d638d96 feat(decomp): ox wave cr overlays — 12 banked
Committed before the main batch: gate_main reverts on failure and would take these with it.
2026-08-25 06:31:32 -06:00
Drew T affe6728be feat(decomp): ox wave bx overlays — 14 banked
Committed before the main batch: gate_main reverts on failure and would take these with it.
2026-08-24 19:32:41 -06:00
Drew T 210dba7afe feat(decomp): ox wave bw overlays — 47 banked
Committed before the main batch: gate_main reverts on failure and would take these with it.
2026-08-24 19:15:01 -06:00
Drew T 88673d3708 feat(decomp): ox wave bv overlays — 44 banked
Committed before the main batch: gate_main reverts on failure and would take these with it.
2026-08-24 18:43:23 -06:00
Drew T 7c674dc63d feat(decomp): ox wave av overlays — 428 banked
Committed before the main batch: gate_main reverts on failure and would take these with it.
2026-08-24 05:09:47 -06:00
Drew T 5d8d497c48 feat(decomp): free A-prop remap lane — 390 banked, zero model tokens
aprop_autodraft over regenerated A-prop cards (582 mechanical drafts), reloc_identity
pre-filter (509/582 AGREE), sweep_parallel gate across 107 binaries in 54m35s.
Result: 390 banked of 511 gated (76.3%).

This lane was invisible until the atlas KeyError fix earlier this session: member_lever
emitted the confidence value 'aprop-pure' that _CONF_RANK never contained, so atlas.py
died on the first group carrying such a vote and could not produce an atlas at all.
With it fixed the remap lever shows 235 groups / 812 instances / 46,240 instructions.
2026-08-23 02:27:15 -06:00
Drew T f5f2e80cc1 feat(decomp): worker gate — +1 fns x0 propagated (fleet 95.2%) 2026-08-14 04:14:21 -06:00
Drew T 63bb8f8959 feat(decomp): worker gate — +1 fns x36 propagated (fleet 95.1%) 2026-08-12 22:47:24 -06:00
Drew T f9ad3a2c98 feat(phase-30 S48-T6): propagate func_8017EDA4 to its zero-crack siblings 2026-08-12 12:55:01 -06:00
Drew T ce85242084 fix(phase-30 S47-0a.2): conform func_80175414 — 1,845 decls / 1,061 files; R22 213/213
The new head plumbing class after the symbol-kind fix: `conflicting types for func_80175414` (27
member-rows). Byte-true DEF is `void func_80175414(s32 _arg0)` (its DEFINE_ macro). The fleet
declared it 1,845 times in four spellings, of which three are the SAME TYPE (parameter names do not
participate) — the outlier was 28 sites declaring `(void)`.

conform_decls REFUSED the naive conform and was right to: 29 ZERO-ARG CALL SITES exist across 28
files, so conforming the declaration alone turns each into `too few arguments` — a fleet-wide
COMPILE break the per-binary gate cannot see (the tool cites 138/140 binaries, measured). It named
the count, the consequence, why the cheap check misses it, and the flag that repairs it, then
forced the two-step: --cast-zero-arg-calls (29 sites cast to the 0-arg fn-ptr shape, §17a-1 — gcc
folds the cast of a known symbol to a direct jal, so it is codegen-neutral), then the conform.

Result: 1,845 declaration sites rewritten across 1,061 files, 0 non-canonical remaining (axis
complete, R32). R22 clean-fleet: check-all 213 passed / 0 failed of 213.

WORTH RECORDING AS A TOOLCHAIN STANDARD: this is the instrument that has not wasted a cycle today.
Every other one reported SUCCESS over a defect — a classifier that discarded every gcc-2.7.2 hard
error (no `error:` prefix), a diff that miscounted 116 data-bundled .s files, a --verified-out
truncated to zero bytes over 62 real banks, a --band default that reported "0 families" on a real
135-member family, and a scope stamp describing the filesystem instead of the run. conform_decls
reports FAILURE with a repair path. A guard must state its COVERAGE, not just its verdict; the
in-repo exemplars are this tool and the §53 jr interlock.
2026-08-11 14:15:01 -06:00
Drew T efec1b9b71 fix(phase-30 S47-A1): asm-label aliases must never be dropped by §8d; +148 members
scope_data_externs §8d drops the draft's decl of any symbol the TU already declares at file scope.
It keys on the SYMBOL, but a §37 asm-label ALIAS binds a DIFFERENT C identifier to that symbol:
the TU declares `D_801851BC`, it does NOT declare `tbl_D_80187044`. Dropping the alias left the
body referencing an undeclared name, which cc1 reports with no `error:` prefix — so the sweep
classified all 132 siblings as CC1-FAIL(no-diagnostic), i.e. as a codegen wall.

The bitter part: the alias exists PRECISELY BECAUSE the TU declares that symbol with a conflicting
type (a `void (*[])(void)` dispatch table vs this function's 20-byte-stride view). The drop rule
fired on exactly the declarations written to survive it. Why 1 of 2 died was fully determined:
tbl_D_80187048's symbol is not in the TU, so it demoted normally.

Fix: is_asm_alias() — an alias is demoted into the body, never dropped (the identifiers differ, so
it cannot collide with the TU's decl). Control-tested 6 ways incl. self-labels and plain externs.

Measured: func_80132018 3/135 -> 135/135; full re-sweep +16 more. Total +148 members.
R22 clean-fleet 213 passed / 0 failed of 213. tools-health OK, dedup-check 1949/0.
Fleet 96.11 -> 96.15% fn-count, 87.8 -> 87.9% distinct; stubs 14,120 -> 13,972 = -148 (2nd oracle).

CORRECTION TO MY OWN CLAIM (R14): after the probe I said the 58% aggregate was concealing a broad
problem. The re-sweep refuted it — only 16 more banks fleet-wide. The alias class really was one
family; the first read ("outlier") was right and the correction was wrong.

875 sweep failures classified: 231 PLUMBING-other, 141 DIFF (real divergence, only 16%),
136 `conflicting types for cdFileLocTable` (ONE symbol — biggest single class left),
77 CC1-FAIL(no-diagnostic), 26 memcpy, 12 D_80114F24, 11 D_800AE620, 9 D_800183E0.

STILL UNFIXED, and the most dangerous instrument left: the sweep's failure classifier greps for
`error:`, which gcc-2.7.2 never emits on hard errors. Every hard error therefore reads
CC1-FAIL(no-diagnostic). That is how a missing declaration looked like a codegen wall across 132
functions. rtu_match was fixed for this at T0(b); this classifier was not.
2026-08-10 18:50:48 -06:00
Drew T 9ab9120e04 feat(phase-30 S47-B): conform 8 declaration axes (~10,930 sites); 3 guard defects fixed; 213/213
Task B, re-scoped from evidence. The 129 dedup_extend failures are 106 conflicting-types /
21 CC1-FAIL / 4 undefined-ref / 3 DIFF — real byte divergence is 2%, and memcpy is 17 of 106,
not the story. Direction reversed too: the byte-true DEF of func_80128ED8 is what the target
.c files already declare; engine_core.h's macro-local extern was the stub-era guess.

Conformed 8 axes to byte-truth (func_8012F14C 2843, func_8012E5CC 2052, func_8012F038 2214,
func_8014C568 1816, func_80128ED8 1524, func_8012C750 406, func_8012C0EC 50, func_80144A04 25).
R22 clean-fleet: check-all 213 passed / 0 failed of 213. Zero functions banked by design.

Tooling (R33/R35) — three guards that asserted completeness over a narrowed population:
- NEW tools/macro_draft.py: a deduped fn has no definition in any .c (body lives in a DEFINE_
  macro), so conform_decls had been refusing the largest class it was built for.
- conform_decls skipped engine_core.h wholesale as "a defining TU": 10 stale externs survived
  while 1,514 fleet sites moved, and it still printed "axis complete". Skip now scoped to the
  defining macro's span.
- Return-axis compare was literal: typedef int/s32 and a missing `extern` faked a return change.
  Now compares normalized types.
- §85 consumer scan under-reported (the dangerous direction): a cast between `=` and the call
  hid `s0 = (s32 *)func_80144A04(...)`. Now classified by position, validated both ways.

Corrections to my own predictions (R14): the documented scalar-narrowing hazard was benign
across 2,052 sites; the breaks were arity (6 call sites, fixed with §17a-1 fn-ptr casts) and
the consumer-guard gap. A header-only first probe broke ov_SC01_000 — §85 is literal.

Not done, named: memcpy (builtin codegen), ApplyMatrixSV (no DEF), gte_SetRotMatrix (link bug),
func_80147364 (unparseable macro), D_800AE620/D_80126CC4 (data axis). Cookbook §159.
2026-08-10 16:01:49 -06:00
Drew T b005312127 feat(phase-30 S46-3): propagation banked — 29 fns / +2,815 member-instances; R22 213/213
The S45p9 blocker is closed, and the recovery loop that kept it from finishing is rewritten.

- BANKED: dedup_propagate --auto-from ov_SC02_037 --recover -> 29 functions propagated,
  141 overlays byte-identical, dedup 1920 -> 1949 groups, member instances 246,284 ->
  249,099 (+2,815). make clean && extract-all && check-all -> 213 passed / 0 failed (R22).
- WHY IT FINISHED THIS TIME: gate_all -> gate_failures returns EVERY failure from the sweep
  that already computed them, and the recovery loop resolves them all per round. Converged in
  3 rounds; the old one-overlay-per-sweep design needed ~138. That reframes the S45 run — it
  was not nearly done when it died, it had barely started.
- Batching did NOT cost capability: per-overlay necessity probes excluded four of the nine
  culprits from only the 9 overlays that needed it (not all 138), and ov_SC07_006 was
  RECOVERED by the Part-B caller-extern reconcile instead of excluded.
- Plan phase parallelised: 5 min -> 26 s, plan + skip classification byte-identical. Its
  compiles_standalone temp file is per-call now — the fixed `t.c` was the same fake-isolation
  class as match_one's shared --work dir (P28 T5), latent until something ran it in parallel.
- docs/accelerators.md (NEW, Drew 2026-08-07): the reusable-workflow ledger — what we learned
  late that a future decomp should know on day one, each entry with when we found it, when it
  WAS findable, what it cost, and the honest prerequisite where one exists.
2026-08-07 22:24:35 -06:00
Drew T 9f61cd33c5 feat(phase-30 S6): BOTH GIANT WALLS CRACKED ×138 (+50,094 ins) — the verdicts were stale, not wrong
The two functions the roadmap has carried as PERMANENT WALLS since Phase 24 are matched in all 138
overlays. Neither needed a siege. Both matched from drafts ALREADY ON DISK.

  func_80178004  165 ins x 138 = 22,770   Phase 26: Fable5, ~477k tokens, "intrinsic 3-integer
                                          regalloc wall". THREE stored drafts report match_one
                                          MATCH today; one banked first try, no new work.
  func_801412A8  198 ins x 138 = 27,324   close=29/110 since Phase 24. Matched from 1 of 31 stored
                                          drafts + the §37/§124 alias.

WHY func_801412A8 LOOKED INTRINSIC (worth understanding — match_one is structurally blind to it):
the TU declares `extern int func_801412A8(int,int,int,int,int,int)` and its callers USE the return
(`param_1 = func_801412A8(...)`), while the byte-true definition is
`Prim_1412A8 *(Prim_1412A8 *, int, int, int, u16, u16)`. Narrow params cannot agree with an `int`
prototype and the no-prototype escape is illegal once a param promotes, so NEITHER side can move --
and the resulting byte difference is in the CALLERS, which match_one never compiles. The §37/§124
def-side asm-label alias decouples them: the TU decl keeps governing the call sites (codegen
untouched), the definition keeps its byte-true signature.

THEN PROPAGATION RETURNED 0/137 TWICE, both times a missing TYPE, not codegen:
  family_remap's `_carry_macros` carries file-scope #defines but (a) NOT typedefs, and (b) is NOT
  TRANSITIVE -- it brought addPrim_1412A8 and stopped, though that macro calls setaddr/getaddr and
  getaddr casts to PTag_1412A8. Lifted Env_1412A8 / PTag_1412A8 / Prim_1412A8 + OT/getaddr/setaddr
  into src/shared/engine_types.h (inside the include guard) -> 137/137, 0 failed.

MY ERROR, CAUGHT BY THE GATE: I lifted the typedefs but did not STRIP them from ov_SC01_077.c, so
they were declared twice and gcc-2.7.2 rejects a repeated typedef even when identical -- the lesson
already recorded at the foot of engine_types.h. R22 came back 139/140 with [FAIL] ov_SC01_077 (the
exemplar's own overlay). Stripped, re-verified, 140/140. A proper lift strips the source;
build_engine_types --strip does both and I did it by hand.

Also a measurement error worth recording: I checked whether the draft defined Prim_1412A8 with a
plain `grep -c` -- which matches inside `addPrim_1412A8` -- and briefly concluded the carry worked.
Substring false positive; the same shape as reading a `return` as a declaration.

VERIFIED: make clean && make extract-all && make check-all -> 140 passed, 0 failed of 140.
Fleet 12432941 -> 12483035 instr (+50,094 -- EXACTLY the two giants x138); fn-count +276;
instr-weighted 94.5% -> 94.8%. audit-digest OK. 0 NON_MATCHING (G4).

THE RULE THIS BUYS: re-measure a wall before respecting it, and SCAN every stored draft rather than
sampling (my first pass checked 8 of 31 and reported "closeness 40" for a function whose MATCH was
in the 9th). Four minutes of re-measurement was worth 50,094 instructions.
2026-08-05 12:51:06 -06:00
Drew T 638f97dbbb feat(phase-30 S39): propagate free h_exact class 0x80176144 (53 ins x 1) - R22 140/140 2026-08-05 00:09:28 -06:00
Drew T ff4bc60e09 feat(phase-30 S39): propagate free h_exact class 0x8017bee0 (10 ins x 6) - R22 140/140 2026-08-05 00:00:20 -06:00
Drew T c3bf1c988d feat(phase-30 S39): func_801758FC propagated x137 (+7,535 ins) — the largest free h_exact class
Measured the h_exact free pool from the bytes rather than trusting the frontier report's
numbers (R14 — its whale claim was 3/4 wrong: it said the whale was open in all four SC07
overlays; three were already banked and I closed the fourth earlier this session).

MEASURED: 215 open function-instances / 8,763 instructions are byte-identical (h_exact,
including reloc payloads) to an already-matched function. ONE class is 86% of that pool:

  func_801758FC — 55 ins, same address in all 138 overlays, matched in ov_SC01_000 only,
  OPEN in the other 137  =>  7,535 instructions.

h_exact means identical INCLUDING jal/lui/%lo reloc immediates, so the matched body compiles
byte-identically at every member with NO remap (dedup_extend's correctness argument, §14).
dedup_propagate --addr authored it once as DEFINE_func_801758FC() in engine_core.h and
instantiated it at all 137 open sites in address order.

  [ OK ] 138 overlays byte-identical after propagation; 1 new group in config/dedup.us.yaml

VERIFIED: make clean && make extract-all && make check-all -> 140 passed, 0 failed of 140.
Fleet instr 12411467 -> 12419002 = +7,535 EXACTLY; fn-count +137; instr-weighted crosses to
94.5%. distinct-code unchanged BY DESIGN -- the class was already matched in ov_SC01_000, so
the 137 add fleet instructions but no new DISTINCT function. audit-digest OK. 0 NON_MATCHING.

Note this function had been sitting in the stored-draft backlog for ov_SC06_030 and
ov_SC07_010 and re-gated "no" earlier tonight -- because gating a DRAFT is the wrong move for
an h_exact class. The right move is propagating the already-MATCHED body. Same function, two
routes, and only one of them is free.

Remaining free pool after this: 78 instances / 1,228 ins across 32 classes.
2026-08-04 23:56:15 -06:00
Drew T 7b5eda0424 feat(phase-30 S39/S4): re-gate probe — A10 broadly stands; 4 banked from the reverted overlays (+146 ins)
Tested whether decision-log A10 ("stored drafts re-gate at 0/958", measured in T1) survives
S38's tool repairs. Three populations, plain re-gate, no draft edits:

  fresh wave-6 drafts (diagnosed "blocked on a class")   4/6
  stored pool, unbiased sample (every 96th of 1,155)     1/12   <- hit was in a REVERTED overlay
  the two REVERTED overlays, targeted                    3/17

A10 BROADLY STANDS. ~8% on the general stored pool is not a harvest, and a 1,155-wide sweep
(= 1,155 whole-binary builds) is not justified by it. Do NOT generalise the fresh-draft rate
(4/6) onto the stored pool -- different populations. The honest rule is narrower and cheaper:

  after a tool repair, re-gate the drafts THAT DEFECT plausibly touched, targeted by its
  blast radius -- not the whole ledger. (R35 applied to the backlog, not just to metrics.)

BANKED (+146 ins): ov_SC06_030 func_80161208 + func_80162CCC; ov_SC07_010 func_801506A4 +
func_8016F0AC. R22 clean-fleet 140 passed, 0 failed of 140 -- which also proves byte-neutral a
fleet-shared engine_core.h edit the bank required (extern s32 func_801506A4(s32,s32) -> the
no-prototype form), reaching all 138 overlays (T2 blast radius).

Fleet 12410129 -> 12410275 instr; distinct +95 / +1 uniq; fn-count +4. audit-digest OK.

Also documents the LEDGER MECHANICS in calibration.md (Drew asked): .run/backlog.jsonl is
append-only and nothing is deleted on bank -- open-ness is DERIVED from corpus.stubs at every
read (load_best drops now-banked rows per-binary, P9) and `make report` runs `backlog.py prune`.
Membership is therefore self-maintaining and currently clean: 863 rows, 0 already-banked, 14
duplicate-addr (was 6,867 rows / 98% banked before Phase-29 compaction). What pruning does NOT
re-validate is the VERDICT on surviving rows -- closeness + residual class are as old as the
tooling that wrote them (Phase 28 found a corrupt one: func_80178004 close=0 -> 91). That is
the staleness that matters, and it is exactly what this probe measured.
2026-08-04 22:42:54 -06:00
Drew T a5e97739fb feat(phase-30 S38/S1d): the def-side asm-label alias cracks the 208-conflict class — 138/138 banked
Family 0x80146ab4 (18 ins, x138, PURE) had been failing 0/138 with `conflicting types for
func_80146A6C` — 208 of the ~398 conflicts in the sweep residue, its single dominant blocker.

DIAGNOSED BY READING THE DRAFT, after three levers were eliminated by measurement:
    draft def : void func_80146A6C(s16 a0, s32 a1, s16 a2, s16 a3, u16 a4, s32 a5, s32 a6)
    TU decl   : extern s32 func_80146A6C(s32 a0, void *a1, s32 a2, s32 a3, s32 a4, s32 a5, s32 a6);
The NARROW PARAMS are the wall: C's default argument promotion means s16/u16 cannot agree with an
s32 prototype, and the `()` no-prototype escape is ILLEGAL precisely when a param promotes. Neither
declaration side can move.
  - cast_call_sites: already on by default; wrong axis (fixes CALLEE decls, not the def's own).
  - --normalize-self-decls: 0 banks + non-neutral reverts; wrong axis (the target's decl in callers).
  - --fix-def-sig: measured 0/138, error UNCHANGED — it cannot reconcile a promoting param at all.

THE ESCAPE (§37/§124, S33-proven on func_80147364 — definition (u16,u16) vs 4,046 fleet decls,
banked x137 first try; 1,725 in-tree precedents): give the DEFINITION a private C identifier and
bind the emitted symbol with a GNU asm label, so the TU's declaration never meets the definition and
its type becomes irrelevant. Zero blast radius on every caller; byte-neutral by construction.

    void aF80146A6C(<byte-true params>) __asm__("func_80146A6C");
    void aF80146A6C(<byte-true params>) { ... }

RESULT: 138/138 banked, ~2,484 instructions, ZERO agent tokens. R22 clean-fleet 140/140.
.run/alias_defs.py applies the transform to a staged draft set.

NEXT: this is a CLASS lever, not a one-family fix — generalise it across the remaining sweep residue.
2026-08-04 20:43:14 -06:00
Drew T c57860db4e feat(phase-30 S38/S1a): lift 895 local types to engine_types.h — kills the type-scope sweep class
The free-sweep "wall" was a C parse error: a remapped member body names the EXEMPLAR's TU-local
types, which are undeclared in the sibling's TU, so gcc-2.7.2 parses the declarator as an expression
and dies before ever reaching codegen. extract_unit does carry typedefs, but only ones immediately
preceding the function in the preamble — types declared elsewhere in the exemplar's TU are missed.

Rather than patch the scanner per-family, remove the class: lift every liftable local type into the
shared header once. 895 types lifted, 6,196 local definitions stripped across 1,259 files.
R22 clean-fleet 140/140.

EXCLUDED s8/s16/s32/u8/u16/u32/f32/s64/u64/f64 — lift_types classified those common.h scalars as
liftable and lifting them would have been actively harmful. The tool's own visibility guard kept 8
local defs in src/ov_SC01_077/ov_SC01_077_o0.c, which does not include engine_types.h (stripping a
type out of a TU that cannot see the replacement DELETES it, and the link error that follows names
an unrelated data symbol).

Mechanism proven before scaling: lifting just 3 types took 0x801833f0's family from 0/6 to 6/6.
2026-08-04 18:46:30 -06:00
Drew T 0bdc7f44a0 feat(phase-30 S33d): Sonnet wave — 13 heads + 65 members banked (78 instances)
Fleet 96.21 -> 96.23% fn-count / 93.8 -> 93.9% instr / 88.0 -> 88.3% distinct
(+73 unique fns). R22 clean-fleet: 140 passed, 0 failed of 140. dedup 1910/0.

THE WAVE. Re-ran S10's 17 unbanked targets (26,227 templatable ins) at LOW
concurrency in two batches of ~9 — S10's finding was that 14 of 30 agents were
SERVER-throttled, i.e. the limiter is capacity, not capability. Targets
re-derived against corpus.stubs first (R35): all 17 still live, paths verified.
25 agents, 6.87M tokens, ~2.8h. Claimed 15 MATCH; the whole-binary gate — the
sole arbiter (G3/P9) — banked 13, then family_sweep propagated 65 members across
38 overlays.

HEADLINE: func_8017D174 (793 ins) — the largest single crack of this phase. Its
agent closed two compiler-internal residuals jointly: a §137 allocno-priority tie
between &g.sz0/&g.sz1 (R=7, L=607 vs 606 -> 230/231) that spilled the wrong one
and cost a load-delay nop in BOTH switch arms, and a sched2 rotation in the
outer-loop head block that survived 470+ statement orderings. Fix was four
zero-byte asms: two `"=r"/"0"` re-ties splitting wz's live range, plus two
volatile sliders placed in a DIFFERENT basic block so they lift the live-length
count without perturbing the head schedule.

THE 4 NON-BANKS SPLIT CLEANLY (§136b — none is a wall on one attempt):
 - func_8017E2EC (close=20) and func_80186E24 (close=187): honest DIFF verdicts,
   real codegen residuals, ledger material.
 - func_8017D318 and func_80181EE0: claimed MATCH, gate refused -> the known
   match_one->gate gap, which is DECLARATION plumbing (agents cannot run the
   gate, so a TU-level conflict is invisible to them). Routed to the reconcile
   lane, not retired.

AGENT-REPORTED INDEX GAPS worth acting on (the flywheel closing on itself):
 - no symptom key for "schedule rotation at a loop-head block that NO statement
   permutation reaches" — the index's nearest line points at §76 regalloc, and
   the decisive doc was gcc-2.7.2-map/sched.md, which no scheduling symptom
   cross-references.
 - §137 is written as a two-compile arithmetic on ONE contender pair; the real
   fix here was an N-zero-byte-insn budget that ties only for N in {1,3,4} and
   splits the WRONG way for N=2, so a naive "add one slider, add another" walk
   silently regresses.
 - no key for "gcc hoists a loop-invariant SYMBOL_REF base out of a loop the
   target keeps in the `sym(reg)` macro form" (~105 of func_80186E24's 187).
2026-08-04 03:27:54 -06:00
Drew T b497ee1649 feat(phase-30 S33c): PROPAGATE head COMPLETE — func_801466F0 x137 took three fixes + a type-lift
Fleet 96.17 -> 96.21% fn-count / 93.8% instr / 88.0% distinct; dedup 1909 -> 1910
groups, 0 failed, C1 241216/241216. R22 clean-fleet: 140 passed, 0 failed of 140.

The head is now 5/5 classes, 18,545 templatable ins, all banked this session from
a standing start of 0.

func_801466F0 had sat since S6b behind THREE separate blockers, each of which
looked sufficient on its own to explain the failure:
 1. Its definition is under a §37/§73 ASM-LABEL ALIAS (`aF801466F0` in C, bound to
    the real symbol by `__asm__`), and dedup_propagate.find_site anchored its head
    regex on the literal `func_<ADDR>` — structurally blind to the form, returning
    None, which every caller reads as "not matched". Now reuses
    family_remap._alias_decl_for rather than growing a second matcher (R33).
 2. That matcher was itself blind to the WRAPPED (multi-line) declaration — the
    §134 shape, third tool. Fixed by matching over the joined text and mapping the
    offset back to the decl's FIRST line (extract_unit carries from there).
    Regression control: the single-line form still resolves. Fleet census after:
    2,768 of 2,768 alias sites resolve, 0 missed.
 3. Its record type was a draft-local typedef, so the body failed
    compiles_standalone. Lifted Rec801466F0 to src/shared/engine_types.h INSIDE
    the include guard (the SESSION-19 double-include note) and switched both the
    macro and the exemplar to it — byte-neutral, gate-proven.

Probed on ONE member before the fleet run: byte-identical 9052dc0e first try.

MEASURED, NOT INHERITED (R37): the S6b note frames the alias-regex gap as a CLASS
of missed work. It is ONE function — 91 distinct alias decls fleet-wide, the
per-line matcher resolved 90. Recording it so a future session does not scope a
phase against a class that does not exist.

cookbook §138 extended with the alias-form tool boundary and the three-blocker
story; index regenerated.
2026-08-04 00:44:33 -06:00