Commit Graph

190 Commits

Author SHA1 Message Date
Drew T bce95a13cd docs(phase-23): T10.7 GLM5.2 A/B result — 10x codegen edge, but def-side wall caps banks (3/18)
- GLM5.2 vs v3 on 18 hard-band fns: 10/18 vs 1/18 match_one; 3/18 vs ~1/18 whole-binary bank
- def-side loose-typing wall (Phase 16/20) caps banking for ANY drafter (Fable5 review §3c: HOLDS)
- 6 hardest beyond GLM too (0/6 at MAXTOK=16000); ~$1.02 of $25 spent
- 3 strategic options handed to Drew (direct-drafter / flywheel / wall-reconciliation)
2026-07-01 20:01:14 -06:00
Drew T 14fbc0039d docs(phase-23): T10.6 campaign result — 1297 banked, fleet 64.6%, ~92% ≤15 saturated (crash-graceful) 2026-07-01 14:23:09 -06:00
Drew T 8dc42f12b5 docs(gen3): parking-lot for asset export/Unity + verified mesh-state survey
- docs/gen3-parking-lot.md (NEW): town mesh/texture + Musashi->Unity export ideas, PARKED (Gen3).
  Verified survey (read-only, 2026-07-01): BFM uses the libgs TMD model path — real jal
  GsMapModelingData + GsLinkObject5 call sites (EXE 0x8001C2xx-0x8001C9xx model subsystem +
  ov_SC02_005); render = stock libgpu; no libgs sort/anim calls (custom anim -> Musashi harder);
  textures via VRAM rip + type-0 'graphics' blobs; no exporter tooling yet. Decisive next probes listed.
- CURRENT_PHASE.md: T10 done + T10.6 campaign in-flight + T10.7 OpenRouter-next notes (crash-recovery)
2026-07-01 00:52:23 -06:00
Drew T e9f199530e docs(phase-23): T10 harvester built + measured — 65% bank-rate, parallel gate ~75x, vLLM justified
- gen2-mips-matching-model.md: T10 RESULT (bulk_harvest phase-separation; 52/80=65% on fresh
  SC03 <=15-ins; gate 0.4s/fn/8w vs ~30s/fn serial; drafting now the sole bottleneck -> vLLM)
- SETUP.md: bulk_harvest.py inventory row + gate_stage/harvest_verify parallel-safe params (R21)
- CURRENT_PHASE.md: T10 done (built+measured), T10.5 vLLM split out as Drew-gated; progress log
2026-06-30 23:22:46 -06:00
Drew T 69189570da docs(phase-23): session close — handoff CURRENT_PHASE for the harvester-factory build (T10)
- fleet 64.19%, 136/136 byte-clean; injection lever +0.34% banked this session
- ★ NEXT TASK rewritten: build phase-separated + vLLM batched harvester (Drew option c)
  with the full fuel map (~4,597 unique ≤15 funcs, SC03=12,497), the throughput finding
  (~48s/func + GPU-idle-during-gate), the applied fixes, and the parked items
- supersedes the stale reach≥2/14B plan; 14B-for-giants now AFTER ≤15 saturation
2026-06-30 15:59:47 -06:00
Drew T 7dbdd1ce47 perf(phase-23): cap api_draft max_tokens 4096->512 (no-stop ramble) + capture saturation/throughput findings
- the model rambled to 4096 tokens on no-stop-token drafts (~80-130s each); a
  ≤15-ins fn's C is ~100-300 toks, so 512 truncates the ramblers (gate-rejected anyway)
- CURRENT_PHASE: ≤15 band NOT saturated (~4,597 unique / 4,087 untried, SC03=12,497);
  drafting ~15-18s/func serial is the throughput wall; architecture = phase-separate +
  parallel-gate + vLLM batched serving (the real GPU lever); fresh bank-rate still TBD
2026-06-30 15:52:04 -06:00
Drew T 72dabb470c feat(phase-23): broad v3 harvest (48 banks) + final propagate sweep; docs
- bounded broad v3 harvest banked 48 small fns across SC01/SC02 overlays (mostly
  reach-1 ×1; fleet 64.16->64.18%), final propagate sweep +4 groups (1687->1691)
- check-all 136/136 byte-identical, dedup-check 0 failed
- docs/community-matching-model-plan.md (publishing the drafter — parked)
- docs/sister-decomps.md (VS cross-project plan + idiom-discovery rationale — parked)
- CURRENT_PHASE.md: 2026-07-01 session arc (injection lever +0.34%, the type-walled-14
  deferred, the saturation-campaign plan)
2026-06-30 13:54:53 -06:00
Drew T d9f4dc86e4 docs(phase-23): lock the decided next-session sequence — A (reach≥2 with v3) then B (14B)
Drew's call: the fresh session starts with Path A (lora_grind --min-reach 2 + v3 → setter banks
propagate ×134 + dedup-collapse + flywheel), then Path B (corpus-v4 + a cloud Qwen2.5-Coder-14B
for the giant band). Rationale: A is $0/immediate and its banks enrich B's training corpus.
2026-06-30 10:08:51 -06:00
Drew T 060334d744 docs(phase-23): CURRENT_PHASE up to date — v3 + local serving live; T8/T9 done; next = reach≥2 (v3) or 14B
Refresh the resume blocks for a fresh session: state (v3 current model, serve via
serve_local.py — LM Studio ejected, fleet 63.82%); T8 corpus-v3 + T9 operating-loop marked
DONE; NEXT = two paths (A: lora_grind --min-reach 2 with v3 → setter banks propagate ×134 +
dedup-collapse; B: corpus-v4 + a cloud 14B for the giant band, gate now satisfied); serve+run
command updated to serve_local.py + v3; Decisions/Guardrails/Reuse updated off LM Studio.
2026-06-30 09:45:32 -06:00
Drew T 1eadbc73e9 docs(phase-23): 8-hour autonomous run — corpus-v3 + v3 + local serving; fleet 63.67->63.82%
The run (Drew away): built tools/serve_local.py (Unsloth GPU serving, replaces ejected LM
Studio); the prompt fix (translate-every-instruction, 0/3->2/3 on the empty-leaf class);
corpus-v3 (mine the 1623 engine_core.h DEFINE_func macros + struct types: 1312->2891 pairs,
2534+291 trainable); v3 trained (loss 1.275->0.085) eval 23/40 (57.5%); v3 production batch
banked ~352 fns + 45 new shared groups -> fleet 63.67->63.82% (+502 byte-identical), 136/136
byte-clean, 25 auto-commits, $0. v3 banks the empty-leaf/setter class v2 couldn't.

- docs/gen2-mips-matching-model.md: corpus-v3 + serving + prompt-fix + v3 eval + harvest
- docs/SETUP.md: LLM matching tier added to the Tooling inventory (R21)
- phase-ends/CURRENT_PHASE.md: run progress + next levers (reach>=2 targeting, dedup-collapse)
2026-06-30 07:36:33 -06:00
Drew T e91859fb4a feat(phase-23): grinder per-binary fix (5-layer) — unlock non-077 near-miss grinding
The grinder/backlog pipeline was ov_SC01_077-hardcoded 5 layers deep (same class as the
T7 lora_grind bug). Fixed all so the permuter grinder can process a non-077 near-miss:
1. gate_stage.append_record stores the source "binary"
2. backlog.FIELDS keeps it (else append_record dropped it)
3. backlog.load_best/_open_stubs is fleet-aware: a fn matched in ov_SC01_077 but
   propagation-stuck stays OPEN in its overlay, so it surfaces via that record instead
   of being dropped as "matched" (the grinder must SEE it to grind it)
4. p16_permute.setup takes the target binary's asm-subdir (was hardcoded 077)
5. grinder resolves per-binary asm + gates grouped by binary + allows unknown nins
Backward-compatible: legacy records (no binary) default ov_SC01_077.

Validated end-to-end: the 3 fresh reach-134 close=1 ov_SC01_000 fns now surface, resolve
to ov_SC01_000's asm, and gate via ov_SC01_000.

TWO byte-evidenced findings (redirect the fuel strategy):
- the reach>=2 close=1 fuel is MODEL semantic-misses, not permuter fuel: func_8012E27C's
  target is "return 1" but the 7B drafted an empty "void f(void){}" (corpus overfit
  empty-leaf); func_8012BF4C/AD64 are trivial sw/sh setters drafted empty. A corrected
  draft banks them (+3 byte-identical via the fixed gate, @commit:0326); the permuter cannot
  add a missing return/store. Lever = corpus-v3 leaf variety, not the permuter.
- x reach is propagation-capped: the 3 are inline-matched in ov_SC01_077_a.c (the stuck-
  local cap) -> dedup_propagate "nothing to propagate" -> banked x1. Lever = dedup-collapse.

check-all 136/136 throughout. docs/gen2-mips-matching-model.md + CURRENT_PHASE updated.
2026-06-30 00:58:13 -06:00
Drew T 64cc91ee83 feat(phase-22): close — tractable giants banked ×134 (fleet 63.18->63.66%), irreducible tail byte-deferred; pivot to the LLM tier (v1.21.0)
- BANKED ×134 (~17 fns): func_8015126C (canonical-extern recovery) + func_80156B74/func_80163C2C
  (struct type-lift -> engine_types.h) + the 14-fn close=0 recovery batch (recover_giant.py). 136/136
  byte-identical, dedup-check 1633/0, 0 NON_MATCHING throughout.
- IRREDUCIBLE GIANTS byte-deferred w/ evidence: func_80132784 (hoist-vs-remat + reg-lifetime),
  func_801372B0 (scheduler last-mile, structural draft banked), func_8014F74C (masked). gcc-2.7.2
  intrinsic walls -> backlog, not effort gaps. Grinder ROI audit: 7 all-time banks (all Phase 21), 0 since.
- TOOLKIT: recover_giant.py + the engine_types.h type-lift lever; cookbook §28/§28a/§28b/§28c.
  gate_stage commit tag made phase-agnostic (GATE_PHASE).
- PIVOT: Phase 23 = the offline LLM matching tier (built this session; see CURRENT_PHASE.md).
- worklog -> phase-ends/logs/Phase22.md (R19); bumps project version 1.20.0 -> 1.21.0
2026-06-30 00:26:49 -06:00
Drew T 366f7e4c7f feat(phase-23): T9 — reach>=2 targeting (lora_grind --min-reach); shared-code is the model's weak band
Add a sig-based reach oracle + --min-reach N to lora_grind so the mass-run can prefer
SHARED functions (one bank propagates x reach — the fleet-% multiplier). The oracle reads
the same .run/sig.ov_*.jsonl dedup_propagate uses (validated: 0 mismatch over 60 stubs +
the func_8017CE24=2 ground truth), so a reach>=N target is exactly one dedup_propagate
will stamp x reach after the bank.

Bounded reach>=2 mass-run (ov_SC01_000, 15 shared <=15-ins stubs): 0/15 banked, vs the
reach-1-heavy spot-run's 7/15. The model is weakest exactly on reach>=2 (shared) code:
(1) the corpus skipped the shared DEFINE_func macro bodies (export_pairs reads only src/
defs -> 96.6% of the corpus is overlay-unique), and (2) the shared engine fns are the
harder regalloc/schedule residuals. So reach>=2 model-only is NOT a fleet lever by itself.

BUT the reach>=2 drafts are high-value FUEL: 5/15 are close<=3 reach-134 near-misses
(3x close=1: func_8012E27C/BF4C/AD64) -> x134 each if closed. The real lever is
reach>=2 draft -> permuter-grinder close (x134), which needs the SAME per-binary fix T7
applied to lora_grind: grinder.py calls run_gate with no binary (-> 077) and the backlog
stores no binary field. That two-part fix is the next step. byte-neutral: check-all 136/136.

- docs/gen2-mips-matching-model.md: T9 RESULT
- phase-ends/CURRENT_PHASE.md: T9 done; next = grinder per-binary fix, then corpus-v3
2026-06-30 00:12:45 -06:00
Drew T bff03dbdb5 fix(phase-23): T7 — lora_grind broad-rotation banking (two gate bugs); ov_SC01_000 7/15
The 500-fn calibration banked 0/222 across the binary rotation. Root-caused (R14, by
reading the code + the run's own backlog — resolving a flat contradiction between two
scout agents) to TWO independent bugs in lora_grind's use of gate_stage.run_gate, NOT
model quality:
- Bug A: good_sha() passed the sha1sum line "<sha>  <name>" vs harvest_verify's bare
  sha1() -> 0 banks for EVERY binary incl. 077 (so the "0/12" was a bug artifact, not
  an exhausted tail)
- Bug B: the gate call left src/asm/out at the hardcoded ov_SC01_077 defaults -> non-077
  drafts dropped at the 077 stub-filter, silently (and the asm mis-resolution contaminated
  the backlog near-miss classification)

Fix (tools/gate_stage.py): run_gate resolves src/asm/out/good_sha from `binary` when unset
(binary-agnostic, no silent ov_SC01_077 default an overlay inherits; good_sha bare-hash
normalized) + a loud negative-control guard (0-overlap binary/src mismatch warns, so a 0
can never again masquerade as 'nothing matched'). tools/lora_grind.good_sha fixed at source.
Byte-neutral: make check-all 136/136.

Proof: ov_SC01_000 spot-run banked 7/15 (47%) byte-identical (@commit:0322); reach-2
func_8017CE24 propagated x2. ROI finding: 6/7 banks are reach-1 (overlay-unique) -> broad
rotation is high bank-RATE / low fleet-% ROI; the fleet lever is reach>=2 targeting (T9) +
corpus-v3 (T8). Backlog now correctly classified (4x close=1 = grinder fuel).

- docs/gen2-mips-matching-model.md: T7 RESULT section
- phase-ends/CURRENT_PHASE.md: T7 done; next = T8 corpus-v3 / T9 reach>=2 selection
2026-06-29 23:44:12 -06:00
Drew T cac25bd74b docs(phase-22): grinder stopped (clean) + ROI audit — 7 banks all-time, 2 bugs logged 2026-06-27 14:31:54 -06:00
Drew T 20037480cf docs(phase-22): log func_801372B0 structural near-miss (giant scheduler-wall) + session checkpoint
- from-scratch giant func_801372B0 (207): structurally cracked at xHigh (206/207 ins,
  logic 100%%) but byte-blocked by the gcc list-scheduler/regalloc last-mile (§27/§17);
  banked the structural draft to backlog as a future permuter head-start
- xHigh finding (Drew's test): giants reach structural match fast — the wall is gcc
  determinism, not reasoning depth; xHigh sufficient for this work
- session total: 16 functions ×134 (2 giants type-lift + 14 close=0), fleet 63.22%->63.66%
2026-06-26 10:01:01 -06:00
Drew T c1230fa6ea feat(phase-22): T2 close=0 recovery batch — 14 fns ×134 (fleet 63.29%->63.66%)
- R14 corrects cookbook §26 ('close=0 recovery exhausted'): recover_giant + the
  whole-binary gate still banks a ~15-20%% tail. Banked 7 close=0 reach-134 fns
  (func_80156ECC/80147E44/8015ADB0/801661CC/80166054/8012CFA8/8012A62C); dedup_propagate
  --auto-from swept those + 7 pre-existing inline-matched bonus fns ×134 (14 total)
- the other ~33 close=0 are the genuine DEF-side loose-typing / masked-residual wall
- func_80132784 HARD-DEFER (hoist-vs-remat + register-lifetime-reuse not C-expressible)
- §28c distilled: close=0-not-exhausted recipe + the dedup_propagate registry-skip
  recovery (register via append_groups; bytes were already check-all-correct)
- make check-all 136/136 byte-identical (R22); dedup 1619->1633 validated/0 failed;
  0 NON_MATCHING (G4)
2026-06-26 04:14:06 -06:00
Drew T d789d9c242 feat(phase-22): T2 — giant func_80163C2C banked ×134 via Blk16/Buf32 type-lift (fleet 63.25%->63.29%)
- second struct-walled close=0 giant (167 ins): lift Blk16(u32x4)+Buf32(2xBlk16) to
  src/shared/engine_types.h, remove the Blk16 dupes from ov_SC01_077.c + the -O0 split
  ov_SC01_077_a.c (byte-neutral), recover_giant, harvest_verify MATCH, dedup_propagate
  ×134 (+22378 ins byte-weighted)
- struct-walled trio done: func_80156B74 + func_80163C2C banked; func_8014F74C is a
  masked residual (grinder fuel, not type-liftable)
- make check-all 136/136 byte-identical (R22); dedup 1618->1619 validated/0 failed;
  0 NON_MATCHING (G4)
2026-06-26 03:51:11 -06:00
Drew T b5a1fe6dab feat(phase-22): T2 — giant func_80156B74 banked ×134 via engine_types.h type-lift (fleet 63.22%->63.25%)
- struct-walled close=0 giant (cookbook §28 case #3) is bankable: lift the S8/B8
  typedefs from ov_SC01_077.c's prelude to src/shared/engine_types.h (shared via
  engine_core.h; byte-neutral), recover_giant block-scopes externs, whole-binary
  harvest_verify MATCH, dedup_propagate ×134 (214 ins, +28676 ins byte-weighted)
- cookbook §28b: the type-lift recipe + the serialize-make-jobs gotcha (concurrent
  make corrupted an .o and dropped the registry write; re-ran dedup_propagate idempotent)
- make check-all 136/136 byte-identical (R22); dedup 1617->1618 validated/0 failed;
  0 NON_MATCHING (G4)
2026-06-26 03:45:35 -06:00
Drew T b234130666 chore(phase-22): session checkpoint — reports regen + resume pointer (fleet 63.22%, grinder stopped)
- docs/{worklist,backlog,progress.fleet}.md regenerated after the func_8015126C x134 bank
- CURRENT_PHASE.md: RESUME HERE block (T2 giant queue + levers + op gotchas) for a fresh session
- grinder stopped (STOP sentinel set); tree clean except R23 db churn
2026-06-26 03:16:39 -06:00
Drew T 0375cd529b docs(phase-22): T3 — distill §28 canonical-extern recovery + recover_giant.py + decomp.wiki patterns
- cookbook §28: the 4-way triage of a close=0 gate-rejected giant (pure-extern plumbing /
  masked-residual / struct-walled / regressed-draft) + the canonical-extern recovery (the NEW
  lever that banked func_8015126C, which Phase-21 left as a close=0 wall) + the coalescing pin
  (register __asm__ + lazy in-&& assign). §28a: PS1-applicable decomp.wiki GCC patterns
  (negative-offset loops, branch-duplication, load-coalescing, div-magic table, slti-0)
- tools/recover_giant.py: canonicalize a draft's engine_core.h-callee externs to def-sigs +
  move all externs block-scope (validated func_8015126C -> MATCH)
- R14: close=0-giant fan-out NOT uniformly near-free — only func_8015126C was pure-extern;
  the rest are struct-walled / masked-residual / regressed -> genuine per-giant hand-work
2026-06-26 03:06:54 -06:00
Drew T 75dc869099 feat(phase-22): T1 — calibrate hand-loop; func_8015126C banked x134 (fleet 63.18%->63.22%)
- func_8015126C (254-ins top-5 giant): cracked the §25 coalescing residual with a
  register-pin idiom (cmp79 __asm__("$4") + lazy in-&& assign -> $a0, not hoisted)
  + the canonical-extern recovery (rewrite each engine_core.h-callee extern to its
  canonical def-sig, move ALL externs block-scope) so it banks whole-binary, not just
  match_one. dedup_propagate x134; make check-all 136/136 byte-identical; dedup-check
  1617 validated / 0 failed
- proves the Phase-22 loop end-to-end (hand-crack -> bank -> x134 propagate -> verify)
- CURRENT_PHASE.md: T0/T1 closed; the close=0-giant wall = draft self-contained externs
  conflicting with engine_core.h canonical sigs, deterministically fixable (T4 lever)
2026-06-26 02:54:39 -06:00
Drew T 013806b075 feat(phase-22): T0 — unified byte-weighted ranked worklist (the loop's decision spine)
- tools/worklist.py: join fuel_manifest (class/reach/nins/leverage/cached/region)
  + backlog near-misses (closeness/where_stuck/best_draft) -> docs/worklist.md +
  .run/worklist.json, ranked by byte-weighted gain (gain_ins = reach*nins),
  grouped by idiom class, with %rem + cum% columns; --refresh re-runs
  build_fuel_manifest + backlog.render for one-command loop use
- docs/worklist.md: 451 live stubs, 1.85M ins remaining gain; GIANT queue =
  23 fns = 37.2% of remaining gain; surfaces the idiom sub-groups (close=0
  plumbing-wall / won't-compile loose-typing / regalloc-coalescing / irreducible)
- phase-ends/CURRENT_PHASE.md: Phase-22 plan + per-task crash-recovery log
- no source touched -> byte-locked binaries unaffected (no build needed)
2026-06-26 02:07:03 -06:00
Drew T ddf9266ab0 feat(phase-21): close — automation manager built + run + ceiling byte-proven; fleet 58.82%->63.18% (v1.20.0)
- THE AUTOMATION MANAGER (built + validated + run): worker_wave (parallel xHigh drafters) + grinder
  (token-free permuter daemon) + orchestrator (ROI pool rotation) + gate_stage (whole-binary byte-gate,
  sole arbiter) + backlog ledger + idiom_loop/distill flywheel. Drove fleet 58.82% -> 63.18% across ~10
  sessions, 136/136 byte-identical, 0 NON_MATCHING.
- THE CEILING, BYTE-PROVEN: cheap close=0 recovery exhausted; giant auto-waves 0/6 (x2 — giants don't
  auto-bank, they're hand-finish/permuter fuel); the cached reach-134 automated harvest COMPLETE at 63.17%.
- COLLABORATION SWEEP (5 scouts, clean verdicts): we're SOTA (no neural/GPU/diffusion shortcut); 4
  gcc-2.7.2-psx twins (VS=CC0, the clean pool partner); no Square symbols; dedup probe CLEAN NEGATIVE
  (BFM shares only PsyQ with sisters, AKAO refuted, 0 engine code) -> NO external shortcut to the gcc wall.
  +62 PsyQ names banked (byte-safe).
- TOOLKIT MATURED: cookbook §18 (-O0 split) / §19 (wave recovery + propagation cap) / §20 (cast tool +
  DEF-side wall) / §25 (coalescing + gate two-stage + h_exact over-count) / §26 (recovery exhausted) /
  §27 (giant recipe). Novel byproduct: xsig cross-project dedup tool (open-source TODO logged).
- DELIVERABLE for Phase 22: the ranked hand-finish backlog (docs/backlog.md) + the giants (×134).
- worklog -> phase-ends/logs/Phase21.md (R19); bumps project version 1.19.0 -> 1.20.0
2026-06-26 01:34:09 -06:00
Drew T b70c9c8631 docs(phase-21): log xsig open-source genericize task as future work (Drew, 2026-06-26) 2026-06-26 01:17:49 -06:00
Drew T 34dded11cf docs(phase-21): cont.8 — record the collaboration-sweep closure (dedup clean-negative across all 3 sisters; no external shortcut to the wall) 2026-06-25 23:59:22 -06:00
Drew T 1f4aac62fb docs(phase-21): cont.8 — collaboration sweep (clean verdicts) + 62 PsyQ names + SETUP -G fix
- reach-1 idiom loop: +16 ×1 matches (commit:0289, commit:0291) + chained-store-fanout idiom
  (commit:0290); giants pivot 0 auto-banks (2× = the byte-proven wall) -> 6 ranked
  hand-finish near-misses in backlog (2 close: func_8015126C close=2, func_8014EE14 close=6)
- collaboration sweep CLOSED with clean verdicts (5 scouts): parity research (we're SOTA;
  no neural/GPU/diffusion shortcut), decomp.dev survey (4 gcc-2.7.2-psx twins; VS=CC0 the
  clean pool partner), census (no Square symbols; Croc=SDK-naming only), VS corpus (76
  byte-verified pairs, low-priority asset), dedup probe (CLEAN NEGATIVE — BFM shares only
  PsyQ with sisters, AKAO refuted, 0 engine code) -> no external shortcut to the gcc wall
- config/symbols.us.txt: +62 PsyQ library/BIOS names from cross-project byte-signature
  dedup (xdedup vs VS/Xenogears); byte-safe (main still 143dbb89, R22-verified)
- docs/SETUP.md §5.3: corrected stale "-G TBD" marker -> RESOLVED Phase 5 (-G0) (R21)
- docs/backlog.md: giant near-misses logged with true worker closeness (cont.7d-safe)
- CURRENT_PHASE.md cont.8: session log + 3 parked R&D items + process lessons
- fleet 63.18%, 136/136 byte-identical, 0 NON_MATCHING
2026-06-25 23:56:12 -06:00
Drew T 8be03a7859 docs(phase-21): cont.7e — Drew's decision: keep Phase 21 OPEN, hand off to fresh session (+ lean-orchestrator lesson) 2026-06-25 19:12:35 -06:00
Drew T 8df3b90722 docs(phase-21): cont.7e — Drew's refined idiom-loop model = the built flywheel + the analyze-all-remaining gap
Drew clarified the neverending loop's PURPOSE: learn idioms. Out of fuel -> analyze ALL
remaining, group by decomp issue, 1 idiom/group, cookbook, wave all applicable, bank, repeat.
ANSWER: this IS the idiom_loop flywheel (--assess groups by gcc-quirk class -> idiom -> distill
-> gen-fuel -> worker_wave -> gate -> repeat); no plan-mode build needed. ONE gap: --assess
clusters the BACKLOG (drafted near-misses), not ALL remaining stubs -> close it with TRIAGE waves
on un-drafted pools (reach-1 next, 281 fns). Effort already right (Max orchestration + Workflow
per-agent xHigh). Recommend a FRESH session (context hygiene); optional clean milestone = close
Phase 21 (reach-134 harvest byte-proven complete) -> Phase 22 idiom-loop at scale. Drew's call.
2026-06-25 19:01:31 -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 a79aa410bd feat(phase-21): idiom_loop.py — the neverending idiom-learning meta-loop (wall->assess->fuel)
Drew's directive: Phase 21 is neverending (harvest easy fuel -> learn next gcc-quirk idiom ->
fresh session -> repeat, toward 100% decomp). idiom_loop.py: --fuel-status (wall), --assess
(cluster backlog by quirk class, rank by reach-134 leverage, name next idiom + cheap recovery
lever), --gen-fuel (research+harvest manifest). First assessment: next idiom = SCHEDULE (49
reach-134, sched.c tie-break); +64 close=0 reach-134 fns bankable x134 for ~0 tokens (def-side
recovery). CURRENT_PHASE cont.5 = the neverending cycle + the /loop prompt for the fresh session.
2026-06-24 22:59:04 -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 91430e9309 feat(phase-21): _a wave is turnkey — gate_stage --src-file + wave_targets region-aware asm
- gate_stage.py --src-file: cast canonicalizes vs the SPLIT .c's decls + sig_unify SKIPPED (it reads
  main .c only -> drops _a/_o0 drafts). Validated end-to-end: gate_stage _a-mode banked func_8012C098.
- wave_targets.py region-aware asm paths (REGION_SUB/asm_for): --region a serves the 68 fresh _a
  reach-134 fns with correct ..._a .s paths (pool + --class modes).
- the _a wave is now fully wired (wave_targets --region a -> worker_wave -> gate_stage --src-file ->
  dedup_propagate split-aware). Turnkey runbook in CURRENT_PHASE.md (cont.3) for a fresh session.
- no net banks; fleet 62.31%; ov_SC01_077 d19c9580 (R22).
2026-06-24 19:35:17 -06:00
Drew T 7b5cdfe80e chore(phase-21): CURRENT_PHASE up to date — grinder relaunched (token-free background filler) 2026-06-24 19:26:28 -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 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 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 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 40fa76284e feat(phase-21): wave_targets skips close=0 plumbing-blocked near-misses from the pool
- self-MATCH-but-gate-rejected fns can never bank via re-drafting (the drafter reproduces the
  byte-correct body the gate rejects again) -> exclude from POOL selection so agents draft FRESH
  targets; they stay in the backlog as recovery-tooling/hand-finish fuel
- CURRENT_PHASE: sustained-loop state + pool-mode override policy (compaction-recovery anchor)
2026-06-22 00:59:06 -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