Commit Graph

146 Commits

Author SHA1 Message Date
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
Drew T ba6cb87d30 feat(phase-20): T2 — exemplar_miner routes 835 residuals (WAVE 472 / PINS 45 reach-134 / STUB 90)
- tools/exemplar_miner.py: consume wall_taxonomy.json + per-overlay reach (dedup_propagate's
  computation) -> route each residual to a lever (WAVE/STRUCT/PINS/STUB); emit
  docs/exemplar_curriculum.md + .run/exemplar_routing.json (wave-gen input)
- routing: WAVE 472 (218 reach-134, T6 fuel) / STRUCT 159 / PINS 114 (45 reach-134) / STUB 90
  (74 ARITY_WALL loose-typing + 16 NONFAITHFUL, honest P9)
- KEY T3 input: 17 reach-134 fns at m2c-mismatch=1 = cleanest regalloc/schedule isolates
  (likely SS17-pins wins + the genuine class residuals); 3 named exemplars confirmed reach-134
- note: census is the Jun-19 snapshot (pre-Phase-19 waves); T5/T6 regen = authoritative WAVE list
2026-06-20 23:55:51 -06:00
Drew T 4f5f73c480 feat(phase-20): T1 — typedef lift closes the type-blocked propagation cap (9 fns ×134)
- build_engine_types.py: add find_typedefs() (brace-aware) + typedef_name() (anon-struct,
  fn-ptr, alias) + same-name/overlap collision guards; lift 14 typedefs to engine_types.h
  in source order after the named structs (A801593E4 -> S801593E4 dep preserved)
- engine_types.h: 48 named types + 14 typedefs; ov_SC01_077 byte-neutral (still d19c9580)
- dedup_propagate --auto-from: 9 reach-134 fns propagated x134 (8013E4B4 80148C9C 8014A238
  8014C118 80153978 801593E4 80168664 8016B964 8017AD0C); engine_core.h +9 DEFINE macros
- FINDING (R14/P9): cap was 16; only 9 were TYPE-blocked (all freed). The other 7 fail on
  undeclared callees/data (80142B2C 801535F4 80155E30 80157580 801576A8 80168F40 80170B48)
  -> the SS19 declaration-plumbing class, a recovery-tooling lever, NOT the type-lift
- check-all 136/136 byte-identical; fleet 58.00%% -> 58.35%%; dedup 1485 -> 1494 / 0 failed; 0 NON_MATCHING (G4)
2026-06-20 23:49:58 -06:00
Drew T de35505a63 feat(phase-19): scale the toolkit — 2 waves (88%/92%), fleet 56.64%->58.00%, propagation is the cap (v1.18.0)
- T1 (prior session, commit:0158/commit:0159): per-file -O0 split infra + 6 -O0 matches; deferred the
  10 %lo-folding-quirk fns + the ×134 rollout (R14 corrected "free ×134")
- T2 (commit:0161): recovery tooling. R14: the 3 Phase-18 "implicit-int" near-misses are NOT
  implicit-int -> resident-callee link-miss (NEW canon_resident_calls.py) + shared-caller arity
  (no-proto caller-extern fix). 3 matches; cookbook §17a-3 corrected
- T3 (commit:0162/commit:0163/commit:0164): 2 Ultracode waves over reach-134 tractable residuals. batch-1
  44/50 match_one (30 banked, 25 propagated ×134); batch-2 35/38 (25 banked, 10 propagated).
  NEW fix_arity_callers.py (no-proto, ALL 18 batch-2 failures were the arity class); canon-first
  2-stage gate (sig_unify REGRESSES canonical drafts); gen_harvest_targets garbled-sig fix
  (0/749, 88%->92%); build_engine_types --strip lift (+4 propagated)
- FINDING: propagation (not matching) caps the fleet-% yield — typedef/local-type bodies can't
  auto-propagate (-> Phase-20 type-lift lever). decomp.dev-comparable byte-weighted est ~30%
- check-all 136/136 BYTE-IDENTICAL (R22); dedup 1450->1485/0 failed; 0 NON_MATCHING (G4);
  fleet 56.64% -> 58.00% (+1.36%). worklog -> phase-ends/logs/Phase19.md (R19)
- bumps 1.17.0 -> 1.18.0
2026-06-20 20:33:00 -06:00
Drew T c43b6d0830 feat(phase-19): T3 struct-lift + propagation top-up — fleet 57.93%->58.00%
- build_engine_types.py --strip: lifted 48 named types -> src/shared/engine_types.h
  (byte-neutral, ov_SC01_077 d19c9580); unblocked +4 struct-using matches -> propagated ×134
  (incl. func_80147514, a T2 match freed by the lift)
- check-all 136/136 BYTE-IDENTICAL (R22); fleet 57.93% -> 58.00%; phase total 56.64% -> 58.00%
- KEY FINDING: propagation (not matching) now caps the fleet-% yield — ~16 banked matches stay
  ov_SC01_077-local because their bodies use typedef'd/anonymous/sibling local types that the
  named-struct-only build_engine_types can't lift (dedup_propagate compiles_standalone rejects).
  Phase-20 lever: extend the type-lift to typedefs -> recovers those ×134 for ~0 agent tokens
2026-06-20 19:57:34 -06:00
Drew T 3e99d2836d feat(phase-19): T3 batch-2 wave — 25 matched, 8 propagated ×134, fleet 57.62%->57.93%
- Ultracode wave (38 targets, clean hints after the gen_harvest_targets fix): 35/38 match_one
  MATCH (92%, up from 88%); 2 of 3 garble-retries now match; 3 DIFF = genuine (delay-slot
  schedule, call-crossing hoist-vs-remat, narrow-param STOP)
- gen_harvest_targets.py: fixed INLINE_DEF_RE (was matching indented `if(func_X(...)){`
  call-exprs as defs -> garbled callee hints agents pasted as externs); 0 garbled of 749
- whole-binary gate: 25 banked. ALL 18 stage failures were the shared-caller ARITY class ->
  NEW tools/fix_arity_callers.py automates the no-proto caller-extern recovery (+8); 10 remain
  = genuine loose-typing conflicts (caller sig != def sig), Phase-16 documented wall
- pipeline finding folded in: gate canon-only FIRST, sig_unify FALLBACK (.run/t3_gate2.sh)
- propagated 8 ×134 (17 stayed ov_SC01_077-local: inline named structs need engine_types lifting)
- check-all 136/136 BYTE-IDENTICAL (R22); dedup 1475->1483 validated/0 failed; 0 NON_MATCHING (G4)
- fleet byte-identical 57.62% -> 57.93% (+0.31%)
2026-06-20 19:51:50 -06:00
Drew T 2f9b0d9906 feat(phase-19): T3 batch-1 wave — 30 matched, 25 propagated ×134, fleet 56.64%->57.62%
- Ultracode wave (50 agents, §17 toolkit): 44/50 match_one MATCH (88%); 6 DIFF = genuine
  gcc-quirk tail (fold-const constant-last, GCSE/reload, loop-IV combine, reg time-sharing,
  narrow-param), correctly stubbed (no false matches)
- whole-binary gate (the sole arbiter, G3/P9): 30 banked. Two pipeline findings (R14):
  - sig_unify REGRESSES already-canonical agent drafts -> gate canon-only FIRST, sig_unify
    FALLBACK (.run/t3_gate2.sh) recovered +5 vs unconditional sig_unify
  - 2 arity conflicts recovered via the T2 no-proto caller-extern fix (func_8014AB7C/AC10)
- propagated 25 ×134 (dedup_propagate --auto-from; incl. the T2-deferred func_8017209C);
  ~5 stayed ov_SC01_077-local (inline named structs, need engine_types lifting)
- check-all 136/136 BYTE-IDENTICAL (R22); dedup 1450->1475 validated/0 failed;
  fleet byte-identical 56.64% -> 57.62% (+0.98%); 0 NON_MATCHING (G4)
- 14 still-failing (3 agent-garble from a gen_harvest_targets garbled-sig bug, 1 struct,
  10 genuine codegen near-miss) -> batch-2 retry candidates
2026-06-20 19:27:53 -06:00
Drew T 85afa0dc81 feat(phase-19): T2 recovery tooling — canon_resident_calls + no-proto caller fix (3 matches)
- R14 finding: the 3 Phase-18 "implicit-int / propagate-first" near-misses are NOT
  implicit-int (reproduced each through the byte-gate). Real classes:
  (a) resident-callee LINK-miss: draft calls func_<ADDR> but the addr has a curated
      name (0x8004CFEC = ratan2) -> "undefined reference to func_8004CFEC". NEW
      tools/canon_resident_calls.py rewrites func_<ADDR> -> curated name (pure draft
      text, body bytes unchanged) -> run FIRST in the recovery pipeline.
  (b) shared-caller ARITY conflict: an engine_core.h caller macro declares the callee
      file-scope `extern void func_X(void)` then calls func_X(); the real def takes an
      arg -> "conflicting types". FIX = caller extern -> no-proto `extern void func_X();`
      (byte-neutral for the caller; compatible with promotion-safe params int/long/ptr).
- 3 matches banked in ov_SC01_077: func_8017209C (ratan2 rewrite), func_80147514 (s32),
  func_80168F40 (void*); 2 no-proto lines in src/shared/engine_core.h
- recovery pipeline: draft -> canon_resident_calls -> sig_unify -> harvest_verify --chunk 1
- make check-all 136/136 BYTE-IDENTICAL (full extract, R22); dedup 1450 validated/0 failed;
  0 NON_MATCHING in any default build (G4); fleet 56.64% (the 3 are ov_SC01_077-local,
  x134 propagation rides T3/Phase-20)
- cookbook §17a-3 corrected (R14/R16); SETUP tool inventory (R21); CURRENT_PHASE T2 done
2026-06-20 17:12:00 -06:00