Commit Graph

153 Commits

Author SHA1 Message Date
Drew T 653d123b65 docs(phase-21): cont.7d — deep frame-RE doesn't crack a scheduler-walled giant (§27)
Drew chose deep re-RE of func_8014EA4C's real frame. Finding: the frame is a DEAD aggregate
copy (8 bytes unaligned-copied to sp+0x20, never read; gcc-2.7.2 keeps it, no DSE). The agent's
buf[16]+memcpy(buf+16) PRECISELY reproduces the exact gcc stack layout (local[0x38] -> frame
0x88, wrong). So the frame is already correct at close=6; the 6 residuals are NOT frame-caused
-- they're loop-body scheduler (global-store vs call-arg-load order) + regalloc (abs  vs
in-place ), the irreducible §20/§25 wall. Deep frame-RE is a dead end for schedule/regalloc
residuals -- only the permuter explores that space. 5 levers (cheap-recovery, permuter,
giant-wave, hand-finish, deep-RE) byte-proven exhausted at fleet 63.17% for the reach-134 tail.
2026-06-25 18:19:19 -06:00
Drew T 4284afb9e6 docs(phase-21): cont.7d — frame-pressure-locked giant residuals are PERMUTER-ONLY (§27)
Hand-finish attempt on func_8014EA4C (close=6, Drew's choice): 2 byte-proven attempts both
cascaded — q0_arg reorder swapped p/q regalloc (6->123); abs-ternary dropped the load-bearing
dead buf[16] frame hack -> frame 0x60->0x58 -> offset cascade (6->23). Confirms the agent: the
residuals (store/load schedule + abs regalloc) are pressure-locked by the frame-forcing hack;
C-steering breaks the frame. The fix is the decomp-permuter (grinder), not C — it explores the
frame-preserving regalloc/schedule space. Grinder is now auto-permuting func_8014EA4C +
func_80144090 (re-logged close=6/25, token-free). cookbook §27.
2026-06-25 17:36:17 -06:00
Drew T 4b836add6d feat(phase-21): cont.7d — 6-giant wave banked 0; giants don't auto-bank (the honest result)
- 6-giant worker_wave (1.16M tokens) BANKED 0. Agents got the SHAPE (§27 recipe works) but the
  whole-binary byte-gate (G3/P9) rejected all 6. func_8014F74C close=0 match_one MATCH yet its RAW
  draft FAILS the byte-gate (no plumbing/data conflict) -> match_one OVER-predicted (§25 masked
  residual). The rest are pure regalloc/scheduling 'not C-steerable -> permuter' (close 6/25/53/91/164).
- Confirms cont.2/Phase-20/Phase-16: giants are HAND-FINISH/permuter fuel, NOT auto-bankable.
  cookbook §27 updated. Do NOT scale giant auto-waves for % (1.16M tokens -> 0 banks).
- GATE BUG (R16, noted): canon/cast/sig_unify regressed near-misses (func_8014EA4C 6->128) and
  poisoned the backlog. Re-logged the 6 with TRUE closeness + raw drafts (source=giant-raw);
  func_8014EA4C(6)+func_80144090(25) now grinder-eligible (token-free).
- INFLECTION (P9): the automated reach-134 harvest is COMPLETE at 63.17% — cheap recovery (0 fresh),
  permuter (~0), giant wave (0/6) all exhausted. Forward % = hand-finishing or close Phase 21.
2026-06-25 17:27:46 -06:00
Drew T 8e78cd7ce8 feat(phase-21): cont.7c — giant approach VALIDATED (func_80176D94 structurally matched) + recipe §27
- Drew chose GIANT SESSION. Validated the giant-matching approach end-to-end:
  hand-matched func_80176D94 (152 ins) to STRUCTURALLY-MATCHED (calls/constants/GPU-packet
  all byte-correct) via the recipe: cached Ghidra-C + call-matching callee decls (arg-arity:
  func_80177784 called 3-arg vs canonical 4-arg) + §17 register pins (regalloc-shift) +
  sibling func_80176FF4 idioms (coord strength-reduce, GPU linked-list pointer).
- Residual = pure regalloc-coalescing (2 extra callee regs vs target caller-saved/-reuse)
  -> saved .run/backlog_drafts/func_80176D94.c as grinder/wave fuel (permuter territory).
- cookbook §27: the Giant matching recipe (5 steps + the pin-reuse caveat + the
  accumulator-coalescing residual class). Giants reach structurally-matched FAST; the last
  mile is regalloc -> isolated-agent + permuter work, not main-loop serial grind.
- Giant pool is ~18 tractable (152-284 ins) + 2 monsters, bigger than the assess's 8.
- NEXT: worker_wave over the giants (§27-seeded) -> gate + propagate ×134. fleet 63.17%.
2026-06-25 16:32:31 -06:00
Drew T 61a37534b9 docs(phase-21): cont.7b — resolved-reach probe REFUTED + close-1 tail is permuter-class (2 R14)
- R14: sig_image h_exact = SHA1(raw IMAGE bytes), UNMASKED (sig_image.py:170-171) -> reach is
  the ACCURATE shipped-byte reach; a resolved-reach probe just reproduces it. The real gap is
  reach (shipped identical) >= realizable-x134 (shared-C reproduces all N), measurable ONLY by
  dedup_propagate's byte-gate on a MATCHED fn. No cheap static probe -> cont.7 'build it' WITHDRAWN.
- R14: func_801775E0 backlog close=1 but saved draft compiles 31-off from source (prologue
  save-scheduling/branch-sense/block-order, the S20 wall) -> close=1 was permuter-achieved.
  RULE (S26): match_one a draft for SOURCE closeness before assuming a pin crack. The close-1..4
  codegen tail is permuter-class (grinder territory), not cheap pin targets.
- INFLECTION (P9): the cached reach-134 automated harvest is COMPLETE; forward %-progress needs
  a token-heavy lever (8 giants / per-fn pin-cracking) -> Drew's ROI greenlight. cookbook S26.
2026-06-25 13:52:43 -06:00
Drew T cf23808d5c feat(phase-21): cont.7 — cheap close=0 recovery EXHAUSTED (byte-proven); fix --assess double inflation
- THE FINDING (R14/P9): the _a close=0 recovery banks 0/20 (same def-side multi-way
  loose-typing wall as MAIN 0/40, cont.6). cont.6's func_8012F568 was the lone simple-arity
  win; the rest need a C type that conflicts caller-decl-vs-def with no single fitting sig.
  The cheap close=0 ×134 recovery lever is EXHAUSTED.
- TOOLING (R16, idiom_loop.py --assess was DOUBLY inflated, now fixed):
  (1) load_backlog drops banked-since-logged fns (intersect ledger w/ live INCLUDE_ASM stub
      set, mirrors backlog._matched_now) -> killed the bogus 'unknown 14' class + ~10/class
      stale-matched inflation (schedule 49->39 r134, regalloc 44->39).
  (2) DETERMINISTIC-RECOVERY splits FRESH (never recovery-gated = genuine fuel) vs WALLED
      (recovery-failed = def-side wall, do NOT re-run). Post-fix: 0 FRESH / 46 WALLED.
- schedule wave NOT fired (ROI-gate, S20/S26): ~50% x134 fraction on n=2, median 15 ins off,
  over an h_exact-inflated count. No tokens spent speculatively.
- cont.6 option-3 CONFIRMED: cached reach-134 cheap fuel is dry; the genuine levers are
  token-heavy fresh-session work (the 8 giants / per-fn pin-cracking / build a resolved-reach
  probe). cookbook S26. 0 banks; fleet 63.17% unchanged; 136/136 byte-identical; 0 NON_MATCHING.
2026-06-25 13:09:02 -06:00
Drew T 790326057a feat(phase-21): cont.6 — sig_unify --src-file + gate two-stage; schedule idiom = coalescing (§25)
- sig_unify.py --src-file: read cur_stubs/decls from the SPLIT .c (_a/_o0) so split-file
  drafts aren't dropped + get the def-side recovery (closes the §24 gap). gate_stage passes
  it to cast + sig_unify in --src-file mode. Banked func_8012F568 x134 earlier (commit:0277).
- gate_stage.py CANON-FIRST two-stage (§19 folded into the shared gate): stage1 canon+cast
  gate (already-correct/hand-pinned cracks bank), stage2 sig_unify ONLY the failures (def-side
  recovery, no regression). Fixes sig_unify regressing the func_80128ED8 crack.
- schedule idiom CRACKED (cookbook §25): func_80128ED8 = gcc copy-COALESCING, not scheduling;
  2 register pins (idc->$a3 forces the multiply onto $v1; idc+1->dead $v0 temp) -> MATCH,
  banked x1 (commit:0278). + the rank_for_schedule tie-break (priority->class->LUID source-order)
  + the genuine walls (§10 cross-jump/delay-slot, store-vs-load).
- FINDING (R14/P9): h_exact OVER-COUNTS x134 (relocation-masked) -> func_80128ED8 is x1 not
  x134; probe dedup_propagate --addr before a token-heavy wave. schedule is NOT a confirmed
  x134 vein -> the wave is ROI-deferred.
- check-all 136/136 byte-identical (R22); 0 NON_MATCHING (G4); fleet 63.13% -> 63.17%
2026-06-25 01:17:12 -06:00
Drew T 63b83d93f6 chore(phase-21): regen digests at the cont.5 handoff checkpoint (fleet 63.13%) 2026-06-24 23:17:06 -06:00
Drew T 5e5423e953 feat(phase-21): dedup_propagate drop-straggler retry — _a pipeline now hands-free
The 2nd straggler class (cont.4 wave-2): cross-overlay loose-typing COMPILE errors (not just
the -O0 byte-mismatch class). The -O0 exclusion alone was insufficient. Refactor the propagation
into a drop-straggler retry loop: extract apply_plan(subplan, restrict=); on a byte-gate failure,
isolate the culprit(s) for the failing overlay (per-fn trial), drop them (kept x1), retry the
survivors. Handles BOTH straggler classes failing ANY overlay; plan strictly shrinks (terminates);
byte-gate stays sole arbiter (a dropped fn never banks where it isn't byte-identical).

Validated end-to-end: wave-2 --auto-from auto-dropped 2 loose-typing stragglers + propagated 3
clean x134 (commit:0271); fleet 62.70 -> 62.82%. Future _a waves now auto-realize x134, no manual probe.
2026-06-24 22:11:27 -06:00
Drew T e30697a081 docs(phase-21): _a vein is a x134 lever (10/11) — worker_wave region-fix + cont.4 findings
- worker_wave.js: derive match_one self-check --asm-subdir per-target from t.asm
  (was hardcoded main subdir -> every _a agent self-check crashed on missing .s ->
  blind drafting). Enabled the 16/24 close rate on the _a measurement wave.
- CURRENT_PHASE cont.4: the _a vein is x134 (10/11 propagate byte-identical), not the
  cont.3/§24 x1 wall. The gate's propagated:0 was 2 bugs: dedup_propagate all-or-nothing
  batch-revert poisoned by 1 stale -O0 overlay-local straggler (func_8013C360), and
  gate_stage sh() swallows dedup_propagate's non-zero exit. Realized +0.39% (commit:0267).
2026-06-24 20:37:57 -06:00
Drew T cbf7e774ab feat(phase-21): split-aware dedup_propagate + cast_call_sites --src-file (unlock the _a.c vein)
- dedup_propagate split-aware: overlay_files() handles ov_SC01_077's Phase-19 split (main + _a/_o0);
  source-find scans all, member-loop edits the right file, structural-check spans all. Single-file
  overlays unchanged (default path). Validated: source-find (--check-only 134 members) + fail-closed revert.
- cast_call_sites --src-file: canonicalize callee decls against the file the draft lands in (cross-file
  loose typing — a callee declared differently in main vs _a.c). Default = main, unchanged.
- FINDING (cookbook §24): the fresh reach-134 fuel (66+ fns) is in ov_SC01_077_a.c (a tooling gap, not
  difficulty); bodies are matchable (func_8012C098 cast-banked) BUT matching/propagation hits the same
  §16/§20 loose-typing wall (func_8012C098 cross-overlay def-conflict -> x1; func_8012F274 within-_a
  RotTransSV multi-sig). x134 yield uncertain -> a small measurement wave is the next probe.
- no net banks this turn; fleet 62.31% unchanged; ov_SC01_077 verified d19c9580 (R22). sig_unify reverted.
2026-06-24 13:11:56 -06:00
Drew T 0d92e5640f docs(phase-21): correct the giants finding — stale+incomplete drafts, not cheap near-misses (R14/P9)
- SELF-CORRECTION: a per-fn objdump diff that didn't remove .o/.elf reported 10 FALSE giant
  byte-MATCHes (the §20 stale-.o trap). The real gate (harvest_verify, removes output) banks 0/10:
  the MAIN giants' prior-wave drafts are STALE+INCOMPLETE vs the grown engine_core.h (conflicting/
  undeclared data decls, link errors). They need RE-DRAFTING fresh, not a recovery transform.
- fixed .run/diag_funcdiff.py to os.remove artifacts first (gitignored tool); the whole-binary SHA
  gate is the sole arbiter (G3/P9) — it was right while the diag lied.
- cookbook §23 rewritten: func_80153E00 (cracked, scalar-data CAST) stands; the 'giants are
  near-misses' generalization corrected. sig_unify trailing-/* */-comment extern skip documented
  (fix reverted — unproven + data-cast is the right lever). 11 _a.c giants need split-aware tooling.
- no new banks this turn; fleet 62.31% unchanged; ov_SC01_077 verified d19c9580 (R22).
2026-06-24 01:19:26 -06:00
Drew T 72a5da614b docs(phase-21): giants are near-misses not plumbing-blocked (R14) — func_80153E00 cracked via scalar-data-cast
- COOKBOOK §23: the giants compile+link clean; match_one over-predicts (standalone + masks relocs);
  diagnose each via .run/diag_funcdiff.py (linked-ELF per-fn objdump diff). func_80153E00 was 1/195 off.
- the scalar-data-signedness CAST *(u16*)&D_8011DB0C (data analog of cast_call_sites): keep canonical
  extern s16, cast the read -> gcc folds to lhu, no decl conflict, survives sig_unify. Refutes §20
  'data-cast moot' (which only checked struct/union, not scalar signedness).
- CURRENT_PHASE handoff updated; func_80153E00 banked x134 (fleet 62.27->62.31%, commit commit:0260).
2026-06-23 19:39:18 -06:00
Drew T 71e3dc9370 chore(phase-21): SESSION CHECKPOINT — fleet 62.27% (+1.11%); reach-134 pivot + giants finding; full handoff
Final handoff logged to CURRENT_PHASE ★★★ (session arc, 12 idioms, 3 pool fixes, the giants
body-tractable-but-plumbing-blocked finding + the recovery-tooling eureka lever, resume commands).
Grinder stopped (banked 5 token-free). Worker reach-134 pivot banked 26 x134 (+0.97%).
2026-06-23 18:43:33 -06:00
Drew T 74021b0840 chore(phase-21): checkpoint — PIVOT to reach-134 (fleet 61.73%, +0.51%/wave); grinder live; 12 idioms 2026-06-23 12:23:52 -06:00
Drew T f555a441a3 docs(phase-21): distill — handwritten-GTE-sqr cop2-nop + raw-byte-verify idiom from func_8013E2C4 2026-06-23 12:21:51 -06:00
Drew T e8b1f8f253 docs(phase-21): distill — explicit-temp load-delay-fill idiom from func_801856F8 2026-06-23 11:50:51 -06:00
Drew T 28afb3c49c docs(phase-21): distill — per-access (volatile T*) field-reload idiom from func_801424E4 2026-06-23 11:12:15 -06:00
Drew T d07c6edb0a docs(phase-21): distill — volatile-global forces reload-between-stores idiom from func_801806D8 2026-06-23 10:36:56 -06:00
Drew T 934c007df8 docs(phase-21): distill — global-RMW pointer-var address-materialize idiom from func_80186938 2026-06-23 03:39:30 -06:00
Drew T a830648291 chore(phase-21): checkpoint — session reach-1 progress (fleet 61.21%, 215 banked, 7 idioms, 2 pool fixes)
CURRENT_PHASE SESSION UPDATE refreshed (waves 17-25) + regenerated digests. Crash-recovery (R30).
2026-06-23 03:13:49 -06:00
Drew T 8e892ad49e docs(phase-21): distill — packed-aligned(1)-union unaligned-source load idiom from func_80142A80 2026-06-23 03:11:26 -06:00
Drew T 1e5cc1b28f docs(phase-21): distill — exploit-cross-jump dual-arm-call idiom from func_80159BE4 2026-06-23 02:45:37 -06:00
Drew T 279662bbed docs(phase-21): distill — barrier-free memory-reload-via-statement-order idiom from func_80168430 2026-06-23 02:23:46 -06:00
Drew T e59e8b5ef6 chore(phase-21): checkpoint — session 2026-06-23 reach-1 progress (fleet 61.19%, 165 banked, 4 idioms, pool fix)
CURRENT_PHASE.md SESSION UPDATE + regenerated fleet/backlog/progress digests.
Captures waves 17-22 state for crash-recovery (R30). No source change.
2026-06-23 02:07:35 -06:00
Drew T c694c9d7a1 docs(phase-21): distill — combined store-and-capture call-result idiom from func_80142DC4 2026-06-23 02:05:40 -06:00
Drew T 43d089ec64 docs(phase-21): distill — byte-predecrement +0xFF-not-1 immediate idiom from func_8016EBA8 2026-06-23 01:42:09 -06:00
Drew T 478aeeee2a docs(phase-21): distill — $sp-switch inline-asm trampoline idiom (maspsx delay-nop/.set-reorder/%% rules) from func_8014CCB4 family 2026-06-23 01:28:13 -06:00
Drew T bbfe27d095 docs(phase-21): distill — u16-vs-s16 high-bit-const halfword-store ori idiom from func_8017E924 2026-06-23 01:09:19 -06:00
Drew T 9d07712205 feat(phase-21): reach-1 harvest pivot — fuel built + handoff (×134 walls exhausted at 61.16%)
- ×134 wave fuel walled (waves 13-16: +6 banked incl 476-ins func_80141CA4 ×134, fleet
  60.93% -> 61.16%); grinder stopped (Drew). Pivot to reach-1 (overlay-unique) fuel.
- reach-1 fuel BUILT: 298 uncached reach-1 prefetched (headless DecompileFunctions.java,
  298 ok / 0 fail) -> all 420 reach-1 region-main draftable fns cached (median 47 ins).
- tools/wave_targets.py: new reach1 pool, SMALLEST-FIRST sort (idiom-mining order).
- tools/orchestrator.py: reach1 in POOLS; orch_state set to reach1 (prep --mode pool serves it).
- docs/automation-runbook.md + CURRENT_PHASE.md: the reach-1 smallest-first harvest cycle
  (distill EVERY wave) for the fresh session Drew drives. x1 leverage (ov_SC01_077 only).
- docs/matching-cookbook.md: marked the 2 floating §21 bullets CANDIDATE/unverified (near-miss
  func_801775E0, not byte-banked); drafter-cookbook-edit guard at commit:0219.
- NOT started: no waves launched (Drew's instruction). Byte-gate unchanged (G3/P9).
2026-06-22 21:22:35 -06:00
Drew T 501d112758 docs(phase-21): session handoff + queued 10h run (fleet 60.93%) — crash-recovery for fresh session
- CURRENT_PHASE ★ CURRENT STATE: overnight loop summary (59.05->60.93%, ~55 fns, 12 waves), the 3
  gate-safe tooling upgrades + 6 idioms, the tractable-pool-depleting finding, exact resume cycle
- ▶ QUEUED 10-HOUR RUN: fuel verified (80 tractable+28 giants+9 o0 cached, grinder 21 eligible),
  staged first batch, paste-ready fresh-session start (grinder + worker loop, auto-rotate to giants)
- T6 marked done (the loop ran); T7 (close) pending Drew's gate-2. NOT STARTED (STOP present).
2026-06-22 07:47:14 -06:00
Drew T 0b77956d54 docs(phase-21): drafter-distilled idioms (non-volatile reload-clobber, phantom-frame induce) + backlog/progress regen
func_801758FC's drafter added two byte-verified idioms to cookbook §21 (additive, H5-safe).
2026-06-22 03:31:30 -06:00
Drew T 29858df0b4 docs(phase-21): distill — register-short-truthiness sll-16 idiom from func_8013F244 2026-06-22 00:08:05 -06:00
Drew T 4927f38c46 feat(phase-21): option C — grinder blacklist + sig_unify DEF-side arity-extend recovery
- grinder.py: persistent blacklist for permuter-won/gate-rejected (plumbing-bound) fns;
  stops the tried.clear()-after-idle churn (was 0 banks in 8h on func_8014F3E8/func_8014FE60)
- sig_unify.py rewrite_def: adopt the canonical param list on arity mismatch (DEF-side
  loose-typing wall) — unused extras sit in $a0-$a3, free at -O2; banked func_8016EDEC/EE40
- cookbook §22 (DEF-side recovery + grinder blacklist); CURRENT_PHASE option-C log
- compounds: sig_unify is in the gate pipeline -> every future wave + the grinder auto-recover
2026-06-21 22:55:40 -06:00
Drew T 9dcabfbdc7 docs(phase-21): distill — giv-anchor store-order idiom from func_80178298 2026-06-21 22:39:22 -06:00
Drew T 0744e5ad89 docs(phase-21): distill — disjoint-bits add->ori barrier idiom from func_80169058 2026-06-21 22:05:23 -06:00
Drew T fc3b7d25e1 docs(phase-21): distill — memcpy-unaligned + 16-byte struct block-copy + out-param-buffer idioms from func_80153800/func_80163A94/func_801749C8 2026-06-21 15:22:16 -06:00
Drew T 5fc5d64445 feat(phase-21): R2/R3 — the learning flywheel (class-grouped waves + distill)
- residual class travels with the draft: drafter stamps // @class / // @stuck; gate_stage logs
  the worker's gcc-quirk class to the backlog (not the coarse manifest class).
- wave_targets.py --class <C> / --list-classes: class-grouped re-attempt waves over the backlog's
  classified near-misses (REGALLOC/SCHEDULE/REMAT/STRUCT/IV/LOOPGUARD/LOOSE/PLUMBING).
- orchestrator prep: auto-picks a class-focused wave when a class accrues >= threshold near-misses,
  else a fresh pool harvest; clears the draft dir per wave.
- tools/workflows/distill.js: post-wave agent extracts NEW byte-verified gcc idioms -> cookbook §21
  (R16, conservative); drafters now read the LIVE cookbook so distilled idioms feed forward.
- runbook: the full prep->worker->gate->distill cycle (the Phase-18 close-rate loop, automated).
2026-06-21 13:56:59 -06:00
Drew T aa010db9d4 feat(phase-21): R1 — gate pre-reboot wave2 drafts (+2 fns x134)
- gate_stage on the 15 worker drafts saved before the reboot: banked 2 byte-matches,
  propagated x134 (dedup 1508->1510); the gate process was killed pre-commit (empty log),
  banks recovered from the working tree (dedup_propagate fail-closed per-overlay = verified).
  Remaining 13 -> backlog near-misses.
2026-06-21 13:50:53 -06:00
Drew T 7bd3fa2ee9 docs(phase-21): backlog snapshot at reboot stopping point 2026-06-21 13:30:01 -06:00
Drew T 66d1af0e09 docs(phase-21): automation runbook + status tool (grinder running; worker = remote-driven)
- docs/automation-runbook.md: launch/monitor/stop for the grinder (live) + worker /loop;
  safety invariants (byte-gate sole arbiter, git crash-safe, auto_stop kill switch);
  remote-management note (Drew can remote in -> no bulletproof keep-alive needed).
- auto_status.sh: show grinder + worker heartbeats, backlog, phase-21 checkpoints, daemons.
2026-06-21 13:12:04 -06:00
Drew T 8de18e617d feat(phase-21): T4/T5/T6 — worker validated (func_80164530 x134), grinder, orchestrator
- T4 worker Workflow validated: 3-target wave, all self-MATCH; whole-binary gate banked
  func_80164530 x134 (5 register-pins + offset-fold + scheduling). fleet 58.90->58.98%.
  §20 holds (1/3 survived the whole-binary gate); the 2 near/failed -> backlog.
- T5 grinder: token-free permuter of backlog near-misses -> gate_stage; gate correctly
  rejected a permuter over-prediction (integrity intact). auto_supervisor DRIVER-param.
- T6 orchestrator.py: ROI pool rotation (prep/finish/status); gate_stage flock serializes
  grinder+orchestrator builds. Sandbox: detached daemons build fine, foreground needs override.
2026-06-21 13:06:34 -06:00
Drew T c2e93e50cd feat(phase-21): T3 — backlog ledger + shared gate stage (validated, +0.08%)
- tools/backlog.py: near-miss ledger (.run/backlog.jsonl + docs/backlog.md ranked by
  reach->closeness->size; drop-now-matched filter, P9). tools/gate_stage.py: the shared
  deterministic spine both worker+grinder call (canon_resident_calls -> cast_call_sites ->
  sig_unify -> harvest_verify --chunk 1 -> dedup_propagate --auto-from -> backlog -> summary).
- validated end-to-end on a real 30-draft m2c sample: banked func_801710DC + propagated x134
  (dedup 1506->1508), 29 near-misses logged+ranked. make check-all 136/136 byte-identical
  (R22); fleet 58.82%->58.90%; dedup-check 1508 validated/0 failed (G3/P9).
- capped-fns reframe (R14): they're matched-inline (propagation-blocked), not draftable ->
  deferred to the worker; not claiming the unbanked +0.3% (P9).
2026-06-21 12:32:21 -06:00
Drew T e803651f0c feat(phase-20): close — cap tool + T3a %lo crack + 3 byte-proven findings; fleet 58.00%->58.82% (v1.19.0)
- THE CAP TOOL tools/cast_call_sites.py (§17a-1 callee-cast): per draft, callee whose canonical
  TU sig != draft's intended sig -> decl->canonical + call-site cast ((ret(*)(args))func_X)(args)
  (codegen-neutral; gcc folds the cast of a known symbol -> direct jal). Recovered 6 of T6 batch-1's
  33 gate-fails byte-identical (5 x134 + 1 local). Pipeline canon_resident_calls -> cast_call_sites
  -> sig_unify -> harvest_verify --chunk 1.
- T3a CRACKED (not cited): the %lo-folding indexed-global -O0 residual falls to the array-of-STRUCT
  idiom (extern Struct base[], sizeof==stride, base[i].field; NOT *(T*)(&sym+i*stride) which
  materializes &sym). func_8013B7AC banked. Reusable idiom fleet-wide. cookbook §18/§20.
- THREE byte-proven findings (R14): (1) the wave cap is the DEF-side loose-typing wall, not
  callee-conflicts (the §20 "~33" projection was wrong); (2) the -O0 cluster is OVERLAY-LOCAL,
  not reach-134 -> the ×134 rollout is INVALID; (3) data-cast is MOOT (0 real data conflicts).
- T1 typedef type-lift (+0.35%, 9 fns x134); T2 exemplar_miner router; T4 codegen map (cookbook §20);
  T6 batch-1 (+0.28%, 8). dedup 1485->1513/0 failed. check-all 136/136 BYTE-IDENTICAL (R22);
  0 NON_MATCHING (G4). fleet 58.00% -> 58.82%.
- rule R30 (capture context-dependent knowledge before a fresh session). worklog -> logs/Phase20.md.
- bumps 1.18.0 -> 1.19.0
2026-06-21 10:26:34 -06:00
Drew T f1a7e518f5 feat(phase-20): T3a CRACKED — %lo-folding -O0 falls to the array-of-struct idiom
- the %lo-folding indexed-global -O0 residual (§18, long "irreducible") is CRACKED: declare
  the global as "extern Struct base[]" (sizeof == stride) and access "base[i].field" -> gcc
  keeps sym a symbol_ref and folds %lo(sym+off) into the store, byte-matching. The failing
  forms "*(T*)(&sym + i*stride)" materialize &sym as a value first, blocking the fold.
- func_8013B7AC byte-gated + banked (x1 — the -O0 cluster is overlay-local, R14 finding above);
  the idiom is reusable fleet-wide for ANY indexed-global access (-O0 or -O2).
- cookbook §18 ("%lo-folding indexed global — CRACKED") + §20 placeholder closed.
- the other 9 -O0 stubs: idiom applies but need per-fn -O0 drafting (3 quick ones tried, failed
  on -O0 codegen detail; 4 are large) -> backlog/autonomy fuel. clean rebuild d19c9580 (R22).
2026-06-21 09:58:01 -06:00
Drew T a978081b2d docs(phase-20): data-cast is moot (R14) — 0 data-type conflicts on the tail
- byte-proven: 0 drafts declare an extern struct/union data conflict; the lone apparent
  DATA-conflict (func_8016A8FC/D_800AE620) was a typedef-REDEFINITION (Blk20 inline vs
  engine_types.h, same type) masking the def-sig loose-typing wall. Stripping the inline
  typedef compiles but still byte-mismatches. data-cast = code for 0 cases -> not built.
- cookbook §20 DATA-conflict note corrected; fleet unchanged 58.82%.
2026-06-21 09:30:22 -06:00
Drew T 7f2f314896 docs(phase-20): -O0 ×134 rollout is INVALID — cluster is overlay-local, not reach-134 (R14)
- byte-proven: only 1/134 overlays shares ov_SC01_077's -O0 cluster bytes; the 6 matched
  -O0 fns reference per-overlay data addresses (func_8013B568 -> D_80187270 in ov_SC01_077
  but 0x80182B04 in ov_SC01_005), so they're overlay-LOCAL, not ×134-shareable. The
  Phase-18/19 'reach-134' label conflated function-present with byte-identical (R14).
- the §18 split infra (rollout tool + Makefile %_o0.o pattern + PROVIDE .ld) was built and
  byte-validated to compile/link a 2nd overlay; the whole-binary gate then exposed the
  per-overlay-data wall -> reverted (the finding is the deliverable, P9).
- -O0 rollout = ×1 per-overlay-unique re-matching (~0.2-0.3%), NOT +0.6% free -> SKIP.
  cookbook §18 corrected; fleet unchanged 58.82%, 136/136 byte-identical.
2026-06-21 09:26:44 -06:00
Drew T 6c5bd1c4a9 feat(phase-20): cast_call_sites.py — the §17a-1 callee-cast cap tool; 6 recovered, fleet 58.63%->58.82%
- tools/cast_call_sites.py: per draft, callee whose canonical TU sig != draft's
  intended sig -> decl->canonical (kills in-TU conflicting types, keeps symbol in
  scope) + call-site cast ((ret(*)(args))func_X)(args) (codegen-neutral: gcc folds
  the cast of a known symbol -> direct jal). Pure --in/--out; whole-binary gate is
  the arbiter (G3/P9). Pipeline: canon_resident_calls -> cast_call_sites ->
  sig_unify -> harvest_verify --chunk 1
- recovered 6 of T6 batch-1's 33 gate-fails byte-identical (func_80153C44/8015CF58/
  801711FC/80161BE0/801683D8/8015F948); 5 propagated x134 + 1 local; check-all 136/136
- R14 CORRECTION of cookbook §20's '~33' projection (byte-proven): the batch is NOT
  mostly callee-conflicts — ~6 callee (cast-recovered), ~18 DEF-side loose-typing wall
  (def's matchable sig conflicts with the unchangeable caller-canonical; caller-side
  fix BLOCKED because INCLUDE_ASM declares no symbol -> a shared macro's internal
  extern is load-bearing in the 133 stub overlays), + a small DATA tail. The def-side
  needs re-drafting under the caller-canonical sig (future wave), not a text transform
- cookbook §20 RESOLUTION + SETUP tool inventory (R16/R21/R30); CURRENT_PHASE log (R28)
- fleet 58.63% -> 58.82%, dedup 1501 -> 1508, 0 NON_MATCHING (G4)
2026-06-21 02:04:39 -06:00
Drew T 2070cdb000 docs(phase-20): T4 — distill the codegen map (cookbook §20) + R14 loop-guard correction
- cookbook §20: the wave-at-scale GATE CAP (match_one over-predicts; the in-TU loose-typing
  call-graph wall; all recovery levers fail; the only fix is automating §17a-1 call-site casts =
  Phase-21 cap lever) + the stale-.o diagnostic lesson
- CONFIRMED-irreducible classes w/ byte-evidence: §10 store-vs-load (8014F2E0/80150528), §10
  hoist-vs-remat (80149374/801493D0); NEW classes: IV-combine combine_givs (80177AD4),
  hoisted-invariant prologue order (80177F84), the -O1 build-infra class (80161A90)
- operational gotchas: Workflow args-as-array, harvest_verify --chunk 1
- R14 correction to §17a: loop-guard (8012C2D0) is STRENGTH-REDUCTION/IV-final-value addressing,
  NOT operand-order
- SETUP §tooling: exemplar_miner.py (T2) + build_engine_types.py typedef-lift (T1) (R21)
- T3c cited (written up), T4 done; CURRENT_PHASE handoff refreshed
2026-06-21 01:24:01 -06:00
Drew T 9991e4d6be feat(phase-20): T6 batch-1 — harvest wave 41/48 match_one, 8 banked (7 x134), fleet 58.35->58.63%
- Ultracode wave on 48 cached reach-134 <=90-ins targets: 41/48 match_one MATCH (85%)
- whole-binary byte-gate: 8/41 banked (canon 3 + sig_unify 5); 7 propagated x134 + 1 local;
  dedup 1494->1501, check-all 136/136, +0.28%
- FINDING (R14/P9): match_one->gate gap ~80% this batch = EXTERN-CODEGEN-COUPLING (a callee's
  declared sig changes the call codegen; match_one uses the draft externs, the gate uses the
  overlay decls). The 33 lost are byte-correct vs the wrong externs -> need a callee-extern-
  canonicalize pass (NOT sig_unify, which rewrites the def-sig and regresses byte-correct drafts)
- the 7 DIFFs = gcc-class diagnoses: T3c store-vs-load (8014F2E0/80150528) CONFIRMED unsteerable
  (sched.c); SS10 hoist-vs-remat (80149374/801493D0); IV-combine (80177AD4); hoisted-invariant
  order (80177F84); 80161A90 = -O1 (build-infra)
2026-06-21 00:57:04 -06:00