Commit Graph

3207 Commits

Author SHA1 Message Date
Drew T 00261badcd feat(decomp): family-remap gate — +9 fns x0 propagated (fleet 98.8%) 2026-08-29 17:00:34 -06:00
Drew T bfacb2c9c7 feat(decomp): family-remap gate — +3 fns x0 propagated (fleet 98.8%) 2026-08-29 16:59:32 -06:00
Drew T 98593652fd feat(decomp): family-remap-probe gate — +1 fns x0 propagated (fleet 98.8%) 2026-08-29 16:57:07 -06:00
Drew T eba16c9376 feat(t5): Claude wave t5w — 5 banked (sonnet 5/5, opus 0/0); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-29 16:54:23 -06:00
Drew T e6e053c801 feat(t5): Claude wave t5y — 5 banked (sonnet 4/5, opus 0/0, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-29 16:50:41 -06:00
Drew T ee4e630773 feat(t5): Claude wave t5u — 12 banked (sonnet 10/13, opus 2/2, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-29 16:41:34 -06:00
Drew T d9b222915b feat(t5): Claude wave t5v — 14 banked (sonnet 13/14, opus 1/1, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-29 16:36:54 -06:00
Drew T 287d25f8f5 feat(packs): MEASURE the prior draft into the pack instead of just handing it over
A pack carrying a previous attempt said only 'the gate did not accept it, so it is wrong somewhere'.
That discards the one datum that decides how the agent spends its budget. Now the builder runs
match_one on that draft and embeds the verdict:

  * near  -> the closeness, the verdict sig, and the residual rows (idx / mine / tgt, capped at 16
             with an honest '... N more'), plus how to READ them: two adjacent rows with the same
             instructions in the opposite order = a SCHEDULE swap; a register-only difference = the
             value came from the wrong place (often the copy, not the pre-copy value); a beqz/bnez
             row = invert the test and swap the arms, constants included.
  * match -> NOT a drafting job. The body is byte-correct in isolation and the gate refused it for an
             INTEGRATION reason, so the pack names the $0 recover_integration --probe-only instead of
             letting an agent burn a wave slot redrafting a correct body. If the probe also says
             MATCH the residual is outside the function (the section-8e JTBL_PADS class).

Measured on the two t5u seeds, which I injected BY HAND this session before automating it:
func_8017F234 = 3 mismatched of 202 (a schedule swap + an "andi" reading the copy instead of the
pre-copy value); func_8017E7E8 = 11 of 66 (inverted branch + a cast written back into the variable
instead of a temp). Told that, an agent edits one use site; told "wrong somewhere", it re-derives 202
instructions.

Cost: one compile per target that HAS a prior draft; --no-residual opts out. Failures are swallowed
into a "(residual not measured: ...)" line — measuring must never break pack generation.

Control: rebuilt t5u's 15 packs into a scratch dir — both seeds gained the block automatically with
the same numbers I measured by hand, and a target with no prior draft is byte-identical to before.
2026-08-29 16:18:27 -06:00
Drew T f84e8272ef docs(phase-31): S65 FINAL checkpoint — 42 banked (t5s 24 + t5t 13 + 5 recovery), 213/213 green, 5 tool defects fixed, the 1x15 cap, my own -P4 corruption + repair, the distill's 2-of-3 refutation, next-4-steps 2026-08-29 16:11:51 -06:00
Drew T 1725d19ecb docs(cookbook): §165-03 addendum (asm-free EQ-channel dial, UNPROVEN) + a §5a FINDABILITY addendum
The t5s/t5t distill returned three 'new lever' claims and the verifier REFUTED two as rediscoveries:
  * func_8017E044's zero-byte __asm__ against reorg's delay-slot steal IS §5a/§34 (+§164-33/§164-36),
    already indexed at cookbook-index.md:22;
  * func_8017C014's ternary-vs-if-chain LICM effect is the loop.c movable gate (REG_N_SETS==1)
    already documented for a recomputed CONSTANT — here firing on a computed loop-invariant EXPR.
Only func_8017EB30's survived, as an ADDENDUM to §165-03 — and the verifier proved it by reading the
target .s itself: the same 279-ins template, same //, as §165-03's byte-proven sibling
func_8017F2D4 in the adjacent overlay. Filed with its UNPROVEN label intact (that draft did not pass
the whole-binary gate — R14/G3).

THE REAL FINDING is the rediscovery rate, so §5a gains a FINDABILITY addendum: the law was there and
the agent could not find it, because the index states the symptom as 'gcc stole an instruction into a
branch delay slot that the target leaves as nop' and what the agent actually SAW was LENGTH-DRIFT/1
at closeness 45, an extra j absent from the target, and a DUPLICATED store — the nop never appeared
in its diff at all. The addendum indexes those three alternate tells. Same shape as S64's §41
addendum: the knowledge base's gap is retrieval, not content.

Index 921 sections, green.
2026-08-29 16:03:12 -06:00
Drew T 2bd4dcf867 feat(decomp): t6-recover gate — +1 fns x0 propagated (fleet 98.8%) 2026-08-29 16:02:53 -06:00
Drew T 83334a6c9e feat(t5): Claude wave t5t — 13 banked of 15 (sonnet 13/14, opus 0/1); fleet 213 passed, 0 failed of 213 (P31 S65 T5)
First wave at the new 1x15 cap (5x plan). Bank rate 13/15 = 87%, against t5s's 24/29 = 83% — halving
the wave did not cost quality. Banked: func_800CAE0C func_800CB028 func_8017C120 func_8017CD9C
func_8017E0FC func_8017EADC func_8017EB34 func_8017EC78 func_80182AFC func_80182C78 func_8018A124
func_8018B698 func_8018B8B0.

Misses: func_801831B4 (71 ins, closeness 10 — a D_801B7A84 reload-scheduling residual the agent
probed 5 structurally distinct ways, byte-identical residual each time) and ov_SC03_023:func_8017BEBC
(246 ins, closeness 45) whose ov_SC03_012 sibling was hand-banked earlier this session — try a family
remap there before spending another wave slot.

R22: verified from a CLEAN rebuild after the ov_MAIN_012 repair (commit:3195).
2026-08-29 15:51:55 -06:00
Drew T 25b72baa8a fix(recover): single-instance lock — the driver is not parallel-safe and now refuses instead of corrupting
Three properties compose into tree corruption under concurrency:
  (a) assert_write_set measures a GLOBAL git status, so a concurrent run's writes read as THIS
      run's blast-radius violation and abort it;
  (b) an abort does NOT restore the stage edits already on disk;
  (c) gate_stage's commit is a deliberately broad 'git add -u src/' — and it must be, since
      propagation touches many overlays and a narrower filename glob once DROPPED four R22-verified
      banks — so a concurrent --commit sweeps the aborted run's half-applied edits into its commit.

Measured today: xargs -P 4 over 33 binaries put 696 broken lines of ov_MAIN_012 into md_MAIN_026's
+1 bank commit; check-all went 212/213 and the wave bank was blocked behind it (R59).

Narrowing the gate's git add was the WRONG fix (it would restore defect (c)'s predecessor). Instead
the driver enforces its own contract: flock on .run/recover/.driver.lock, refuse loudly (R43).
Control: with the lock held -> rc 1 REFUSED; lock free -> rc 0 and the probe runs normally.
2026-08-29 15:51:25 -06:00
Drew T 3e6912f53e fix(repair): un-commit 4 binaries' in-flight stage edits that commit:3193 swept in; ov_MAIN_012 was RED
CAUSE — a gate's commit is a broad 'git add src/', so it is NOT safe under concurrency (R59: a
gate commits only its OWN block). I ran the stranded-draft sweep with xargs -P 4; the blast-radius
guard correctly ABORTED several runs, but abort does not restore the stage edits already on disk,
and a CONCURRENT run's --commit (md_MAIN_026's +1 bank) then swept four other binaries' half-applied
demacroize/tu-scope edits into its commit — 696 lines into ov_MAIN_012, leaving it unbuildable
('parse error before D_80078E50', 'conflicting types for D_80126B58'). check-all went 212/213.

Restored the 4 contaminated files to commit:3193^ content. md_MAIN_026's actual bank is untouched.
Verified: all 5 binaries now build BYTE-IDENTICAL. No banked function was lost — stub counts prove
none of the 4 files carried one (a bank REMOVES a stub).

The recovery driver is NOT parallel-safe: assert_write_set measures a GLOBAL git status, so
concurrent runs see each other's writes. Run it serially until the commit is path-scoped.
2026-08-29 15:50:03 -06:00
Drew T 91e624c041 fix(distill): the novelty selector was inverted, and it could not see the notes worth reading
Two defects in one filter, both measured on the t5s wave (24 banked / 29 transcripts):

1. FALSE POSITIVE. The keyword 'no cookbook lever' matched "MATCH on first compile, no cookbook
   lever needed" — a note reporting a TRIVIAL function — and that was the ONLY selection out of 24,
   while three genuine multi-lever notes went unpicked. A selector whose single hit is the one note
   saying 'nothing to learn here' is inverted, not merely noisy. Keyword removed, NOT_NOVEL guard
   added, and the phrasings agents actually use ('cookbook lacks', 'new lever', 'worth banking',
   'levers not in') added. Same 24-transcript scope now selects func_8017E044 instead.

2. STRUCTURAL BLINDNESS. The distiller only ever considered BANKED functions — but the richest
   idiom notes come from the HARDEST functions, which are the least likely to bank. func_8017EB30
   (279 ins, four levers written up) and func_8017C014 (246 ins, two) both say 'NOT in the cookbook
   and worth banking' and were never candidates. That defeats cookbook §52 — a model that FAILS to
   crack a wall still distills the idiom that cracks its siblings — using the flywheel's own tool.
   New --with-unbanked includes them, each carrying banked=False so the distilling agent knows the
   lever is UNPROVEN by the byte gate (R14/G3).

R39 control: the previously-selected note is no longer selected (it was the false positive) and
nothing legitimately selected was dropped.
2026-08-29 15:22:14 -06:00
Drew T e75f384843 feat(decomp): t6-recover gate — +1 fns x0 propagated (fleet 98.8%) 2026-08-29 13:54:27 -06:00
Drew T d50cd66401 docs(phase-31): S65 checkpoint — 27 banked (t5s 24 + 3 recovery), 4 tool defects fixed with negative controls, the 1x15 wave cap, the JTBL_PADS class, next-4-steps 2026-08-29 13:43:27 -06:00
Drew T 201c683325 docs(report): regenerate the scoreboard + backlog after t5s and the S65 recovery banks 2026-08-29 13:42:01 -06:00
Drew T edec2adb99 fix(recover): --probe-only crashed for --funcs/--auto/--from-file (it exec'd the probe BEFORE staging)
os.execv'd tools/blocker_probe.py with --drafts <run_dir>/drafts while that directory was still
created further down, so every non---draft-dir probe died with FileNotFoundError. Only --draft-dir
worked, because stage_drafts() had already populated the dir. Staging now happens first.

Control: the --draft-dir path returns the same verdict as before the move (ov_SC06_029
func_80185214 -> DIFF 52/52 ins, identical to the pre-edit run). --funcs now works: 10 backlog
candidates classified in one pass (2 real-TU MATCH, 3 conflicting-types, 2 too-few-arguments,
1 parse error).

Worth recording (R40): my own probe loop grepped for result rows and swallowed the traceback, so the
crash read as 'no blockers found' — a silently narrowed scope in the harness, not the tool.
2026-08-29 13:41:51 -06:00
Drew T cbd89e1924 feat(decomp): t6-recover gate — +1 fns x0 propagated (fleet 98.8%) 2026-08-29 13:21:46 -06:00
Drew T 048666600b fix(oracle): masked_diff kept the opcode at R_MIPS_26 slots — a masked j/jal was swallowing whatever the other side held
mask_for(reloc_kind='26') returned 0, i.e. 'compare NOTHING at this position'. Both comparers pick
the mask from ONE side (diff_object_s from mine, diff_object_object from the target's), so a j/jal
there masked the OTHER side's instruction entirely. Reproduced on synthetic pairs of real encodings:
my 'j 8017e248' (0805f892) vs target 'bne v0,v1' (14430002) -> 0; vs 'nop' (00000000) -> 0; my 'jal'
vs target 'bne' -> 0; while the mirror (my 'bne' vs target 'j') -> 1. That asymmetry is the bug.
_j_mismatch cannot cover it: it fires only when BOTH sides carry an internal-j target, which a
j-vs-bne pair by definition does not.

Fix: return 0xFC000000 — the 26-bit target field stays masked (it IS link-time), the opcode never
is. diff_object_object's masked-slot test updated to match so the reloc symbol+addend check still
fires there.

R39 negative control (tools/stub_invariant_audit.py, the INCLUDE_ASM invariant): 2554 stubs, nonzero
3 before and 3 after — the same three known main length-delta survivors, same values. Zero new false
positives, over a population that exercises the changed path (812 stubs carry internal-j .text
relocs, 3164 such instructions).

Found by a t5s drafting agent on func_8017EB30 (reported as a one-sided internal-j check); verified
here to be broader than reported. No bank was ever at risk — the whole-binary gate is independent
(G3) — but every crack agent and the permuter scorer read this number. R35/R14.
2026-08-29 12:56:20 -06:00
Drew T dd11127284 feat(t5): Claude wave t5s — 24 banked (sonnet 22/25, opus 2/4, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-29 12:53:28 -06:00
Drew T 6ed0f77b6a fix(recover): gate the RAW draft first — macro-externs is a fallback, not the measurement (+ classify_fail drops orphan notes); cookbook §313
recover_integration's macro-externs stage rewrote a draft's callee extern to the FLEET macro's
signature and then gated only the rewrite. func_ADDR names are per-address, not per-function, so
another overlay's 'extern void func_8017C338(void)' replaced this overlay's correct 4-arg decl and
manufactured the CC1-FAIL it reported as the draft's failure. The untouched draft banks
byte-identical (ov_SC03_012:func_8017BEBC, 246 ins, banked in the previous commit).

reconcile_and_gate(draft_rewrite=) now gates raw (pass 1a) then rewrites only what raw refused
(pass 1b), records the winning variant per fn, and re-gates that variant in pass 2.

harvest_verify.classify_fail kept the 'note:' half of a benign warning pair and labelled a built
draft CC1-FAIL with it; notes now drop with their warnings. Negative-controlled over 5 diagnostic
shapes — only warning+note-only changed (to the honest no-diagnostic label). R39/R57/R32.

Cookbook 920 -> 921 sections, index green.
2026-08-29 12:26:02 -06:00
Drew T 75a6639e57 feat(decomp): t5r-recover-raw gate — +1 fns x0 propagated (fleet 98.8%) 2026-08-29 12:17:21 -06:00
Drew T beba651744 feat(decomp): t6-recover gate — +1 fns x0 propagated (fleet 98.8%) 2026-08-29 12:06:43 -06:00
Drew T 18812211ca docs(phase-31): S64 FINAL CHECKPOINT for a fresh session — fleet 1,616 stubs / 213-213 GREEN / 98.8%-97.4%, the committed recipe, next-4-steps, 258 K+L remaining, T6 wall ledger with 21 diagnosed residues, standing hazards + rule candidates (P31 S64) 2026-08-29 11:52:19 -06:00
Drew T a51c0785cf docs(phase-31): S64 results — 11 waves, 2,380->1,616 stubs across S63+S64 (764 closed), 98.8%/97.4%; the R14 self-correction on func_8017BEBC; fix_decl_mirror's honest 0-of-17 verdict + its R39 saves; killed-gate adjudication 2026-08-29 11:51:45 -06:00
Drew T c5a60897bc docs(cookbook): §312 (a bare if(a<b) scatters the slt destination register — materialize the compare to force it) + a §41 FINDABILITY addendum. The 741-ins agent's headline 'new lever' was VERIFIED AS ALREADY-COVERED by §41 step 3 (cast a type-changed param at its uses, never via an intermediate local); the real gap was that §41's declaration-wall title hides its REGALLOC symptom, so the key is filed there with the n7/n9/n10 byte ladder incl. the inert decl-order control (§67). Index 919 -> 920 (P31 S64) 2026-08-29 11:50:44 -06:00
Drew T 1bdd62455e docs(report): regenerate the fleet scoreboard after t5o-t5r + the 741-ins bank 2026-08-29 11:44:42 -06:00
Drew T d9a30167dd feat(t5): Claude wave t5r — 30 banked (sonnet 22/37, opus 8/11, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-29 11:35:54 -06:00
Drew T 4ed883d0fe feat(t5): func_8017BEBC (ov_SC03_107, 741 ins) — BANKED at the whole-binary gate, the campaign's largest single function. CORRECTION: commit commit:3173's message wrongly listed this as banked in t5n; it was only the drafting agent's SELF-REPORT (match_one MATCH) and the t5n judge excluded it (42 union banks). The body was byte-correct all along; the sole blocker was 'conflicting types for ApplyMatrixSV' at tu:5758 — the draft re-declared a callee the TU already declares with a different param spelling. Fix: delete the draft's own extern (the call site's (void*) casts convert silently). R14: a self-report is not a bank (P31 S64) 2026-08-27 16:19:57 -06:00
Drew T 34963d42ed feat(t5): Claude wave t5q — 28 banked (sonnet 28/30, opus 0/0, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-27 16:04:57 -06:00
Drew T 0bcd8b3d22 feat(t5): Claude wave t5p — 30 banked (sonnet 30/33, opus 0/0, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-27 16:02:23 -06:00
Drew T 6a601a0fce feat(t5): Claude wave t5o — 36 banked (sonnet 29/31, opus 6/8, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-27 15:59:13 -06:00
Drew T 1856524bec docs(report): regenerate the fleet scoreboard after t5m/t5n (1,968 -> 1,741 stubs; 98.7% instr / 97.3% distinct) 2026-08-27 14:05:55 -06:00
Drew T e2d1531324 feat(t5): Claude wave t5n — 43 banked (incl. func_8017BEBC @ 741 ins, the campaign's largest single crack; func_8017DAC8 253; func_800CB0C8 157; first md_MAIN_* module targets); the gate was KILLED mid-run and the tree adjudicated by a clean fleet sweep: 213 passed, 0 failed of 213 — every dirty file byte-proven, none reverted (R42) (P31 S64) 2026-08-27 14:03:01 -06:00
Drew T ba7afeed34 docs(cookbook): 2 NEW + 3 addenda from the t5j-t5m distill — §310 (a subu's dest ties only to the block-local operand), §311 (a same-lvalue if/else store must be DUPLICATED into both arms: sched1 runs before cross-jump, so a join-block store swallows the arm's load-delay nop; cross_jump refunds the duplicate so it is byte-free), + §220/§164-29/§164-39 addenda. NOTE: the §164-39 addendum REJECTS the drafting agent's 'integer width' claim — the byte-check shows comparison OPERAND ORDER is the lever. Index 917 -> 919 (P31 S64) 2026-08-27 13:47:39 -06:00
Drew T ab3fffda1e feat(t5): Claude wave t5m — 53 banked (sonnet 35/43, opus 17/18, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-27 13:36:39 -06:00
Drew T 78f4934ef8 feat(t5): Claude wave t5l — 39 banked (sonnet 37/44, opus 2/4, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-27 12:41:25 -06:00
Drew T 8c28a39df6 feat(tools): fix_decl_mirror.py — the MIRROR of fix_tu_ret_decls (TU declares a VALUE return for a genuinely void definition; it SKIPped in every S63 wave). Narrowing the TU decl is NOT byte-neutral there (a caller reads $v0), so the repair is draft-side: define the body under a distinct identifier bound by __asm__("func_X") — the tree's own impl_* idiom. T0 blast radius. R39 negative control found and killed TWO real defects (block-scope decls: 856 false positives; sibling-TU decls: 580) and now passes 78,727/78,727 clean. Wired into t5_bank.sh (P31 S64) 2026-08-27 12:19:36 -06:00
Drew T 5365db0f87 feat(t5): Claude wave t5k — 47 banked (sonnet 40/44, opus 5/6, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-27 12:14:34 -06:00
Drew T 5e5fd1cb77 feat(t5): Claude wave t5j — 45 banked (sonnet 41/44, opus 4/4, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-27 12:11:10 -06:00
Drew T e5956d021f docs(report): progress.md regenerated with the S63 scoreboard 2026-08-27 11:33:02 -06:00
Drew T f25b890480 docs(phase-31): S63 FINAL checkpoint — 412 stubs closed (2,380->1,968), 98.6%/97.1%, 213/213 GREEN, cookbook 917; t5j pre-packed for resume; 5 proven findings + 2 rule candidates; machine quiesced for reboot 2026-08-27 11:32:45 -06:00
Drew T e268956de6 docs(report): regenerate the fleet scoreboard after t5g/t5i 2026-08-27 11:31:57 -06:00
Drew T 0edd7344c2 docs(cookbook): 3 NEW sections + 2 addenda from the t5e-t5i distill — §308/§308a (a target's lone j+nop over one self-terminating block survives ONLY behind a tautological re-test; a plain goto/polarity flip DELETES it — closeness EXPLODING after a polarity edit means an edge was removed; two overlays, independently derived), §309 (a frame-address equivalence rides through a -fcse-skip-blocks conditional; duplicating the call into both arms barriers it, cross-jump merges them back), §264 + §195-L addenda. Index 914 -> 917 2026-08-27 11:28:58 -06:00
Drew T 9b9385afd2 feat(t5): Claude wave t5i — 58 banked (sonnet 42/44, opus 16/19, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-27 11:16:01 -06:00
Drew T 9db3edf985 fix(t5_targets): dedupe residues by (binary,fn) across prior waves and enforce one fn NAME per wave across residues too — the t5i draw produced 4 duplicate names (2 the same fn from two waves) and the name-keyed pack builder correctly REFUSED (R43/R48); deferred duplicates are reported, not dropped (P31 S63) 2026-08-27 10:25:01 -06:00
Drew T 71f00b16d1 feat(t5): Claude wave t5g — 42 banked (sonnet 37/44, opus 4/4, +recovery); fleet 213 passed, 0 failed of 213 (P31 S62 T5) 2026-08-27 10:20:47 -06:00
Drew T 963519799d docs(phase-31): S63 SESSION CHECKPOINT — fleet 2,068 stubs / 213-213 GREEN, the committed wave recipe, 690 K+L remaining, next-step order (P31 S63) 2026-08-27 09:44:58 -06:00