Commit Graph

272 Commits

Author SHA1 Message Date
Drew T b23300fc21 feat(phase-33): A2 reporting instruments — make sig-main rewritten (tools/main_seed_ends.py: main's game-code boundaries DERIVED from the link map + objects, tiling asserted; 809 fns / 45,150 ins), progress.py weighs main by the build-derived sig and EXITS with no sig (R32), the digest's oracle clause derived live (0 phantom / 0 truncated / 0 pad-tail), backlog.linked_closed retires the LINKED-range legacy row (0 open), dup_report on the derived sig; CORRECTED main denominator 45,150 (Ghidra's flow boundaries left 3,628 words of game code unowned) — fleet instr 13,492,113 / distinct 5,820,205, all 100%; make report BINARY=main EXIT=0, audit-digest OK; SETUP §6.8 + P33 A2 rows (R21) 2026-09-06 18:46:52 -06:00
Drew T 6e37e8ec62 docs(phase-32): T4c harvest + checkpoint — the frontier is EMPTY (census 0 stubs / 0 ins); cookbook §501-Q (the combine self-update ghost slot) + §501-R (a hoisted invariant read three times: inline temps merged by combine_movables, u16 as a cse firewall, the allocation order IS the callee-saved bank; every pin came off), accelerators (15)(16), decision-log P32 S85 T4c, tools/cc1_dumps_tu.sh + tools/alloc_table.py promoted (+ SETUP rows, cc1_dumps.sh -dL), wave_exclude 0 entries, backlog 1 legacy row, .run/P32/t4e (56 variants, 18+8 reproducers, NOTES, banks, slates); 🛑 checkpoint refreshed as the T5 seed (the fleet R22 + report chain runs in the background — its logs are recorded by the next session) 2026-09-06 16:13:19 -06:00
Drew T 0ab474ed5d docs(phase-32): T4b hand pass — row (d) harvest: cookbook §501-P (the atlas's 0.55 "weak cousin" was the same-shape sibling; its natural spelling ported with ZERO pins/fences; the 12-variant element census), accelerators (14), decision-log P32 S85, NOTES + 12 measured variants + rtu logs; backlog 3 open; census 2 stubs / 940 ins; T4b hand pass COMPLETE (13/15 banked + 2 verdicts)
- ov_SC03_105:func_80185810 banked in commit:4004 (bank.sh: rtu MATCH 489/489, build rc 0, sha d305ff6d… == config)
- §501-P: shape-grep the idiom's constants (`'0x200) << 2'`) and objdump the sibling's window before any dial; a pin/fence a draft
  "needs" is a property of its other dials — remove every pin after a sibling port (d9 = no pins = MATCH); census: F2 polarity 42,
  2-set uu 63, ot16 pin load-bearing only next to 2-set neighbours (d3 = 4); the S83 "hard reg hides nonzero_bits" guess refuted (d5)
- post-bank: twin_rescan 2 open / 0 free; verbatim_check --strict 5==5; backlog.py render 3 open; frontier_t4b_final.json 2 / 940
- .gitignore allowlist for .run/P32/t4d/ (variants, logs, notes, the banked body; rtu/ compile dirs stay ignored)
- fleet R22 running in the background (.run/P32/t4d/r22_*.log) — recorded at the T4b close
2026-09-06 13:21:29 -06:00
Drew T e7679b51ff docs(phase-32): T4b hand pass — row (c) func_80039308 PLATEAU at 4 (§501-O phantom-slot census for a leaf; ledger row); 🛑 CHECKPOINT refreshed for the pause: (a) PROVED · (b) BANKED commit:4001 · (c) PLATEAU 4 · (d) NEXT (sibling search first), then T4b close and T5
- (c): cnt's slot is spill_stack_slot[23] (evicted from $s7), so the phantom @0x8 must be an initial-loop no-traffic slot; every producer refuted on dump facts (leaf: no save area; LO spilled after GR and products alternate to GR_REGS — C3 measured; no unallocated single-block equiv pseudo; expand-time locals precede; 13 lh single-use, no lb). Rows 49/50 = two move_movables hoists in body order.
- row (d) read only (rtu DIFF 13 re-verified); brief + step 0 (§501-N banked-sibling search on its symbol set) in the checkpoint
- no src/ change in this commit; fleet R22 owed at the T4b close (last check-all 218/218 before the (b) bank)
2026-09-06 12:31:08 -06:00
Drew T 3e90db193f docs(phase-32): T4b hand pass — row (b) harvest: cookbook §501-N (port the banked sibling's spelling; the asm-label u32 array alias unlocks cse's OT base binding), accelerators (13), NOTES + 7 measured variants; ledger 4 open; bank.sh session trailer from $CLAUDE_SESSION
- func_800CF408 banked in commit:4001 (rtu MATCH 178/178 in the real TU; make build BINARY=md_MAIN_007 -j8 rc 0; sha 2ff702b6… == config/check.md_MAIN_007.sha)
- post-bank: twin_rescan 3 open / 0 newly free; verbatim_check --strict 5==5; backlog render 4 open (row pruned)
- CURRENT_PHASE.md: S84 log entry + checkpoint refreshed (rows (c)(d) next; fleet R22 owed at the T4b close)
2026-09-06 12:08:11 -06:00
Drew T b6fd3fff28 docs(phase-32): T4b hand pass — func_80032A74 PROVED at 1 by producer census (§501-M); ghost_census.py + cc1_dumps.sh repair; backlog tie-break repair
- main:func_80032A74 (422 ins, closeness 1): the residual is ONE reload-time slot at sp+0x48 (u16 draft = 422/422 code, DIFF 22 frame
  rows; s16 draft = DIFF 1 at idx 244 lh vs lhu). Every post-parameter slot producer enumerated from gcc-2.7.2 (reload1.c:658 ghost
  alter_reg / caller-save.c:249 area / reload1.c:879 invalid-equiv / reload1.c:3499 spill_stack_slot) and refuted on the bytes: combine's
  newi2pat ghosts re-derive a narrow load and the site is lhu (no lb, no double load); a save area without sw/lw needs sched.c:4962
  staleness and no register-only insn shares a block with a call; $t0 holds no pseudo; LO mult results retry into GR_REGS. Verdict
  PROVED at 1 (pin kept with the verdict; ledger WALL-PROVED).
- NEW mechanism measured: local-alloc.c optimize_reg_copy_2 (tmp = x; tmp op= c; x = tmp) mints a ghost with stale refs, but after
  regclass -> GR_REGS, allocated, no slot (P13/P14). 18 isolated reproducers, 0 draft variants; cookbook §501-M; accelerators (12).
- tools/ghost_census.py (new): ghosts in a .lreg dump with their class (ST_REGS => slot). tools/cc1_dumps.sh: prints the .frame line,
  ins count, spill lines and the census; the under-counting standalone-(use) grep is gone. SETUP rows (R21).
- tools/backlog.py: load_best kept the EARLIEST record at equal closeness (docstring said latest) — the S84 row never rendered; fixed.
- CURRENT_PHASE.md: S84 log + refreshed 🛑 checkpoint (rows (b)(c)(d) next, then T5). No src/config/carve change; fleet check-all
  218/218 rc 0 at the S84 preflight.
2026-09-06 11:44:40 -06:00
Drew T 77b63f0bb5 docs(phase-32): T4b — func_800CF408 49 -> 3 NEAR, zero pins (Fable, 499k tokens): §501-H closers; residual = §501-H's floater mechanism coupled to the $t2/$t3 qty_compare contest; backlog row with the decoupling lever; all 15 first-pass rows complete (11 MATCH / 4 NEAR) 2026-09-05 23:33:33 -06:00
Drew T 6f2731f0db docs(phase-32): T4b (11) ledger — func_800CF6D0 banked, backlog re-rendered, the Fable draft + report + verdict kept 2026-09-05 23:22:56 -06:00
Drew T 444e8ab4b5 docs(phase-32): T4b (10) ledger — func_80011380 unpinned (1 wall remains: func_80032A74), backlog re-rendered, the Fable draft + report + verdict kept 2026-09-05 23:22:09 -06:00
Drew T 9189a7caed docs(phase-32): T4b — func_80039308 17 -> 4 NEAR (Fable, 655k tokens): the alias block + rows 390/391 closed; residual = a phantom 8-byte spill slot at sp+8 (reload's $s7 spill register) + the hoisted constant's preheader order; corrected law: equal-priority load/store ties go to the store via potential_hazard; backlog row + draft + report kept 2026-09-05 19:26:19 -06:00
Drew T d753c44172 docs(phase-32): T4b (9) ledger — func_8017DC80 banked (ov_SC07_002), backlog re-rendered, the Fable draft + report + verdict kept; queue updated 2026-09-05 19:19:06 -06:00
Drew T 99b65ef94a docs(phase-32): T4b — func_80185810 35 -> 13 NEAR (Fable, 471k tokens): 3 of 4 windows closed (P_TAG bitfield qty priorities, sched1 flush_pending_lists load order, hard-reg dests not boosted); residual = the cl second-set fence; backlog row + draft + report kept 2026-09-05 19:09:36 -06:00
Drew T 511afcf75c docs(phase-32): T4b (8) ledger — func_800CD92C banked (md_MAIN_009 100% C), backlog re-rendered, the Fable draft + report + verdict kept; queue updated 2026-09-05 18:55:02 -06:00
Drew T 5d8b8478fa docs(phase-32): T4b (7) ledger — func_800CF3E8 banked (md_MAIN_003 100% C), backlog re-rendered, the Fable draft + report + verdict kept; queue updated 2026-09-05 18:43:11 -06:00
Drew T 1081b02b66 docs(phase-32): T4b (6) ledger — func_801834A4 unpinned (2 walls remain), backlog re-rendered, the Fable draft + report + verdict kept; queue updated 2026-09-05 18:25:29 -06:00
Drew T 9564314095 docs(phase-32): T4b (5) ledger — func_80020DA4 unpinned (3 walls remain), backlog 11 open, the Fable draft + report + verdict kept; resume queue (3-at-a-time) tracked 2026-09-05 18:16:50 -06:00
Drew T 32ff170bf3 docs(phase-32): T4b (4) ledger — func_8017DF28 unpinned (4 walls remain), backlog re-rendered, the Fable draft + report + verdict kept; bank.sh takes SPLIT for _jr_ TUs and prints rtu's tail when no verdict line appears 2026-09-05 13:28:35 -06:00
Drew T 1f024f8e4b docs(phase-32): cookbook §501-C — the dying-input suggestion vs the birthing boost (func_800CD674); backlog 13 open; bank.sh DRAFT_DIR + R43 hardening; T4b row (3 banked) 2026-09-05 13:26:52 -06:00
Drew T d913bca9b7 docs(phase-32): T4b (2) ledger — func_80039DEC unpinned (5 walls remain), backlog re-rendered, the Fable draft + report + verdict kept (R20) 2026-09-05 13:20:36 -06:00
Drew T 177f4a7dfd docs(phase-32): T4b (1) ledger — func_800391D4 unpinned (config/wave_exclude.txt 6 kept / 1 dropped by exclude_audit), backlog re-rendered (15 open), the Fable draft + report + verdict kept (R20) 2026-09-05 13:15:53 -06:00
Drew T 90acd6902f docs(phase-32): T4 DONE — the walls' FINAL ledger: 7 pinned rows re-probed in TU context (3 CC1 FAILs were plumbing, re-probed in a sandbox TU), 1 PROVED + 6 CANDIDATE, no verdict changed; pins annotated, backlog rows for all 7 (R62 paths fixed), cookbook §500-I, decision-log
- every wall's best draft re-run with rtu_match in its CURRENT real TU: func_80011380 DIFF 6 (--o0, §474 PROVED),
  func_80020DA4 DIFF 2, func_8017DF28 DIFF 2, func_801834A4 DIFF 6 ×3 variants; leaf match_one re-measured the CC1 rows
  (func_80032A74 1, func_80039DEC 2 permuter / 9 sonnet, func_800391D4 3)
- the three CC1-FAIL rows: func_80032A74 = 7 typedefs the TU provides via 800_shared.h + 4 decl spellings → synced copy
  (.run/P32/t4/drafts/func_80032A74_tuclean.c) DIFF 1 in the real TU (idx 244 lh vs lhu); func_80039DEC = the TU's narrow
  prototype (800_c.c:3496) vs the K&R def → sandbox TU (.run/P32/t4/tu/, no-proto decl) DIFF 2; func_800391D4 = the
  load-bearing `D_80073140[][1]` vs the TU's `[]` → sandbox TU DIFF 3 (TU-compatible spellings regress to 65 @ 76)
- config/wave_exclude.txt: each of the 7 lines carries its S83 re-probe verdict; exclude_audit --assert-fresh 7/7
- backlog: rows for all 7 walls (the path-less func_80011380/func_801834A4 given existing drafts, R62; two rows re-logged
  after a shell-quoting mangle); docs/backlog.md 16 open
- CURRENT_PHASE.md: T4 row DONE, the wall ledger table (row · ins · class · leaf/real-TU closeness · mechanism+citation ·
  attempt record · verdict · best draft; func_800CF3E8 listed as an unpinned candidate), the T4 log entry, 🛑 block → T5
  (R27 Max prompt + the gate-2 procedure)
- cookbook §500-I (the sandbox-TU re-probe method + the verdict table); accelerators (8); decision-log P32 S83 (R31)
2026-09-05 12:11:10 -06:00
Drew T 836181a6c2 feat(phase-32): T3 (38) — main: func_8001BC6C (69 ins) BANKED byte-identical 143dbb89 via gate_main — permuter_ils found the two levers, the coordinator dropped its wrong-width mutation (R63) and re-spelled them well-defined
- seed: the Opus NEAR-6 draft (.run/P32/t3/opus/func_8001BC6C.c; §500-C REGALLOC-PERM $v0<->$v1 across the six OT-chain insns,
  local-alloc qty_compare one span unit). permuter_ils 8x150s -j3 --klass REGALLOC: cycles 6/7/8 = 6, 5, 1 (output-1-1)
- R63 read of the "1": three mutations — (a) `idx` computed AFTER `color`, (b) an early dead `tag = (a1 << 8) | k;` before
  k's assignment, (c) `(D_800B9A02 & 0xFFu) << 14` — and (c) turns the target's `lhu` into an `lbu` (semantically WRONG:
  the masked score rewards it; second witness after S80). (a)+(b) alone = leaf MATCH 69/69; (a) alone 8, (b) alone 21
- well-defined re-spelling: `k = 0; tag = (a1 << 8) | k;` at the top (I1) MATCHES; k-initialised-first (15), tag=a1<<8 (19),
  tag=a1 (8), tag=(a1<<8)|K (20), tag=0 (8), tag-then-k (8) all regress — the lever is the early BIRTH of the tag/k pseudos
  (§47 live-length: qty_compare = floor_log2(n_refs)·n_refs·size/(death−birth)), documented in the source comment
- rtu_match MATCH 69/69 in src/800.c; gate_main slate_main3: "slate 1 -> 1 compatible … BANKED 1 of 1 … 143dbb89 BYTE-IDENTICAL",
  EXIT 0 (.run/P32/t3s3/gate/gate_main3.log); main open 7 -> 6 (5 pinned walls + func_80039308 NEAR 17)
- func_800CD674's ILS plateaued at the SAME $a3<->$t1 pair (output-2-1 = 2 rows, no drift) — ledgered with its cost (R41)
- variants kept under .run/P32/t3s3/p1bc6c/ (the 11 spellings measured)
2026-09-05 11:35:41 -06:00
Drew T 2fdcc4f120 docs(phase-32): T3 S83 CHECKPOINT — 28 banks (census 44 -> 16 stubs / 3,827 ins), fleet R22 218/218 twice, the 17-row Haiku queue 17/17 MATCH; cookbook §500-F; 🛑 block refreshed
- CURRENT_PHASE.md: T3 row (47/47 drafted, 38 banked, 9 NEAR ledgered, 0 FAIL), the S83 log entry, the 🛑 SESSION
  CHECKPOINT rewritten to the verbatim-replay standard (supersedes the 10:01 block): state, what S83 did, the 16-row
  census with draft paths, NEXT (step 8 permuter_ils ×2 + one Opus look, then the close), files/tools/gotchas, T4/T5 carry
- cookbook §500-F (the queue's yield + the four integration classes a per-draft rtu_match cannot see: same-TU spellings,
  §304 ×3, verdict-relative-to-TU-at-verification, the md_* jtbl route is §303); docs/cookbook-index.md regenerated (--check OK)
- .run/P32/t3/BRIEF.md: the §304 + exact-TU-spelling contract lines; harvest_notes.md; verdicts.jsonl +17 (session 491895ad);
  pending_launch.txt emptied (all 17 launched 10:57); the 17 Haiku drafts + 3 agent reports (R20)
- tools/jtbl_carve.py: the leading-island refusal now says §303 supersedes the §260 split for md_* modules (P32 S83 witness)
- backlog: the 9 NEAR rows logged (class · closeness · best draft · cost "1 Opus agent, 30–70 min", R41); docs/backlog.md 15 open
- .run/P32/t3s3/ (NEW, allowlisted): splice.py, bank.sh (verbatim grep -> rtu xN -> splice xN -> one build -> sha -> commit
  on green), backlog_near.sh, prompts/ (17), gate/slate_main2.json + log, r22/r22b/tools-health/build/bank/twin_rescan logs
- census jsons .run/P32/frontier_t3s3_{mid,haiku}.json; progress digests regenerated by tools-health (R22 218/218 at 10:46 and 11:09)
2026-09-05 11:11:03 -06:00
Drew T 059266afca feat(phase-32): T1c — md_MAIN_034: func_800CB00C (123 ins) BANKED byte-identical 46153c06 from the stored S72 body; its S68 "compiler wall" pin dropped
- the census's best_draft (.run/wave_g0c/shard30, 174 ins, 7 pins) was a DIFFERENT, wrong body under the bare
  name (R48); the journal (R38) named the real one — .run/O21/opus/func_800CB00C.c (88 lines, 7 BLOCK-scope
  callee externs: gcc-2.7.2 demotes the later-definition type conflict to a warning at block scope). rtu_match
  MATCH 123/123 in the real TU (the S75 redraft too); the S72 resolver had gated only the wrong file, 3x.
- raw splice into src/md_MAIN_034/md_MAIN_034.c; module island pads derived at build (§303); make build
  BINARY=md_MAIN_034 -j8 rc 0, sha 46153c06bca859dec05aff59fb1a77d3add3d02b == check (R53); verbatim strict ok
- config/wave_exclude.txt regenerated (exclude_audit --write): the md_MAIN_034 WALL pin labelled a wrong draft,
  not a wall — 8 -> 7 entries; docs/backlog.md re-rendered (matched rows drop)
- 0 drafting tokens; no Sonnet agent needed (plan T1c adjusted: no redraft)
2026-09-04 23:38:03 -06:00
Drew T 09e0b27811 docs(phase-31): S80 #9c — the S79 drafting task's NEAR/WALL ledger: 15 rows logged to the backlog (each with the residual's gcc mechanism), the ≤3 residuals pinned as WALL candidates in config/wave_exclude.txt after an 8-seed permuter_ils sweep on the now-permutable pinned seeds (no score-0; func_80039DEC 9→2 = the K&R raw-preserve register, func_80023BF0 18→11 ADDRESSING, func_8017DF28's "1" was a divergent store rewrite — closeness stays 2, R14); cookbook §494 v2 (ten banks, the Opus verdicts' idioms: P_TAG bitfield store, inverted arms, sibling-reading, the 518-ins spelling laws, gdb-on-cc1 allocno arithmetic, K&R s16 params, true_dependence, field-boundary fences, extendhisi2 orphans, [][1] decls) + the final ledger; .run/S79w allowlisted (27 drafts + 3 permuter waypoints + verdict ledger + briefs, 264 KB — R20) 2026-09-04 21:21:05 -06:00
Drew T 80ddd40d23 docs(phase-31): S79 #7 close — cookbook §492 (plumbing was three things: a raw-splice bank, an -O0 checker flag, two R48 same-name phantoms), census 32, report, backlog ledger, checkpoint (task #8 brief); func_80011380 pinned as the §474 proved wall
Stubs 35 -> 32 after the #7 banks (commit:3873 commit:3874); R22 fleet 213/213 (.run/S79_check_all_7.log).
ov_SC05_018:func_80180BE0 and ov_SC06_010:func_801809E4 have NO draft: their ledger drafts were other
overlays' same-named functions (.run/backlog_drafts/<fn>.c is keyed by bare fn name) -> drafting pool.
config/wave_exclude.txt: main:func_80011380 pinned WALL with the §474 proof (fold-const split_tree +
stupid.c adjacency), 4 entries.
2026-09-04 18:35:38 -06:00
Drew T 9d15598b5a docs(phase-31): S77 FINAL checkpoint — 21 banked, self_decl_tu closed, the permuter yield curve, eight instrument defects 2026-09-03 19:51:02 -06:00
Drew T b5751c7c1e docs(phase-31): S77 checkpoint — 17 banked, the self_decl_tu lane closed, six instrument defects
T11 4/7, T12 13 banked of a 34-draft pool, T13 R22 213/213 twice (a green
baseline before the overlay banks and again after all 17).

main REAL 895 -> 899, stubs 46 -> 42. Fleet stubs 82 -> 65, distinct-code
99.3% -> 99.4%, MAIN game-code 57.1% -> 57.3%.
2026-09-03 19:25:02 -06:00
Drew T ce79a3e432 docs(cookbook): §449 — four compiler dials from the S75 redraft wave, two byte-gate confirmed
Provenance stated per row (CONFIRMED = banked through the whole-binary gate;
CLAIMED = the agent's own measurement on a function that did not bank), because
one of these came from a function that was adversarially upheld and then FAILED
the real gate.

A. reg_n_sets is a one-line scheduling dial (CONFIRMED, func_80180ABC 257 ins).
   sched1 schedules backward; a pseudo set exactly once gets the birthing_insn_p
   launch boost (priority = 7f000001 in cc1 -dS), which drags its load LATE.
   Splitting the RMW as 't = t + 1; *p = t;' makes reg_n_sets 2, suppresses the
   boost, and floats the load to the block head -- the block-local dual of §350's
   shared temp, WITHOUT the global-allocno penalty that costs the in-place addiu.
   Companions: 180 legal statement permutations all scored identically while one
   cc1 -dS dump named the cause (diagnose, don't permute); a pin-free fix for
   paired-register inversion; and gcc frame slot order is NOT declaration order
   (BLKmode aggregates go in order at expand_decl, an addressable scalar is
   forced to the stack later -- declare 's32 x[2]' to place a slot between two
   aggregates).

B. A single-set local's VALUE is visible at a switch join and erases a
   zero-extension (CONFIRMED, func_801806F8 241 ins). combine.c:10035 lets
   get_last_value bypass the label_tick guard when reg_n_sets == 1, so all seven
   narrowing spellings emit nothing. Diagnostic: a visible extension in the
   target means the variable has MORE THAN ONE SET in the original source.
   Verified against a matched sibling: andi is the multi-set zero-extend and
   sll;srl is NEVER reachable from a single expression.

C. CORRECTION to §439 -- the sll 16; srl 16 pair lands AFTER the jal, not before
   it (sched1 sinks the ashift past the call), and it works even for a KNOWN
   CONSTANT, because the call-split defeats folding structurally rather than by
   hiding the value.

D. An offline jtbl-rodata placement audit (CLAIMED, func_800CB00C -- did not
   bank, which is the point: both matchers compare .text only, so a jtbl
   function's MATCH says nothing about its table).
2026-09-03 00:30:55 -06:00
Drew T cf7f837231 fix(gate): main's TABLE REJECT verdict was unreachable — SaveLoadRoutine is a CARVE, not plumbing
SaveLoadRoutine (1,165 ins) is the largest open function in the project, 9.2%
of all remaining work, and has been carried as the §434 WALL. Gated alone
through gate_main, with the §376/§378 chain already applied, the verdict layer
says: "SaveLoadRoutine is BYTE-IDENTICAL; all 3989 differing bytes are
ELSEWHERE". The body has been correct the whole time.

What rejects it is where its FOUR jump tables (jtbl_80072ED4/EEC/F0C/F24) land:

    .data/.rodata (jump tables)  3,787 bytes   94.9%
    .text (perturbed code)         202 bytes    5.1%

and the built image is 4 bytes SHORTER than retail (413,692 vs 413,696) --
§446's first diagnostic, firing on a function §446 was not written about.

main_diff_locate.classify() already HAD a TABLE REJECT class, added in S72 under
a docstring reading "THE THIRD CLASS EXISTS BECAUSE THE FIRST TWO MISLABELLED
IT". It could not fire here for two independent reasons:

  * it keyed on the literal string `(.rodata)`, but main's section_order is
    [.rodata, .text, .data, .bss] -- its rodata sits BELOW .text and its jump
    tables live in `.data` objects, so TABLE REJECT was UNREACHABLE BY
    CONSTRUCTION on the binary with the most jump-table functions left. A
    section NAME is not a section ROLE.
  * it demanded purity (ro == outside), so 5% perturbed code defeated an
    all-or-nothing test and dropped the verdict through to PLUMBING REJECT --
    whose advice (fix_arity_callers -> cast_self_callers) addresses the 5% and
    cannot touch the 95% that is data. That chain was run on this function
    TWICE today and fixed nothing, exactly as the evidence predicts.

Now: table bytes counted in (.data) OR (.rodata), and the test is DOMINANCE
(>=60%) rather than purity, reporting the split and naming which part is the
carve problem and which the declaration problem.

Negative control over all five pre-existing verdict shapes (pure BODY, pure
PLUMBING, pure TABLE, MIXED, NOT FOUND) plus the S75 shape: 5 of 6 verdicts
UNCHANGED, only the SaveLoadRoutine shape flips PLUMBING REJECT -> TABLE
REJECT (MIXED).

Cookbook §447. The law: a class that cannot fire is worse than a class that does
not exist -- it converts "I don't know" into confident, specific, wrong advice.
When a verdict names a subsystem, check that subsystem owns the MAJORITY OF THE
BYTES before acting on it.
2026-09-02 23:05:27 -06:00
Drew T 9631949339 docs(phase-31): S71 CLOSE — R22 green 213/213, frontier 147, 63 banked, main past 50% 2026-09-02 11:15:21 -06:00
Drew T 6716100e57 docs: regenerated progress + backlog from the R22-green fleet (853/1919 = 44.45%, frontier 187) 2026-09-02 01:51:14 -06:00
Drew T 02e1b3a7e6 feat(waves): every pack now carries that function's own PAST-ATTEMPT history
tools/journal_notes.py mines the agent journals per (binary, fn) and appends a
PAST ATTEMPTS section to the pack; claude_wave_packs.py calls it automatically, so
it is the default rather than a step to remember. Idempotent, and R48-safe (a note
stamped with a different binary is never served — §238 homonyms).

Measured before adopting (S71 wave 1, 50 one-agent workflows over the 210-function
real frontier where every target had already refused an earlier wave):
  * 38/39 MATCH at closeness 0 (97.4%) vs S70's 124/131 (94.7%) on an EASIER pool
  * 29/39 agents cite a prior attempt as what they used
  * 4/39 banked by RECOVERING a body that already matched, from a path a note named
  * 11/39 matched on the first compile

The two costs it removes are re-testing a measured-inert lever (§406 lists twelve,
§407 fifteen, §410 four — each paid for by an agent and never seen again) and
re-deriving a body that already exists on disk.

Also: jr_isolate_all places file-local `static` definitions with the region that uses
them instead of refusing the whole file. A `static inline` helper (§82.1) has no
address by construction, which is not a defect; the R32 guard was refusing these and
blocking the isolate on 4 of the 6 overlays whose CARVE-REFUSED functions it is the
named remedy for. Two regions using one static is still a hard refusal (duplicating a
used static is a byte change, R43).

docs: cookbook §411, wave-playbook step 3b, accelerators entry.
2026-09-02 01:11:52 -06:00
Drew T 1632c6adec docs(phase-31): S70 FINAL-4 — 145 banked (355->210), 115/118 wave MATCH, 5 card defects (3 fixed), cookbook 1074 2026-09-01 23:40:28 -06:00
Drew T 64dc914afe chore(report): refresh digests after the §332b banks 2026-09-01 20:46:09 -06:00
Drew T 9b57eaa2f0 chore(report): refresh digests after the S70 twin banks 2026-09-01 17:48:01 -06:00
Drew T 2fbf93d2e0 chore(report): refresh backlog + fleet progress after the S70 banks 2026-09-01 17:30:02 -06:00
Drew T 49f27f2293 chore(report): refresh backlog + fleet progress after the S69 banks 2026-09-01 15:45:46 -06:00
Drew T 4cf531beea docs(cookbook): §399 — four levers from the final S69 round, harvested late
Caught by Drew asking whether the last waves were harvested. They were not: I
banked 1 of 5 (§398b) and left four lever sets in the notifications. Also found
two paid-for MATCHes that were never staged or gated.

(a) a fence BETWEEN two prologue loads, where source reorder does nothing —
    the order is fixed before statement order matters (md_MAIN_013/func_800CB56C)
(b) SINK a call into BOTH arms and let cross_jump keep only the jal suffix;
    88ins/close86 -> 92/13, then §3-T2 field order let each sh $zero fill an lhu
    load-delay. Duplicate in source so the compiler merges, rather than writing
    the merged form yourself (ov_SC07_001/func_8017EDC0)
(c) a $v0->$a0->$s3 DOUBLE COPY is a two-pseudo tell: SImode temp for the compare
    + separate HImode var for the tail (70->37); plus §195-N precondition 5 —
    nesting `return 1` with ONE trailing `return 0` blocks jump.c's store-flag
    transform so reorg fills both delay slots (18->0) (ov_SC02_017/func_8018347C)
(d) the re-tie as a BIV KILLER: a second set makes n_times_set>1 so loop.c
    refuses the pseudo as a biv, killing the combined address giv. volatile was
    worse, a dead read did nothing (ov_SC07_001/func_8017E4DC)

(d) makes THREE distinct uses of the zero-byte re-tie in one session — §380
un-hoists a move_movables invariant, §393 kills the scheduler's birthing boost,
§399d denies a biv. One line, three passes: when a single-set pseudo is being
treated specially, give it a second set.
2026-09-01 15:18:40 -06:00
Drew T f8e522ea0d docs(cookbook): §378b — the four decl-blocker variants, and the two places §378 does NOT apply
Correcting my own guidance from earlier today. §378 gave the self-caller chain;
three more variants appeared within hours and two of them BREAK the chain.

Variant 3 (NEW, byte-proven ov_SC04_018/func_8017F35C, banked): conflicting
RETURN type on a decl that is ALREADY no-proto, where the symbol is
ADDRESS-TAKEN rather than called. --any-proto has nothing to relax and
cast_self_callers has no call site to cast; --sync-decls ALONE fixes it, and is
safe precisely because an address-taken site has no arguments to convert.

Variant 4 (REFUTATION of what I wrote in the playbook this morning): "run the
same chain on the callee the diagnostic names" is wrong at scale. Applied to
func_8012AD44 in ov_SC07_000 it no-protoed 60 caller decls and the binary went
RED (265b24bb vs 9dbe4241); reverted via journal. The self case is safe because
step 2 casts the call sites so the decl change cannot alter argument conversion;
for a callee, cast_self_callers correctly refuses and the decl change runs
unprotected. It banked main/func_80021D38 only because that callee had ONE decl,
not sixty.

Rule added: never --any-proto a symbol whose call sites you are not also casting;
count the sites first. The chain is a DECISION TABLE, not a sequence to run
blindly.
2026-09-01 13:34:21 -06:00
Drew T 1dd15eda32 feat(triage): the triage ladder — built, wired, and acceptance-green
tools/triage_ladder.py — the zero-token pre-agent pass, split PRE (target-side:
BANKED/WALL-332/PARKED, no build) from POST (residual_rules_b, needs a draft).
--escalate refuses a walled or banked target; --acceptance is the R39/R32 harness.
Refuses on a non-quiescent tree: a merging gate makes the stub oracle wrong in
both directions (measured, ov_SC01_004:func_8017EB30).

Acceptance, on the whole corpus: false-skip 0/1367 open stubs, recall 426/426
matched, wall tier fires on exactly the 10 enumerated walls (0 extra, 0 missing).
The first wall control asked for evidence that CANNOT exist — it scanned banked
functions' .s, which splat never writes — and printed '0 scanned / 0 tripped',
indistinguishable from a pass. The R32 empty-denominator assertion caught it on
its first run; replaced with a two-sided sweep over all open stubs.

tools/cast_self_callers.py — the §378 lever + --sync-decls for the narrow-param
case C89 forbids no-proto from reaching (§378a).

Wiring: wave_args drops walled/parked targets at draw time via pre_classify (one
implementation, R33); escalate_fable.js refuses any target without triage:'DRAFT'.

Tool fixes found by measurement:
* fix_arity_callers was blind to main entirely (globbed src/main/main*.c; main is
  src/*.c) — reported success over an empty file set through three gates. Now
  refuses when --binary selects no files.
* parallel_gate records each worker's 'failed by class' line (was truncated out of
  the 200-char tail); gater_lane retries in-tree ONLY on the diagnostic-free
  blind-worktree signature — S69 ran 22 serial retries against real cc1 errors.

docs: cookbook §376/§377/§378 (index 1033), SETUP.md, wave-playbook §4b.
2026-08-31 23:53:50 -06:00
Drew T 0816ea0576 chore: refresh the backlog + fleet digests after the S68 banks 2026-08-31 17:27:15 -06:00
Drew T ed53a68f18 feat(p31 s68): deferred propagation done honestly (2 banked) + seed_ref was offering DEAD TEXT
The S67 FINAL-3 OPEN item, plus the two defects found while doing it.

* fix(dedup_propagate): the tool could not run AT ALL. S67's -j patch wrote
  `os.environ` at module level in the one module that imports `os as _os`, so
  every invocation died with NameError before doing any work. Propagation was
  not deferred, it was impossible. Import-checked the other 7 -j-patched tools.

* propagation, honestly scoped: the real closable set is 11, not 32, derived two
  independent ways that agree (seed_ref exact+same_addr, and a direct corpus
  derivation). The 3,161-entry --auto-from plan over 53 overlays is dedup
  hygiene over already-matched code and closes almost no open stub.
  Applied: 2 banked byte-green (ov_SC04_018 func_80181270, func_80182AF8);
  3 gate-refused and cleanly reverted; 6 blocked with named blockers
  (3 CARRY-FIXABLE, 3 func_80144B9C not-inline-def -> needs the o0 whale carve).
  R22 clean fleet: extract 212/212, check 213 passed 0 failed of 213, rc 0/0/0.
  Frontier 453 -> 451.

* fix(seed_ref): REFUSE targets in LINKED subsegs. The playbook calls this tool
  "the fleet-wide answer" and it reported 82 open stubs with a banked twin --
  43 of them main stubs whose TUs the linker script never references. Any C
  written there compiles, links and leaves the SHA1 green WHETHER OR NOT IT IS
  CORRECT, so a mechanical twin lane fed from that list could have minted up to
  43 gate-green FALSE matches the byte gate cannot see. draw_waves has refused
  these since S66; this oracle did not. The refusal is counted and printed, not
  silent. NC: guarded 39 subset of raw 82, all 43 dropped are main, the non-main
  population is identical.

* wave drawn: .run/S68o1 (24 opus 187-770 ins) + .run/S68m1 (30 main), cards +
  packs + wave_args asserted, queue of 53. Drafting opened at concurrency 5.
2026-08-31 15:59:01 -06:00
Drew T 34da91b45e docs(p31 s67): harvest §339-§345 from the 30-workflow streaming burst
Seven sections from 30 single-function opus workflows on 187-297 instruction targets (30/30 MATCH):
 §339 a 2-case switch OMITS gcc's low-bound range test (stmt.c emit_case_nodes) — so slti/bnez
      between two beqs is a COUNT TELL that a case node is missing from your draft
 §340 §194-K corollary: a 'scheduler' residual can be sched.c's ALIAS ORACLE inventing a false
      true-dependence; source order picks the edge's DIRECTION, so reverse it into an anti-dep
      rather than fighting it (10->0, zero bytes; 3 alternatives refuted with reasons)
 §341 an HImode store temp reweights a sched2 tie no statement order can reach
 §342 NEW LAW: a twin's  param cast in a local is NOT byte-neutral when a later param also
      needs a callee-saved reg — and the §333 converse does NOT hold (gcc may already pad the gap)
 §343 decl_prior's fleet MAJORITY can be wrong about the true signature — read the RIVALS.
      Measured: void(s32) x1374 vs the truth s32(s32) x163. The tool is honest, the corpus is wrong.
 §344 raise a biv's global_alloc priority with a zero-byte REFERENCE; a register pin kills LSR
 §345 volatile STORE evicts the MEM from cse and keeps sh; volatile LOAD blocks combine and
      degrades lh into lhu+sll+sra — the qualifier is not symmetric

Also: seed_ref validated on a live A/B. The same 187-ins body cost 102,193 tokens / 476 s in
ov_SC03_107 when the card said 'no banked twin', and 72,077 tokens / 135 s in ov_SC07_006 once the
card carried the twin — 30% fewer tokens, 3.5x faster. A second instance (func_8017F62C) went
63,595 vs 118,485 tokens. others_open=137 on that one exemplar, so it compounds.
2026-08-31 14:14:26 -06:00
Drew T bac7537564 fix(p31 s67): repair ov_SC04_018 — dedup_propagate deleted a decl layer the surviving bodies needed
R22 caught it: 212/213 after the S67-cc1 gate run. `ov_SC04_018` was RED.

ROOT CAUSE (from the diff, not inferred). Commit commit:3354's propagation replaced three bodies in
`ov_SC04_018_jr_80135D20.c` with DEFINE_func_*() instantiations and deleted the 981 lines they
occupied — INCLUDING the TU's file-scope declaration layer, which the two surviving non-deduped
bodies still referenced. A duplicate copy of those decls survived at line 225, BELOW the function
that uses them at line 42, so C89 ordering made it fatal (`D_8018D7A4' undeclared).

THE STRUCTURAL GAP: gate_stage byte-gates the SOURCE binary, then propagation writes to N OTHER
binaries and nothing re-verifies them. "fleet 99.2%" in the commit subject is a metric, not a gate.
This is the blind spot R50 exists for, and only the periodic whole-fleet R22 could see it.

REPAIR: restored src/ov_SC04_018 to commit:3354^, re-extracted (banking had pruned the .s stubs the
restored INCLUDE_ASM lines need), rebuilt rc=0 at the locked SHA fe9b413f. dedup-check clean
(2193 validated, 0 failed, C1 255302/255302). Cost: the 2 banks in that binary.

NEW tools/restore_dropped_decls.py — compiler-driven recovery for this failure mode: build, read
which identifiers cc1 calls undeclared, look each one up in the pre-deletion git ref, insert it
above the leading #include block, repeat. Two defects found and fixed in it while using it:
  * anchoring after "the last extern in the first 400 lines" inserts BELOW the point of use, so the
    build fails identically and the loop re-inserts forever (measured: 25 rounds, 100 dead decls).
    The only safe anchor is the top of the file.
  * a no-progress guard now REFUSES when a round asks for what the last round already inserted.
It also correctly refused when the failure changed class (link-level undefined references), which
is how the wider damage was found rather than papered over.

NOT a defect of the S67 §8d rung: scope_demote_drafts only ever writes draft dirs under .run/.

FLEET: make clean + extract-all + check-all = 213 passed, 0 failed of 213.
FRONTIER: 530 -> 526 (4 functions closed this session, measured from corpus.stubs).
2026-08-31 09:44:50 -06:00
Drew T c4380c19e4 feat(p31 s67): stranded-draft census + honest jtbl probe — the frontier's biggest class is carve plumbing
MEASURED (denominators in .run/S67_findings.md):
* 193 of the 530 open functions ALREADY have a draft on disk (1,885 wave targets seen,
  1,521 banked, 171 open-no-draft, 166 never drawn). Classified in their real TUs:
  37 MATCH / 67 NEAR / 89 CC1-FAIL.
* 159 open functions (30% of the frontier) reference a jump table; 96 are PLAN-REFUSED
  by build_carve (non-contiguous same-subseg .rodata), 75 non-main across 38 subsegs.
  Not a codegen wall and not a decl wall — carve plumbing.

NEW
* tools/strand_census.py — coverage-asserted census + rtu_match classifier + draft staging.
  Keys binary:fn (R48); classifies each pair once after merging every manifest's view.
* tools/o0_detect.py — the -O0 prologue tell extracted from match_one (which parses argv at
  import and therefore cannot be imported). match_one re-exports it; ONE definition (R33).
  Wiring it into the classifier turned md_MAIN_003 from 8 NEAR (7 of them >20) into 6 MATCH.
  Negative-controlled both directions.
* tools/scope_demote_drafts.py — §8d as an _xform-contract gate rung. NOT yet exercised.

FIXED
* jtbl_carve --probe now runs build_carve (a pure planner) and reports plan-refused. It
  previously called only island_probe, which answers a necessary-not-sufficient question —
  every blocked function probed "carveable", and S66 priced 32 of them as free on that.
* blocker_probe.macro_scope selects the LAST #define per macro name, matching cpp.
  engine_core.h has 1,037 duplicate DEFINE_func_ names and 4 with DIFFERENT bodies.

NOT VALIDATED — DO NOT SCALE
* jr_isolate_all: two real defects fixed (carried types deduped by name; header-provided
  types no longer re-emitted) but ov_SC02_000 STILL fails the byte gate after them.
  Open lead: file_scope_types carries a block without its enclosing #if guard. 20 of 35
  blocked overlays dry-run clean and that number means nothing until one round-trips.

0 functions banked this session. tools-health has ONE pre-existing cdecl defect
(1 of 74,749 declarations, func_8017EE08_p55352/struct ZnRec) — cdecl.py and its inputs
are byte-identical to HEAD, so it is not from this change.

Knowledge banked: cookbook §322/§323/§323a/§323b, decision-log pivot, accelerators #13/#14.
2026-08-31 01:46:16 -06:00
Drew T d343892b4c chore: --only-main draw mode + progress/backlog refresh after the S66 gates
draw_waves.py gains --only-main (the main lane draws main and nothing else; implies --main so the
LINKED refusal still applies). Progress/backlog regenerated: fleet 99.2% instruction-weighted,
98.1% distinct.
2026-08-31 00:00:37 -06:00
Drew T 45cf37ee02 docs: refresh progress/backlog after the S66 gates (260 fns closed, fleet 213/213) 2026-08-30 14:28:10 -06:00
Drew T d804449be5 fix(distill): carry banked=False through to the distiller and the verifier
The distill prompt asserted 'the whole-binary byte-gate ACCEPTED the final draft, so the final body is
ground truth' for EVERY target. With --with-unbanked now feeding it drafts the gate REFUSED, that
sentence would have laundered an unproven body into a byte-proven cookbook entry (R14/G3). A target
with banked=False now gets an explicit PROVENANCE WARNING telling the distiller to extract the lever
anyway (cookbook 52: a model that FAILS still distils the idiom that cracks its siblings) but to mark
every claim UNPROVEN and never assert byte-equality; the verifier is told the same so its
entry_markdown carries the label. Exercised this session: the one surviving ADDENDUM came from an
unbanked draft and is filed UNPROVEN.

Also regenerates the scoreboard after the day's banks.
2026-08-29 19:03:28 -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