mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-27 22:45:39 -04:00
85fb289db582d842fc41dc059fa187bb992e76ea
56 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
895bb6a239 |
feat(phase-30 S50): clear the func_801EDC18 carry blocker — 4/4 banked, and re-priced
- The blocker was carried as "one missing file-scope extern gates 83 PURE members". Both halves were wrong (R14): corpus.stubs says 4 open members, and D_801ED98C is a DEFINED const Blk8 whose rodata lives inside the member's own nonmatchings .s — replacing the stub deletes the data with it. gather_externs can carry an extern DECL, never a DEFINITION, which is why it reported "no file-scope decl" for a symbol md_SC05_023 defines on line 114. - Fix: paste typedef + const definition + body per sibling (data bytes verified identical across md_SC05_024/025/028/029). 4/4 banked. - aprop_symfix: new `local-only` class — draft-DEFINED identifiers that merely carry a vram-looking suffix (Blk8_…, S8_…, L_call_…) are not stale symbols. Measured: that is every non-clean case in the whole wave-7a/7b stored-draft residue, which holds ZERO stale-symbol recoveries (a clean negative result — the defect was A-prop-specific). - cookbook index regenerated (tools-health fails closed on a stale index — it caught §171). - R22 clean rebuild: check-all 213 passed, 0 failed of 213. Stubs 12,445 -> 12,441. |
||
|
|
57ff04c1ac |
docs(phase-30 S48): §167 — wave-5/6 harvest, and the saturation signal
27 note-sets, 197 claims, one skeptic each, against a cookbook already holding §162-§166 from this campaign: NEW 5 · SHARPENS 43 · COVERED 126 · UNSOUND 23 byte-probed 92 · single-instance 75 · asserted 30 COVERED+UNSOUND: 57% (§164) -> 64% (§165) -> 76% (here). The duplicate rate rises monotonically as the base grows. FIVE genuinely new laws out of 197 claims is the signal that the idiom well for this class of function is approaching dry — future waves should spend tokens on cracks, not on mining notes for idioms, and harvest only what a skeptic grades byte-probed. The skeptics ran their own A/Bs this round. Best example: a crack agent claimed "the source STATEMENT BOUNDARY decides whether the scheduler hoists a far-consumed load". The vetter built that spelling and got .text BYTE-IDENTICAL to the inline form, then swept eight POSITIONS and got five distinct objects — showing the lever is statement position (the already-banked INSN_LUID tie-break), not the boundary. Plausible mechanism, refuted by measurement, true lever named in its place. 46 entries banked as §167-01..46; §167z records the 23 refutations. cookbook_index.py: 508 sections. |
||
|
|
80f3ee7397 |
fix(phase-30 S48): §166 — the destination-TU oracle, and stop printing a guess as a finding
gate_stage labelled every "standalone MATCH / whole-binary DIFF" with "(declaration/TU plumbing)". The tool never checked for a declaration conflict — that was a GUESS printed as a diagnosis, and func_8017F2D4 carried it through SEVEN attempts across five waves while every agent hunted codegen. The body was byte-correct from the first attempt; the notes had simply named the wrong destination TU (a file holding only a caller + prototype), and splicing there is a no-op that leaves the INCLUDE_ASM bytes in place. - gate_stage now says only what is true (the two oracles disagree) and hands over the check that resolves it, instead of naming a cause it did not measure. - §166a banks the oracle: asm/<ov>/nonmatchings/<TU_stem>/<fn>.s => the INCLUDE_ASM is in src/<ov>/<TU_stem>.c. The third path component IS the TU stem, derived from the split config, and it beats any prose citation — a grep for the function name also hits callers and prototypes in OTHER TUs and reads exactly like a destination hit. - Plus the two probe gotchas that cost wave-5/6 agents real time: the wrong --aspsx-version fakes ~32 ori-vs-addiu mismatches, and a collateral-drift check must filter to sized symbols (nm -S) or the zero-size .NON_MATCHING aliases all report false drift. cookbook_index.py: 506 sections. |
||
|
|
a2362e6711 |
docs(phase-30 S48): §165 — wave-4 harvest banked the same day the wave landed
19 note-sets, 131 claims, one skeptic each, vetted against a cookbook that already held §162/§163/§164 from this same campaign: NEW 8 · SHARPENS 39 · COVERED 64 · UNSOUND 20 byte-probed 61 · single-instance 43 · asserted 27 COVERED+UNSOUND is 64%, up from §164's 57% — the duplicate rate RISES as the knowledge base grows. That is the argument for harvesting after EVERY wave: a wave launched before its predecessor's harvest lands re-derives laws already on disk. This one was banked while wave-4 propagation was still committing. THE PASS CORRECTED ITS OWN PREDECESSOR. §165-01 BOUNDS §163a, banked hours earlier today. §163a says "block scope is a conflict SOLVENT" — byte-proven, but on a DATA symbol. It does NOT reach an ARITY conflict: there the two decls are COMPATIBLE (cc1 emits no `conflicting types` for scope to downgrade) and the failure is call-vs-composite in convert_arguments (c-typeck.c:1623), which a `()` declaration cannot defuse at ANY scope. The diagnostic word picks the lever: `conflicting types` -> §163a's solvent; `too many arguments` -> cast the call site (§17a-1/§161c) or replace the host prototype. §165z records the 20 refuted claims. cookbook_index.py: 505 sections. |
||
|
|
137a8540b5 |
docs(phase-30 S48): §164 — 190 claims vetted by 34 skeptics, 82 banked, 28 refuted
The §163z catalogue was 34 crack-agent note-sets claiming 190 distinct laws. One independent skeptic per function, each required to read the full notes, grep the whole cookbook, classify, and GRADE THE EVIDENCE: NEW 20 · SHARPENS 62 · COVERED 80 · UNSOUND 28 byte-probed 114 · single-instance 51 · asserted 25 57% of what the crack agents flagged as novel was already in the cookbook or does not survive scrutiny. That ratio is the lesson: a crack agent is the right instrument for FINDING a lever and the wrong one for judging its novelty — it has just spent hours in one function and has not read the other 497 sections. Never bank a wave's flags directly. Banked as §164-01..82, each carrying its verdict, what it sharpens, and its evidence grade (70 byte-probed, 12 single-instance). Several skeptics CORRECTED the mechanism the crack agent proposed while confirming its effect — e.g. the "fold distributes the constant out of an index" claim, where the skeptic traced the real site to expand_expr's MULT_EXPR EXPAND_SUM case (expr.c:5359-5375) after showing pointer_int_sum's distributive law cannot fire on that tree. §164z records the 28 REFUTED claims with the reason, so no future wave spends tokens rediscovering them. cookbook_index.py: 501 sections. |
||
|
|
57cef6325a |
docs(phase-30 S48): §163 — the five vetted laws from waves 2-3
The waves flagged ~40 candidate laws. Five were byte-probed, generalizable and actionable enough to bank; they were deduped by hand against the file (no skeptic-agent pass this time, so each says what it sharpens and why that section is insufficient): - §163a decl-conflict severity is SCOPE-DEPENDENT — hard error if either decl is at file scope, warning only if BOTH are at block scope. §8d proves the phenomenon on D_801812A4 but never states the rule or its LEVER half: block scope is a deliberate conflict SOLVENT, so a struct-typed draft can be banked into a scalar-typed TU by moving the typedef AND the extern into the block. - §163b the switch-index parameter-WIDTH oracle: sll/sra straddling the minval subtract is a 2-insn signature of a short parameter. Read the extension, not just the bound. - §163c case_values_threshold is 5 — an empty `case k:` glued to default can be the only thing that emits a table at all; jtbl[k]==default label is the tell. - §163d cse deletes a reg-reg copy by rewriting the PREVIOUS insn's SET_DEST (cse.c:7440-7477). This is §162j's symptom in a DIFFERENT PASS and needs a different lever; the residual it explains had been declared "unsteerable, 30 variants all >=17" and fell to source-shape edits alone, no pins. - §163e the frame is a PSEUDO-NUMBER oracle (reload1.c:658 alter_reg in NUMBER order); dead-local slot order is not declaration order, and a BLKmode local is 8-aligned while a scalar s32 is not. Sharpens §162i, which gets the pad's SIZE right and its PLACEMENT wrong. §163z catalogues the ~35 unvetted claims by function so a future harvest can go straight to them, explicitly marked "one agent's reconstruction until re-measured" (R14). cookbook_index.py: 497 sections. |
||
|
|
0c5d6fa909 |
docs(phase-30 S48): §162 — the wave-1 idiom harvest, deduped by a skeptic pass
17 candidates from the 12 crack agents, each audited against the whole
cookbook by an independent agent before being written: NEW 3, SHARPENS 13,
COVERED 0 (one agent died mid-response — its entry, §162c, is written by the
orchestrator and labelled as the least-audited one).
The three genuinely new laws:
- §162e LICM: uniform loop-variable indexing is what makes a symbol address a
MOVABLE at all (a literal index leaves a constant, no base pseudo, no
hoist), and preheader order is body order.
- §162g cross-jump DIRECTION is a source-shape oracle: do_cross_jump always
keeps the LATER copy, so a BACKWARD jump into an earlier block can
never be cross-jumping — it is a source `goto`.
- §162n a conditionally-assigned alias pointer kills a spurious giv
(loop.c cant_derive).
Two in-place CORRECTIONS, because a reader who lands there first must not be
taught the superseded rule:
- §161a's "diagnostic tell (family-wide)" reads as a complete test on entry[0]
and actively teaches skipping the upper edge. Amended: check BOTH edges.
The maxval symptom is the OPPOSITE of the minval one — it shifts nothing and
costs two bytes, so it is functionally invisible.
- §25's triage rule prescribes pins for a symptom whose sibling mechanism
(local-alloc optimize_reg_copy_1) pins provably cannot reach, because
SMALL_REGISTER_CLASSES is never defined in config/mips/mips.h. Amended to
point at §162j.
The skeptic pass also caught two errors in MY submitted evidence: I had copied
§161a's minval symptom onto the maxval case, and I described func_8017F2D4 as
a verified MATCH when the whole-binary gate had refused it (it is still
INCLUDE_ASM). Both corrected in the entries.
cookbook_index.py: 495 sections, 14 symptom buckets.
|
||
|
|
d3f3d8ba22 |
feat(phase-30 S47-W1b/G2): 3 retries banked, 2 new rules; main signed for the first time
W1b — the 3 targets whose agents died on API rate limiting, retried with cookbook §160 in the prompt: func_801EFBF4 (reach 12), func_801EFDC8 (12), func_8018CC40 (10, jr). 3/3 confirmed by an independent verifier, all banked, R22 clean-fleet 213 passed / 0 failed of 213. func_8018CC40 failed the first gate with `too many arguments to function func_80178970` — which its own crack agent had PREDICTED in its report, naming the §17a-1 remedy. Dropped the draft's empty-paren externs and cast 6 call sites instead; banked. Read the agent's integration notes before diagnosing a gate failure — it has already seen the TU. Cookbook §161a-c (index 469 sections): §161a case 0: break; is LOAD-BEARING when a jump table is indexed from zero. The natural case 1..5 makes gcc-2.7.2 pick minval=1, emit `addiu $v1,-1`, and shift every table index — 58 of 77 mismatched on a byte-perfect body. Tell: the table's FIRST entry points at the function's own end address. Family-wide (10 members). §161b aliasing a parameter into a local can force a SECOND callee-saved register (+8 frame, +3 ins) even when uses are mutually exclusive. Suspect it before reaching for register pins. §161c loose-prototype engine helpers: don't fight the TU's (void) decl, cast at the call site. G2 — THE MAIN EXPERIMENT. family_hseq excludes main as "structurally barren — zero h_exact overlap". True and irrelevant: an h_exact claim guarding an h_seq tool. There is not even a sig-main target — main had never been signed for this pipeline. Signed it (2,002 fns, seeded from splat boundaries via corpus.stubs rather than --bootstrap, which glues functions around jtbl dispatch and would have corrupted the hashes under test). Result: main is ~85% singleton work, not 100%. internal h_seq families (>=2): 207 families / 748 fns / 11,537 ins (13.7%) shapes shared with the fleet: 161 fns / 1,346 ins (1.6%) genuine x1 remainder: ~71,034 ins (84.6%) IMMEDIATELY ACTIONABLE: 44 classes / 151 main functions / 1,239 ins already have a matched exemplar in the fleet — free propagation, invisible only because main is not in the map. Long-term: 748 of main's 2,002 functions (37%) are templatable once one exemplar per family is cracked, which refutes "2,002 independent cracks" as the planning assumption for the 79k-ins tail. OPEN, deliberately not done unilaterally: adding a sig-main target and dropping main's exclusion from family_hseq.load() changes a fleet-shared oracle every targeting tool reads. Needs Drew's call. |
||
|
|
d806766eef |
feat(phase-30 S47-W1c): crack the reach-57 exemplar; fix the instrument that called it a wall
func_801EDC18 (md_SC05_023) is the largest multiplier remaining — 57 members. The wave agent
abandoned it at "closeness 6" with class SIZE-MISMATCH [redraft]. It was two lines from correct.
THE CODE (cookbook §160a): the target copies 8 bytes with lwl/lwr + swl/swr — gcc-2.7.2's
emit_block_move for a type with ALIGNMENT 1. The draft used a u32 copy (aligned lw/sw), which is
wrong by construction. `typedef struct { char c[8]; } Blk8; buffer = D_801ED98C;` reproduces it.
Six spellings were tried in parallel; two independent agents converged on the same one.
THE INSTRUMENT (§160b) — this is the part worth more than the function. The target .s bundles a
leading `.section .rodata` block (D_801ED98C as two .word) ahead of .text. Those lines carry the
same `/* off vaddr HEX */` shape as instructions, so masked_diff.insns_from_s counted them as TARGET
instructions, while insns_from_object (objdump -j .text) can never emit them. A byte-perfect draft
therefore read `mine=26, target=28, 26 mismatched` — every position shifted by a constant +2 — and
got classified as needing a redraft. 116 of 12,583 .s files in the corpus have this shape, one at
-29 instructions. Every one of them would report a false wall to any agent that tried it.
Fixed: insns_from_s tracks .section and counts only .text. Full-corpus control: 12,467 unchanged,
116 corrected, 0 regressions. Same artifact class as §129a (post-carve jtbl inflation).
THE OWNERSHIP LAW (§160c) — my own error, corrected by the gate. Four sites declare
`extern short D_801ED98C;` and nothing in src/ defines it, so I shipped an extern-only draft. The
gate refuted it: `undefined reference`. The .s block the draft REPLACED was the definition. The
variant emitting `const Blk8 D_801ED98C = {{...}}` banks clean. Never infer ownership from externs.
R22 clean-fleet: check-all 213 passed / 0 failed of 213.
ALSO BANKED — the wave's idiom harvest, which had been sitting unwritten in workflow transcripts
(R16/R30 debt): §160d the ASYMMETRIC INDEX RELOAD (a just-stored narrow field read twice emits
reuse-then-reload; the C is deliberately asymmetric), §160e a stack-layout scheduling rule now
byte-proven on a SECOND independent function (promoting it from coincidence to rule), §160f the
address-only global store via array decl, §160g sibling-search keyed on the CALLEE SET as step 0 of
every wave prompt (one grep turned a 126-instruction crack into a copy-edit).
Cookbook index regenerated: 468 sections.
|
||
|
|
9ab9120e04 |
feat(phase-30 S47-B): conform 8 declaration axes (~10,930 sites); 3 guard defects fixed; 213/213
Task B, re-scoped from evidence. The 129 dedup_extend failures are 106 conflicting-types / 21 CC1-FAIL / 4 undefined-ref / 3 DIFF — real byte divergence is 2%, and memcpy is 17 of 106, not the story. Direction reversed too: the byte-true DEF of func_80128ED8 is what the target .c files already declare; engine_core.h's macro-local extern was the stub-era guess. Conformed 8 axes to byte-truth (func_8012F14C 2843, func_8012E5CC 2052, func_8012F038 2214, func_8014C568 1816, func_80128ED8 1524, func_8012C750 406, func_8012C0EC 50, func_80144A04 25). R22 clean-fleet: check-all 213 passed / 0 failed of 213. Zero functions banked by design. Tooling (R33/R35) — three guards that asserted completeness over a narrowed population: - NEW tools/macro_draft.py: a deduped fn has no definition in any .c (body lives in a DEFINE_ macro), so conform_decls had been refusing the largest class it was built for. - conform_decls skipped engine_core.h wholesale as "a defining TU": 10 stale externs survived while 1,514 fleet sites moved, and it still printed "axis complete". Skip now scoped to the defining macro's span. - Return-axis compare was literal: typedef int/s32 and a missing `extern` faked a return change. Now compares normalized types. - §85 consumer scan under-reported (the dangerous direction): a cast between `=` and the call hid `s0 = (s32 *)func_80144A04(...)`. Now classified by position, validated both ways. Corrections to my own predictions (R14): the documented scalar-narrowing hazard was benign across 2,052 sites; the breaks were arity (6 call sites, fixed with §17a-1 fn-ptr casts) and the consumer-guard gap. A header-only first probe broke ov_SC01_000 — §85 is literal. Not done, named: memcpy (builtin codegen), ApplyMatrixSV (no DEF), gte_SetRotMatrix (link bug), func_80147364 (unparseable macro), D_800AE620/D_80126CC4 (data axis). Cookbook §159. |
||
|
|
b0c1e14fda |
feat(phase-30 S46-final): 400+ cascade banked (11) + waste-prevention gate; B re-scoped, C blocked
- BANKED: 11 functions at 400-952 ins from the cascade (func_8017D898 952, func_8017CE58 733,
func_801902EC 673, func_8018C2D8 673, func_8018A8D4, func_8017C6F4, func_800CBB38,
func_800CF3A4, +3). check-all 213/213 from a clean tree. 6 near = jr/switch (§53 separate
banking step), 1 failed. The cascade agents wrote 6 new cookbook sections incl. §158.
⚠️ tools-health UNVERIFIED at commit (stale cookbook index fixed, confirming re-run
interrupted) — run it first next session. check-all is the byte oracle and it is green.
- WASTE PREVENTION (Drew: "prevent this from ever happening again, however you need to"):
* tools/validate_targets.py (NEW) — names 5 defect classes (NO-ASM / MID-BODY /
OUT-OF-RANGE / ALREADY-DONE / NO-BOUNDARY), exits non-zero.
* WIRED INTO wave_snapshot so it fails closed — every wave passes through there for its .s
files, so no path from target list to spawned agents bypasses validation. Negative-control:
a 3-target bad list is refused with the exact mid-body offset (+72 bytes of 100).
* The cascade `done()` predicate now short-circuits on SKIPPED as well as MATCH. It tested
only MATCH, so a non-existent target fell Sonnet -> Opus -> Fable and three agents each
proved the same phantom absent: ~29 invalid targets x 3 tiers = 87 of 119 agents, ~9.7M
tokens. A tier that cannot act must END the pipeline, not escalate emptiness.
* docs/accelerators.md A9, including that wave_snapshot's own R32 assertion REFUSED that list
(24 of 57 found) and was routed around — the one instrument warning that was right and ignored.
- B RE-SCOPED (S46-10) and deliberately NOT done: the extend blocker is INTRA-HEADER, not
target-side. engine_core.h declares memcpy FOUR incompatible ways across its DEFINE_ macros;
two in one TU collide. NOT a safe cleanup — the in-tree note at ov_MAIN_012.c:14333 records
that `extern memcpy` disables gcc's builtin and turns an inlined block-move into a CALL, so the
declaration CHANGES CODEGEN. Probe one macro in one binary and byte-gate before any sweep.
- C (dedup_extend over the 129) stays blocked on B. Full context for both in the checkpoint.
|
||
|
|
f6e48b60c5 |
perf(phase-30 S46-4): parallelise the propagation — 24min -> 11.4min, and +62 MORE instances
Drew: "make it more multi-threaded... I still see my cpu idle for far too long." Measured, fixed, and regression-tested against the S46-3 bank as a KNOWN ANSWER. - THE MEASUREMENT: 31s saturated (33 makes/48 cc1/load 27) then ~25s with ONE build alive while 31 cores idled, repeating. Causes: ex.map starts in list order so the giants land last, and apply/restore is single-threaded. - gate_all -> gate_failures: return EVERY failure the sweep already computed (~138 rounds -> 1). - Longest-first gate scheduling; results re-sorted into `changed` order so the verdict stays bit-identical to the serial loop's. - PER-OVERLAY INDEPENDENT SEARCH, IN PROCESSES. My first cut used threads and the box refuted it: 0-4 builds alive at load 3, because the work is regex over 15k-line files and 138 "parallel" searches all queued on the GIL. Same logic in a ProcessPoolExecutor: 14-29 builds, load 34.75, search phase ~100s. Safe because the shared header is written ONCE by the parent and each overlay owns its own .c files + build/<bin>/. Seeded with one in-process search first — a pool submitted at once gives every worker an empty suspect list and makes all 138 pay a full bisection. place_in_overlay extracted to module level so the worker and the in-process apply cannot drift (R33); compiles_standalone's fixed t.c is per-call now. - THE REGRESSION (the point, not the stopwatch): revert src/+config to pre-bank, re-run the identical command -> 29 functions (same), 141 overlays byte-identical, 682s vs ~1440s, and 285 exclusions vs ~350 => +62 MORE member instances (249,161). The old prefix-based necessity probe was OVER-EXCLUDING (charging 4 fns to 9 overlays that did not all need them); the per-overlay shrink minimises per overlay. The faster path is also more correct — a timing comparison would never have shown it. R22 213/213 + tools-health green. - STILL SERIAL, now the actual wall-clock (neither is a build): ~3min setup before the first gate (registered_addrs() yaml-parsing a 1949-group/249k-instance registry + 213 sig loads) and ~2.5min of sequential reconcile_caller_extern after the search. - Captured as defaults: docs/accelerators.md A8 + memory fleet-tool-parallelism-defaults. cookbook index regenerated (my §155c append left it stale — the gate caught it, exit 1). |
||
|
|
c697746462 |
docs(phase-30 S44 I.0): the static loader routing table + the full tool audit — knowledge captured
Plan-approved campaign (Fable5Max, ~/.claude/plans/optimized-squishing-engelbart.md). I.0 = capture
while hot (R30/R31), before any code:
- memory-map.md §"Phase 30 S44": the COMPLETE loader routing table, static-derived (G5) — the EXE's
loadDestPtrTable (0x80072C70: resident/overlay/slotA/slotB/type-7), the boot k-set {1,3,8,10,11},
the RESIDENT's index tables D_800D3764 (29x8, MAIN/13-41 -> 0x800CAE08) and D_800D384C (6x8,
MAIN/42-47 -> 0x800CCB1C), resident.c:641 (MAIN/12 -> 0x80128158), the SC07 pair's header-derived
0x801A00D8, gbase arithmetic (LIST.CD carries LBA+len ONLY), the slot-adjacency proof, the
module-id-word law (word0, dense 0x13..0x73, resident=0x36; MAIN/9-vs-39 duplicate flagged), and
"PAC type 1 = uncompressed overlay, type 4 = LZSS". SUPERSEDES P3-T5's "entries [1]+ are
runtime-indexed (no static xref)".
- disc-completeness.md: the "only knowable by runtime RE" doctrine REFUTED in place (H5, original
kept) — 46 of 78 addresses are static; the runtime-only remainder is 28 script modules + 4
stragglers, parked for L3 with evidence. Byte-sum correction (rows 3,406,325 B vs bucket
3,564,021 incl. PAC headers), MAIN/7 raw-path exception, MAIN/0≡1.
- tooling-audit.md §S44: EVERY tool classified with file:line — 8 must-change (family_remap VRAM
const, Makefile+modules.mk, sig-target generalization, audit_binaries de-ov_, family_hseq/
progress:647/audit_frontier globs, corpus.sig_is_independent), 7 one-line registrations, 5
retirements (disc_code_sweep superseded by disc_audit; reconcile_decls; 3 rollout one-shots;
ImportOverlay/VerifyOverlay.java), rest auto-OK/N-A. new_overlay.sh -> new_binary.sh design.
- decision-log (R31): the pivot entry — the emulator dependency dissolves; the "modules" mostly
dissolve into overlays (~75-77% h_exact-known; 802 novel fns); why the doctrine was missable for
30 phases (a confident negative doctrine is a claim like any other — date it, cite it, re-measure).
- cookbook §154 + index regen (454 sections): module-id word / dual base-voting (h_exact ~500:1 +
jal-alignment, must AGREE; thin votes => park, P9) / diff a mystery payload's head against classes
you already own before inventing a new one.
|
||
|
|
de141dc221 | docs(phase-30 S42): cookbook §148 — the loop.c hoisting threshold arithmetic, the MIN_EXPR clamp fold, the allocno-priority slider; and the x16 claim corrected | ||
|
|
bcdf6750bd | docs(phase-30 S42): cookbook §147 — the three-stratum frame law + four stop-searching verdicts (from the serial func_8017C294 run) | ||
|
|
4aa7dbdfa4 | docs(phase-30 S6): cookbook §146 — re-measure a wall before respecting it; both giants fell to stored drafts | ||
|
|
443a3e3afe |
feat(phase-30 S40): waves 1+2 bank 24/24 after recovery — ZERO codegen walls; +5,479 ins
Two ultracode waves over the open-only h_norm clusters (the pool nobody had ever aimed a wave at),
pool VERIFIED from the sigs first (R14).
wave 1 8 targets 8/8 match_one 5/8 gate first pass -> 8/8 after recovery
wave 2 16 targets 16/16 match_one 14/16 gate first pass -> 16/16 after recovery
THE HEADLINE IS NOT 24/24 -- IT IS THAT NOT ONE FAILURE WAS CODEGEN. All six first-pass gate
failures were TU-integration plumbing, each with an already-documented lever:
func_801802EC redefinition of morph_lerp strip the §77 PROBE LAYER (the draft carries types +
a static inline so match_one can compile standalone;
the real TU already defines them -- scaffolding is
not part of the bank)
func_8018B238 conflicting types D_80115158 recover_giant: draft declared it file-scope as a
struct array, TU declares u8[] BLOCK-scope inside
other functions -> block-scope the draft's externs
func_8017EF54 conflicting types (SELF) §37/§124 def-side asm-label alias (TU declares
void f(void) for no-arg callers; byte-true def takes
s32 in $a0; no-proto escape illegal once a param
promotes)
func_80183D78 conflicting types (callee) recover_giant
func_8017F278 conflicting types func_80146C3C §17a-1: the fleet canonical is the NO-PROTOTYPE
form + the intended signature applied AT THE CALL
SITE; a concrete prototype collides with it
(wave-2's 14 first-pass banks needed nothing -- the wave-1 lessons were folded into the prompt)
=> the gate number measures INTEGRATION, not matching. Run the recovery ladder before recording a
wave's yield or the metrics under-report the drafters and send the next wave hunting walls that are
not there. docs/wave-metrics.md S40-1.
POOL VERIFICATION (R14, and it cut both ways): the frontier report's cluster pool MEASURED
1,677 clusters / 5,795 fns / 319,755 ins at a 3.68x multiplier vs its claimed 1,689 / 5,956 /
326,261 at 2.7x -- within 2-4%, and the multiplier is BETTER than claimed. The SAME document's whale
claim was 3/4 wrong. Verify each claim separately; do not accept or reject a source wholesale.
ALSO: 24/24 members propagated from wave 1's 5 banked exemplars (0 failed) -- the same machinery
that returned 0/39 before this session's cast_call_sites fix.
NEW IDIOMS, distilled in-session (R16/R30):
§144 the LITERAL'S SPELLING picks the immediate encoding (`cnt + 0xff` vs `cnt - 1`: mod-256
identical, both one addiu, but gcc emits 0x00FF vs 0xFFFF from the source text)
§145a combine_givs ANCHOR RULE -- the address-giv group anchors on the LAST address-giv in SOURCE
order (record_giv prepends, combine_givs takes the head); store order decides the base and a
wrong choice spawns a third induction register
§145b a bare `p = r;` is a COMBINE BARRIER (can_combine_p/use_crosses_set_p) -- it preserves a
pointer-bump addiu that combine would otherwise fold into every MEM offset
§145c chained assignment `a=b=c=0` emits stores RIGHT-TO-LEFT
VERIFIED: make clean && make extract-all && make check-all -> 140 passed, 0 failed of 140.
Fleet 12420375 -> 12425854 instr (+5,479); distinct +5,479 / +43 uniq; fn-count +43.
audit-digest OK. 0 NON_MATCHING (G4). Cost: 3.73M subagent tokens across 24 agents, 0 errors.
|
||
|
|
84d1193f21 | docs(phase-30 S40): cookbook §144 (literal spelling = immediate encoding) + wave-metrics S40-1 (8/8 after recovery, 0 codegen walls) | ||
|
|
6e0b1605c6 |
fix(phase-30 S40): cast_call_sites read a RETURN as a prototype and deleted it — 0/39 sweep becomes 18/39
THE BUG. tools/cast_call_sites.py classifies a declaration line with
^([ \t]*)(extern\s+)?([A-Za-z_][\w \t\*]*?)\b([A-Za-z_]\w*)\s*\(([^;{]*)\)\s*;
Feed it a return statement and `return` is a perfectly good identifier where a type is expected:
return func_8012CB64((s32)out, -0xC0, 0x40, -0x60, 0);
^^^^^^ captured as the return TYPE, func_8012CB64 as the DECLARED NAME
so the "rewrite this decl to canonical" path REPLACED the statement with
`extern s32 func_8012CB64(s32,s32,s32,s32,s32);`, DELETING the return. In C89 a declaration after a
statement is a parse error, so the damage surfaced as a bare syntax error in the DRAFT -- reading as
the draft's fault, not the tool's. 9 of 9 staged members of family 0x801848dc lost their return.
fix: a keyword guard (a declaration's type-specifier can never begin with a statement keyword)
family_sweep --hseq --band all over 5 families: 0/39 -> 18/39 banked (only the guard changed)
⚠️ AND THE TRAP INSIDE THE FIX: the obvious R33 move is "route it through cdecl". CHECKED, and it is
WRONG -- cdecl.parse() is a DECLARATOR-GRAMMAR parser that assumes it was handed a declaration; it
reports `return func_X(...);` as declaring func_X and `if (f(a));` as declaring `if`.
Statement-vs-declaration is a question cdecl does not answer. Routing there would have been a silent
non-fix that looked principled. §134's law still holds for line-SHAPE masking; this is a different
question.
BLAST RADIUS (measured, not assumed -- R14): cast_call_sites is in gate_stage's DEFAULT pipeline
(canon_resident_calls -> cast_call_sites -> sig_unify -> harvest_verify) and has been since Phase 20.
Of 44,833 stored drafts, 318 (0.7%) carry a `return f(...);` line this mis-reads, across 67 callees
(func_8014F468 x41, func_8014F6F4 x37, func_8014F74C x32, ratan2 x25). Every one, every time it
passed the gate pipeline, lost its return and failed as PLUMBING. Part of the historical plumbing
tail is this bug.
ALSO IN THIS COMMIT
- S5 CALIBRATION WAVE (8 agents, ultracode, 1.31M tokens). Pool VERIFIED FIRST (R14 -- Fable's whale
claim was 3/4 wrong): measured 1,677 clusters / 5,795 fns / 319,755 ins at a 3.68x multiplier vs
its claimed 1,689 / 5,956 / 326,261 at 2.7x -- its numbers hold, and the multiplier is BETTER.
Result: 8/8 match_one MATCH (close=0), and 5/8 banked whole-binary -- the §52b/§61 gap is
integration, not codegen. Banked: func_801822E0 func_8017EC98 func_801851A8 func_80189A34
func_80188E10 (693 ins x1 before propagation). Not banked: func_8018B238 (FAILED),
func_8017EF54 + func_801802EC (NEAR) -- drafts kept in .run/wave-s40/ for recovery.
- 18 member-banks from the re-run sweep (the cross-address free-h_exact pool: h_exact-identical at
DIFFERENT addresses, which dedup_propagate correctly refuses since it assumes position-locking --
family_sweep is the right lane).
- cookbook §143 (this bug + the cdecl trap + the blast radius); index regenerated.
VERIFIED: make clean && make extract-all && make check-all -> 140 passed, 0 failed of 140.
Fleet 12419169 -> 12420375 instr; distinct +1,526 / +5 uniq; fn-count +23. audit-digest OK.
0 NON_MATCHING (G4).
NEW IDIOM FROM THE WAVE, not yet folded into §31 (agent was told to write only its draft): a byte
counter must be spelled `cnt + 0xff`, NOT `cnt - 1`. Both are mod-256 identical and both compile to
one addiu, but gcc-2.7.2 picks the immediate encoding from the SOURCE SPELLING (0xFFFF vs 0x00FF).
Also flagged: .run/ghidra_c/func_8017EF54.c is a stale decompile of the WRONG function.
|
||
|
|
6d684ac650 | docs(phase-30 S39): cookbook §142 — the free h_exact pool; propagate the matched body, don't gate a draft | ||
|
|
e9c66a6720 |
fix(phase-30 S39): close the §134 class — the last two line-shape scanners route through cdecl._mask
§134 had been patched individually in six tools; the standing note said the fix is ONE masking
oracle, not a seventh regex (R33). The last two holdouts are migrated.
progress.py.strip_comments — a private 2-line regex, NOT string-aware, feeding three line-shape
decisions in classify(): the {-vs-; definition/declaration scan, the count('{')-count('}') body
walk, and the empty-vs-real body test. A brace inside a string literal therefore mis-buckets a
function in the FN-COUNT metric. Negative control:
void f(void) { puts("}"); x = 1; }
old regex -> body-depth -1 (the string's brace was counted)
cdecl._mask -> body-depth 0 (correct)
Metrics IDENTICAL before/after on today's corpus (341365/353717; REAL 339510, empty 896, stubs
12345) -- a latent defect, harmless until someone banks a function containing "{".
lint_symbol_refs.strip_comments_strings — correct, but a SECOND implementation of the same
masking. Deleted in favour of cdecl._mask. The one behavioural difference (_mask blanks the quote
DELIMITERS, the private scanner kept them) was CHECKED not assumed: irrelevant because every token
the linter hunts lives outside the quotes. Gated on the linter's OUTPUT being byte-identical across
the change (it is), not on the two masks being byte-identical -- the right gate is the tool's
answer, not its internals.
cookbook §141 + index regenerated. No src/ or config/ change; no bytes touched.
|
||
|
|
1576570271 |
fix(phase-30 S1e): the distinct-code "regression" was a STALE DIGEST — alias lever ungated
The S38 checkpoint gated the phase's best lever ("do NOT scale the alias lever") on
distinct-code falling 89.3 -> 89.2. It never fell.
PROOF (each commit's metric recomputed from its OWN committed tree, 0 unresolved):
commit:1426 TRUE : instr 12394533 distinct 5022306 (77895 uniq)
commit:1426 COMMITTED: instr 12402412 distinct 5029324 (78025 uniq) <- stale
HEAD TRUE == COMMITTED: instr 12405402 distinct 5025082 (77952 uniq)
=> true delta 843->HEAD: instr +10869, distinct +2776 ins / +57 uniq. ALL ROSE.
The 843 digest was generated from a working tree still holding work REVERTED before the
commit landed (+7,879 ins / +130 uniq overstated) and never regenerated, so the next
HONEST digest read as a fall. => THE ALIAS LEVER IS UNGATED (scale it, §61 small batches).
Both recorded leads were wrong (R14): progress.py:423's SIG regex feeds fn-count ONLY
(neither weighted metric sees a C identifier — both derive matched = sig - corpus.stubs),
and "the harvest reverted functions to INCLUDE_ASM" died on one grep (483 removed, 0 added).
The 3-grep proof: identical sigs + unchanged tools/ + zero +INCLUDE_ASM => HEAD's stub set
is a strict subset => both numerators are FORBIDDEN to fall.
THREE INSTRUMENT DEFECTS, all one class (a bare except around a fail-CLOSED oracle):
- progress.py stub_addrs wrapped corpus.stubs in `except Exception: return set()`. An empty
stub set means "could not answer", not "no stubs", so matched = sig - stubs credited EVERY
function. Byte-witnessed: instr 100.00% / distinct 100.00% in a tree with no asm/. Now
propagates.
- cast_call_sites.tu_for + reconcile_tu.tu_for had the identical swallow, falling back to the
default <ov>.c instead of the jr/-O0 split TU — silently reinstating the exact bug
cast_call_sites' own docstring says it exists to fix. A wrong-TU reconcile fails the gate,
and this phase's base rate is ~24k PLUMBING vs 4,917 DIFF, so it presents as a codegen wall.
Now propagate CorpusError; ValueError fallback for curated names preserved; derived-TU path
re-verified (a _jr_ split stub resolves correctly, both tools agree).
NEW GATE (R34 — the byte-gate is a null oracle for DOCUMENTS; check-all stays 140/140 over a
stale digest forever): tools/audit_digest.py + `make audit-digest`, wired into tools-health
after report. Recomputes the three headline metrics from the current tree and fails if the
committed digest disagrees. Compares INTEGERS, not percentages — the +7,879-instruction
staleness printed as "94.4%" on both sides. Negative-control-proven against the stale 843
digest (fails, exit 1) and green on HEAD.
Verified: make report exit 0 (dedup-check 1910 validated / 0 failed, C1 coverage
241216/241216); audit-digest OK; cookbook-index OK (398 sections); metrics unchanged by the
fix (94.40% / 89.18%). No src/ or config/ edits — no bytes touched, nothing banked.
cookbook §140 · decision-log 2026-08-04 · SETUP.md inventory (R21) · R14/R32/R34/R35.
|
||
|
|
e977205bb8 |
docs(cookbook): §139 — a gate that greps for verdicts must assert 1:1 accounting
The wave-6 gate printed BANKED 5 / FAILED 1 over SIXTEEN drafts and nothing said so. Captured with
the three corollaries that outlive the bug (R30 — written in the session that produced them):
(a) the byte-gate is a perfect CORRECTNESS oracle and a NULL COVERAGE oracle (R34 again), so every
wave-level tally is a coverage claim and needs its own assertion;
(b) a pipeline's exit status is the LAST command's — "family_sweep ... | tail" hid a non-zero exit
in this same session; use pipefail/PIPESTATUS or the tail IS the error handler;
(c) a reverted CONFIG needs a re-extract before the next measurement means anything (the Phase-20
R22 corollary; skipping it made three genuinely-banked functions read as failures).
Plus the inverse-lookup trap: a just-banked head LEAVES its family's members list and becomes
exemplar.kind='matched', so a member-list lookup reports "no family" for exactly the heads you just
banked. Distinct from §138 rule 4, which governs target SELECTION.
Index regenerated: 393 sections, 3 new symptom keys.
|
||
|
|
7a4abddbfa |
feat(phase-30 S34): wave 2 — 10 heads + 18 members; the search order had a cross-overlay hole
Fleet 96.24% fn-count / 93.9 -> 94.0% instr / 88.4% distinct. R22 clean-fleet: 140 passed, 0 failed of 140. dedup 1910/0. WAVE 2: 13 targets / 37,943 templatable ins. 19 agents, 4.5M tokens. Claimed 11 MATCH; the whole-binary gate banked 9, +1 on reconcile (func_8017E5D0 via the §37/§124 DEFINITION-side alias — the TU declares it `(void)`, the byte-true def takes a pointer). Reconcile lane now 19/20 lifetime. 18 members swept. THE FINDING (an agent caught a hole in our own procedure). §136c's search order — engine_core.h near-twin -> same-TU banked sibling -> the .s — is entirely SAME-TU or SHARED-HEADER scoped, so no step can reach a banked twin in a DIFFERENT overlay's TU. But the large template classes live cross-overlay by construction. func_80188C04 (328 ins) turned out byte-identical to an already-banked func_801833F0 in ov_SC02_028, and ONE command found it: `grep -rn "E100000A" src/` — a magic word lifted from the target .s. The body was then reused verbatim, only file-local suffixes renamed. Promoted to STEP 0 of §136c, ahead of engine_core.h. That compounds with the manifest finding this session: the family map's `exemplar` is an IN-FAMILY pointer, so a family whose twin is banked elsewhere looks un-cracked — and the pointer can itself name an ALREADY-BANKED instance, hiding the family from any ranking built on it. Derive open sites from corpus.stubs over the member list instead. Measured on this wave: ranking off the map's exemplar gave 16,696 templatable ins; deriving from corpus.stubs gave 41,023, including a 55-ins family open in 138 overlays and a 46-ins one in 133. HONEST ON THE SWEEP: those two big families templated 18/165. That is the known h_seq refusal ceiling, not a new wall. One agent reported "all 10 members distance 0" — that is NORMALIZED distance, not h_exact, which is why dedup_propagate correctly answered reach<2. Do not read a normalized-distance claim as an h_exact guarantee. LEDGERED (real residual, not paperwork): func_8017F7B4 — needed its sibling's type names AND a data asm-label alias for a u8-shaped symbol, and still refuses. Plus func_8017C294 (DIFF close=12: 4 register/schedule permutations + a frame where I can get the 0x138 size OR pEnd's slot at 0x108, not both) and func_801898E4. |
||
|
|
138e21c7d4 |
feat(phase-30 S33e): both gate-refused drafts reconciled — the lane is 18/18 lifetime
Fleet 96.23 -> 96.24% fn-count / 93.9% instr / 88.3 -> 88.4% distinct. R22 clean-fleet: 140 passed, 0 failed of 140. dedup 1910/0. func_8017D318 (184 ins) + func_80181EE0 (198 ins) both banked, + 6 members swept (6 per-overlay variants failed — ledger material, not a lever). THE RECONCILE DIRECTION DEPENDS ON WHERE THE TU'S DECL IS, and picking wrong CREATES the next error (-> cookbook §138): - decl ABOVE the splice point -> DELETE the draft's duplicate (§100). func_8017D318: the TU defines MATRIX_/SVECTOR_8017C290, D_801EA8C0 AND a `struct PW8017C290` tag above it; I missed the tag on the first pass, so it took two rounds. - decl BELOW the splice point -> KEEP a decl in the TU's EXACT shape and cast at the use (§17a-1 D2). func_80181EE0: I removed its decl assuming the TU provided one; the TU's `extern int func_80143C74(short *, int);` is at L5082, ~180 lines BELOW the splice at 4901, so the identifier went undeclared. Grep the TU for the symbol and compare line numbers with the stub line first. MY OWN §136a VIOLATION, recorded: the blocker-capture filtered the build log for `error|conflicting|undefined reference` and reported "NO COMPILE ERROR" on a build that was failing with `redefinition of struct PW8017C290` and `'func_80143C74' undeclared` — neither phrase matched. A narrow keyword filter is exactly how a real error goes unseen, which is the thing §136a exists to say. Widened to keep any line naming a source position. |
||
|
|
b497ee1649 |
feat(phase-30 S33c): PROPAGATE head COMPLETE — func_801466F0 x137 took three fixes + a type-lift
Fleet 96.17 -> 96.21% fn-count / 93.8% instr / 88.0% distinct; dedup 1909 -> 1910
groups, 0 failed, C1 241216/241216. R22 clean-fleet: 140 passed, 0 failed of 140.
The head is now 5/5 classes, 18,545 templatable ins, all banked this session from
a standing start of 0.
func_801466F0 had sat since S6b behind THREE separate blockers, each of which
looked sufficient on its own to explain the failure:
1. Its definition is under a §37/§73 ASM-LABEL ALIAS (`aF801466F0` in C, bound to
the real symbol by `__asm__`), and dedup_propagate.find_site anchored its head
regex on the literal `func_<ADDR>` — structurally blind to the form, returning
None, which every caller reads as "not matched". Now reuses
family_remap._alias_decl_for rather than growing a second matcher (R33).
2. That matcher was itself blind to the WRAPPED (multi-line) declaration — the
§134 shape, third tool. Fixed by matching over the joined text and mapping the
offset back to the decl's FIRST line (extract_unit carries from there).
Regression control: the single-line form still resolves. Fleet census after:
2,768 of 2,768 alias sites resolve, 0 missed.
3. Its record type was a draft-local typedef, so the body failed
compiles_standalone. Lifted Rec801466F0 to src/shared/engine_types.h INSIDE
the include guard (the SESSION-19 double-include note) and switched both the
macro and the exemplar to it — byte-neutral, gate-proven.
Probed on ONE member before the fleet run: byte-identical 9052dc0e first try.
MEASURED, NOT INHERITED (R37): the S6b note frames the alias-regex gap as a CLASS
of missed work. It is ONE function — 91 distinct alias decls fleet-wide, the
per-line matcher resolved 90. Recording it so a future session does not scope a
phase against a class that does not exist.
cookbook §138 extended with the alias-form tool boundary and the three-blocker
story; index regenerated.
|
||
|
|
4f6b0e8de1 |
feat(phase-30 S33b): PROPAGATE head 82% banked — 15,257 of 18,545 ins, four levers
Fleet 96.10 -> 96.17% fn-count / 93.7 -> 93.8% instr / 88.0% distinct.
dedup 1908 -> 1909 groups, 0 failed, C1 241078/241078.
R22 clean-fleet: 140 passed, 0 failed of 140.
func_80147364 4,110 x137 definition-side asm-label alias
func_8016BA68 3,886 x134 dedup_extend + the MIRROR decl relax
func_8012F274 3,973 x136 hand-authored macro, source overlay excluded
func_8012A598 3,288 x138 cdecl._mask backscan fix + shared-type switch
func_801466F0 3,288 OPEN the wrapped-alias regex — measured as ONE function
THREE DISTINCT CARRY VARIANTS were hiding in one "CARRY-FIXABLE" bucket, and
only one is a tool bug (-> cookbook §138):
- a MULTI-LINE comment halts the preamble backscan -> fix the tool (cdecl._mask)
- a draft-local `struct Tag {…}` -> switch the exemplar to the SHARED type
- a file-scope `static inline` helper -> hand-author, EXCLUDE the source overlay
The third is the sneakiest: gcc-2.7.2 accepts implicit function declarations, so
the extracted body PASSED compiles_standalone with the helper undeclared and the
miss surfaced only as a whole-binary byte DIFF 137 gates later. Instantiating
that macro in the SOURCE overlay is a duplicate definition (its file-scope helper
is still there), so the shape is `--source-overlay X --binaries <all-but-X>`;
`--binaries` alone removes the source from the scan pool and errors.
TOOL BOUNDARY: once a group's members are DEFINE_func_*() sites, dedup_propagate
cannot extend it (find_site never returns a `def`). dedup_extend is the tool for
an already-macro-ized group — and `dedup_extend --check-only` across ordinary
overlays is a cheap fleet-wide wiring census (measured: exactly 1 group per
overlay, so no hidden backlog).
MEASURED, NOT INHERITED (R37): the S6b note frames _alias_decl_for's single-line
regex as a CLASS of missed work. It is not — 91 asm-label alias decls exist
fleet-wide, the regex matches 90, and the single miss is func_801466F0. Worth
3,288 ins, but a one-function fix. Correcting the expectation so a future session
does not scope against it.
|
||
|
|
356373efab |
fix(phase-30 S33b): the PAIR rule — my 42-decl relax did NOT unblock the lane; the mirror form did
HONEST CORRECTION to commit:1382. That commit's message implies the 42 `(void)` relaxes unblocked the PROPAGATE remainder. They did NOT: the re-run banked 0/1 in all 134 overlays with the same error, because DEFINE_func_8016BA68 declares func_80146C3C `(u8*)` — the MIRROR of the EXTEND-lane pair — and my relax only touched the `(void)` direction. Root cause is the R37 shape a third time: I bucketed by SYMBOL and stopped. The lever is set by the (macro-shape, TU-shape) PAIR, and the same symbol conflicts in BOTH directions across this fleet. One awk over the macro I was ACTUALLY fixing — which I ran for the EXTEND macros and not for this one — shows the pair before a 134-build run. §138 amended with the PAIR rule; correction logged in CURRENT_PHASE.md rather than rewritten out of history. The 42-decl relax still stands: byte-neutral, R22 140/140, removes a real conflict class. It just did not do what I predicted. THIS commit relaxes the 2 remaining `(u8*)` decls (uses are cast; `()` is compatible with the (void)/()/(u8*) forms the fleet carries and no decl of this symbol has a default-promotion param). R22 clean-fleet: 140 passed, 0 failed. ALSO: tools/overlay_src_split.py `_split_macro_body` — the §134 sweep's one real target, fixed. It carried the identical single-line-only comment test, and it decides where a macro body's file-scope externs END, so a multi-line comment truncated the extern set. SIZED FIRST: 38 live lines in engine_core.h macro bodies hit it today. Now decides on cdecl._mask (one oracle, R33) with the length-preservation invariant asserted (R32). Proven both directions by a control: pre-fix it stopped at `/* multi` carrying 1 of 2 externs and treated the comment as the definition head; post-fix both externs carry and the def head is correct. Not in the gate path (only o0_subsplit + jr_isolate_all import it). |
||
|
|
3daa647bb3 |
docs(phase-30 S11): cookbook §138 + SESSION-33 checkpoint
§138 — "the propagation lanes: a gate refusal is a DECLARATION, and which lever you owe depends on blast radius". The durable content of this session: - the 4-lever triage table ranked by blast radius, and the rule to grep the fleet's decl shapes BEFORE relaxing to `()` (illegal only against a default-promotion param — 4,020 decls measured, 8 of 36 banked for one token) - `volatile` in the host TU is a SCHEDULING BARRIER that masquerades as a codegen wall; the tell is a positional shift with a `nop` at a delay slot, and the h_exact contract is confirmed/refuted in ONE command with no build - the DEFINITION-side asm-label alias as the only zero-radius escape when the fleet canon disagrees on a promoting param (1,725 in-tree precedents) - rank a lane by measured concentration, not class count (5 of 45 classes carried 89%), and `--recover` is not a retry (16/16 on drafts, 4/138 on a propagation) - §134 multi-line blindness recurring in a second tool; decide on `cdecl._mask` - the waiter rule CORRECTED: `pgrep -x make` is wrong for a campaign of sequential makes, `pgrep -f` self-matches, `nohup … &` signals the wrapper Checkpoint refreshed and placed below the task checklist (fresh-session safe): fleet 96.10 / 93.7 / 88.0, dedup 1908/0, R22 140/140 four times this session, nothing running, lock free. Three named next items, none yet diagnosed against a build — the PROPAGATE head remainder (11,147 ins), the 41-class tail (2,316), and EXTEND's last 5 (the whale needs the §38 -O0 route; dedup_extend should refuse-and-name that class per R32). |
||
|
|
a4bc49a23d |
feat(phase-30 S8): the x10-99 band closes 23/23; §137 makes REGALLOC-PERM arithmetic, not a permuter job
- S8-3 (23 fresh x10-99 families, 121-328 ins — the hardest band this session): draft 16/23 ->
capture (1 PLUMBING / 6 DIFF) -> reconcile 1/1 -> redraft 6/6 => **23/23 (100%)**.
Propagated 206 + 81 = 287 member-matches across 80+54 overlays. R22 clean-fleet 140/140.
FLEET 95.97% fn / 93.4% instr / 87.5% distinct (77,404 uniq); dedup 1905/0; 0 NON_MATCHING.
- §136b CLOSES AT 15/15 — no function ledgered "genuine byte-DIFF" survived a redraft, all session.
- §137 (NEW, the session's most reusable result): REGALLOC-PERM — a clean 2-register swap — is a
TWO-COMPILE ARITHMETIC PROBLEM. global.c:allocno_compare ranks by floor_log2(R)*R/L*1e4*size;
read R and L out of `cc1 -dl -dg` for BOTH contenders AND their ranked neighbours to get the
admissible priority WINDOW, then place a zero-byte `__asm__ __volatile__("" ::"r"(v))` so L lands
inside it. func_801833F0: contenders ONE unit apart (1297 vs 1296), window (1228,1296), five
placements probed, only L=219 -> pri 1232 worked. R and L are FORCED BY THE EMITTED CODE (L is
recomputed post-sched1), which is exactly why source-reordering is a dead end for this class.
Converts a class the permuter banked 0 from all session into a deterministic calculation.
Companion: floor_log2 makes ref-count a STEP function (5/6/7 refs are worthless, you must reach 8)
— func_8017EFA8 closed 30 register-name mismatches by taking a pseudo 4 refs -> 8 with a dead read.
- §136j — the failure MIX FLIPS WITH SIZE: <=120 ins fails ~70% on declarations; 121-328 ins fails
86% on genuine codegen. Budget reconcile for the small band, redraft for the big one — and do NOT
read 70% on a big-function wave as a broken pipeline; that is the expected shape.
- §137a — a gate verdict has a TIMESTAMP. Two "DIFF" ledger entries were STALE (draft rewritten 28
min after the gate ran, never re-gated); both were already byte-perfect. Compare verdict time to
draft mtime before redrafting. Plus two offline oracles an agent built: a FULL RELOCATION RESOLVE
(catches wrong jal/%hi/%lo targets that match_one's mask hides) and a COLLATERAL CHECK (whole-TU
objdump with/without splice). Together they discriminate all three causes of "match_one says MATCH
but the overlay SHA differs" without running make.
- §136f addendum — the collider is often an already-banked SIBLING BELOW the splice; locate it by
arithmetic (draft grows the file N lines, so TU line L reports at L+N).
- cookbook-index 380 -> 382 sections.
|
||
|
|
18fc50d0f8 |
docs(phase-30): §136i — insert SONNET between Haiku and Opus in the drafter ladder (Drew 2026-08-03)
- MEASURED BASIS (P30 S7, 144-target campaign): the two-tier rule from the 2026-06-29 A/B left the ~50-120-ins band unassigned, and every wave since defaulted it to Haiku-with-Opus-escalation. Haiku-direct banked 3/8 on that band while Opus-escalation-after-a-Haiku-miss banked 10/11 — i.e. Haiku was acting as EXPENSIVE TRIAGE (a wasted draft + a full Opus redraft), not a cheap drafter. The original A/B only proved parity <=52 ins; everything above that was extrapolation. - LADDER: haiku <=~50 ins · SONNET ~50-120 · opus >=~120 or escalation · fable5 for a genuinely NEW wall class only. Never haiku->opus directly; never default a whole wave to opus because the band "looks hard" (the same extrapolation in the other direction). - WIRED, not just documented: s7_manifest.py routes by the new thresholds; s7_wave4b.js escalates haiku->sonnet->opus instead of haiku->opus, and its meta/prose say so. - Boundaries (~50/~120) are current best estimates — re-measure per-tier from the journal + the gate, never from the workflow's by_tier (it counts claims, not banks — §136). - Byte-gate remains the sole arbiter, so a weaker drafter is a throughput risk, never a correctness risk (G3/P9). cookbook-index 378 -> 379. |
||
|
|
e8a57b13fa | docs(phase-30 S8): CORRECTION §136h — the zero-crack pool is residue, not a lever (1 bank / 1,781); my R37 violation | ||
|
|
1b8f26113c |
feat(phase-30 S7): close the B-shape queue — 144/144 drafts banked; §136b closes 9/9
- FINAL LANES: reconcile ×5 (5/5) + redraft ×1 (1/1) -> gate BANKED 6/6 -> propagated 50 members across 28 overlays. **ALL 144 DRAFTED TARGETS BANKED (100%); zero stubs remain in the queue.** R22 clean-fleet 140/140 (seventh time this session). FLEET 95.88% fn / 92.9% instr / 86.5% distinct (77,106 unique fns); dedup 1905/0; 0 NON_MATCHING. - LANE RECORDS: reconcile 15/15 lifetime · redraft 9/9 · §136b closes at 9 FOR 9 (every function ever ledgered "genuine byte-DIFF" banked on redraft). - THE CAPTURE CLASSIFIER, third and final defect (§136a): it decided PLUMBING by matching a regex against cc1's PROSE, and cc1's vocabulary is open-ended — `too many arguments to function` matched nothing, so a trivially reconcilable function sat UNKNOWN through two gate rounds. Now DERIVES the class from the closed invariant (did the compile produce an object: `make ... Error N` + `Deleting file`). Re-running it moved 5 PLUMBING / 1 UNKNOWN -> 5 PLUMBING / 1 DIFF, and BOTH reclassified functions then banked. Three defects in one small tool in one session — an unreachable exit-status branch, a missed phrasing, and the prose-matching design behind both — each SILENTLY MIS-ROUTING REAL WORK. R33 in one line: if an invariant answers it, never re-parse. - §136f — two declaration sub-cases: (1) a symbol you call may be DEFINED, not just declared, BELOW your splice point (func_8017D540 is defined 275 lines below as int(int); the draft guessed void(s32) from a bare jal); (2) an ARITY clash on the symbol you are DEFINING cannot be fixed by a cast — use the §37/§124 asm-label alias (func_801848DC; in-TU precedent at :8872). - §136g — TWO INDEX ROUTINGS BYTE-REFUTED (func_801863B4). The index sends BRANCH-POLARITY to §3-T4 (invert) and §34 (zero-byte fence); the agent tested BOTH at zero, read the gcc-2.7.2 source, and found jump.c:1806 `if (foo) bar; else break` range-swap — which runs long BEFORE reorg, so a fence CANNOT block it. Real lever: put a label between the if-join and the return label (wrap the loop in the guard). Also: same-address lh+lhu is MIPS LOAD_EXTEND_OP==ZERO_EXTEND (mips.h:1163), and combine collapses the pair unless the HImode pseudo has two reaching defs. REFUTED ROUTINGS ARE RECORDED NEXT TO THE CORRECT ONE — otherwise the next agent re-runs them. - cookbook-index 375 -> 377 sections (§136 .. §136g earned this session). |
||
|
|
b61d805b8b |
feat(phase-30 S7): wave 4b batch 3 — 35 heads + 305 members; the 144-family B-shape queue is worked
- BATCH 3 (37 targets, 41 agents, 2.75M tok -> 35 claimed): gate BANKED 35; family_sweep propagated
305 member-matches / 39 failed across 77 overlays (14 STRUCT skipped by design). 340 instances.
R22 clean-fleet 140/140 (sixth time this session).
FLEET 95.86% fn / 92.9% instr / 86.5% distinct (77,061 unique fns); dedup 1905/0; 0 NON_MATCHING.
- WAVE 4b COMPLETE: b1 32/37 + b2 35/37 + b3 35/37; with wave 4a (30/33) the whole 144-family
B-shape queue that opened this session is worked through — 138 of 144 drafts banked (96%).
- §136e — batch 3's two HONEST NEGATIVES, worth as much as the wins:
(1) §136c SIBLING-FIRST HAS A PRECONDITION. func_801899AC's family has all 13 members still
unmatched and no engine_core.h twin, so there IS no byte-verified sibling and the search is
pure cost. Check a banked sibling EXISTS before spending the greps.
(2) A loop increment in the loop-back DELAY SLOT + a compensating negative addiu is a SOURCE
SHAPE, not a reorg artefact — MIPS1 has no annulling, so reorg CANNOT invent the
compensation. Write `p += 2; if (t == cur) break; ... p -= 2;`. combine's reg_n_sets==1 guard
stops the addiu folding into the following lw. The index's delay-slot entries point at reorg,
which is a dead end for this class.
Plus a new §136-L1 application on the RETURN axis (an over-scoped temp became a global allocno and
swapped $v0/$v1 with the returned local, collapsing the target's `j` + `addu` return).
- COMPOSITION, demonstrated on func_8017D5F4 (46 ins): flat early-returns -> dead-local frame pad ->
s16 locals -> operand order -> 3 register pins -> 2 zero-byte re-ties -> permuter for the last 2.
THE PERMUTER IS THE LAST STEP ON AN ALREADY-PINNED BASE, not the first.
- cookbook-index 374 -> 375 sections. 6 stubs remain; per §136b none is a wall on one attempt.
|
||
|
|
7f70b6850a |
feat(phase-30 S7): batch 2 + reconcile + redraft — 41 heads + 431 members; §136b closes 8/8
- THREE LANES: wave 4b batch 2 (37 targets, 46 agents, 3.44M tok -> 35 claimed) + the reconcile lane
on 3 PLUMBING failures (3/3) + a REDRAFT lane on 4 DIFF-ledgered failures (4/4). Combined gate
BANKED 41; family_sweep propagated 431 member-matches / 29 failed across 79 overlays.
103 of 107 drafts banked (96%). R22 clean-fleet 140/140 (fifth time this session).
FLEET 95.77% fn / 92.9% instr / 86.4% distinct (76,824 unique fns); dedup 1905/0; 0 NON_MATCHING.
- §136b CLOSES AT 8/8: every function ledgered "genuine byte-DIFF" banked on redraft — wave 3's
four, the THREE I classified from wave 4a's capture, and one from batch 1. The classifier is
right about what it measures ("this draft compiles clean and differs in bytes"); reading that as
"this function resists matching" is the error. A DIFF verdict is a fact about ONE DRAFT.
- §136a CORRECTED (a reconcile agent refuted me against the bytes): I wrote "70% of gate refusals
are paperwork, not codegen". WRONG. A declaration conflict ABORTS THE COMPILE, so a PLUMBING
verdict says NOTHING about the body. Two of three second-round PLUMBING drafts had a real codegen
residual behind the conflict (func_80188694 DIFF/4 SCHEDULE-REORDER, closed with a §21 zero-byte
re-tie after six other variants failed; func_8018C638 DIFF/6 ADDRESSING/cse). Both agents ran
match_one on the untouched draft FIRST and rejected my premise — which is what §135 asks for.
- §136c SIBLING-FIRST IS A DERIVATION SHORTCUT, not just a conflict fix: grep engine_core.h's
DEFINE_func_* bodies for a byte-verified NEAR-TWIN before deriving from the .s. func_801859D8
found DEFINE_func_80185978 (identical offset chain, 3 differing constants), reused its expression
forms verbatim -> FIRST-DRAFT MATCH, and the twin generalizes to its whole 10-member family.
Search order: near-twin -> banked same-TU sibling -> the .s -> the Ghidra seed LAST (byte-proven
an entirely different body twice this session).
- §136d, four new gcc-2.7.2 levers from the redraft lane, each with its REFUTED axis recorded:
RC-12 $0-add opaque copy (cse.c canonical-copy promotion; do NOT pin the pair to real regs);
jump.c if-then-else -> conditional-overwrite collapse (defeat with TWO SEPARATE CALLS, not a
ternary); fix the STORE not the load for a load hoisted above a constant-address store (the
INDIRECT_REF reshape is the wrong half of the /s lattice, 2 -> 32 mismatched); a branchless flag
is -(a != b) & 0xFF, never a ternary.
- cookbook-index 372 -> 374 sections. Batch 3 staged with all of the above promoted into its prompt.
|
||
|
|
cc3c49d7af |
feat(phase-30 S7): wave 4b batch 1 — 32 heads + 365 members; §136b (a DIFF verdict is not evidence)
- WAVE 4b BATCH 1 (37 volume-lane targets, 10-19 members, <=60 ins; wave 4a's §136 idioms promoted
into the drafting prompt per the measured 83%->93% law): 50 agents / 4.35M tokens / 32 min ->
34 claimed MATCH -> gate BANKED 32 -> family_sweep propagated 365 member-matches / 4 failed
across 84 overlays (3 STRUCT skipped by design). 397 function-instances from 37 targets.
- §136b — THE FINDING THAT CHANGES THE BACKLOG: all FOUR functions wave 3 ledgered as "genuine
byte-DIFF" BANKED on redraft. The recorded causes were never codegen:
func_801845B0 a branch to the EPILOGUE misread as an inner early-exit -> the whole tail was
hoisted out of its enclosing if (control-flow misread)
func_80184A94 a declaration conflict on a symbol declared BELOW the splice point; closed by
copying an already-banked family sibling's decl forms verbatim (§71)
func_8017BEBC the cached Ghidra seed was an ENTIRELY DIFFERENT body and the prior draft
followed it; the .s was the only usable source
func_8018480C re-derived clean
=> a DIFF verdict describes THE DRAFT THAT WAS ATTEMPTED, never the function's matchability.
Never retire a target on one; route it to REDRAFT. And re-GATING an unchanged draft is not a
retry — which is exactly why wave 4a's 3 DIFFs stayed stubs through this gate (same bytes
resubmitted); they still owe an actual redraft and are now likely winnable.
Corollary: backlog entries carrying an old closeness/class are stale by construction (P29
measured 77% of stored drafts decayed) — re-verify before valuing one.
- The wave-4b prompt handed each retry its prior verdict EXPLICITLY LABELLED "a data point, not a
verdict — re-derive from the .s". Every retry agent did exactly that and refuted it.
- R22 clean-fleet 140/140 (fourth time this session). FLEET 95.63% fn / 92.8% instr / 86.3% distinct
(76,499 unique fns); dedup 1905/0; C1 240496/240496; 0 NON_MATCHING (G4).
- Orchestration: this batch's workflow script was GENERATED from the manifest files rather than
hand-pasted — transcription had already cost this session one dead launch (args-as-string) and
cost the prior session three agents' time (hand-typed _jr_* paths). Generate the artifact; do not
ask yourself to be careful. cookbook-index 371 -> 372 sections.
|
||
|
|
fdb5813fc1 |
docs(phase-30 S7): S6c banked ×12 (all in the P27 SC07 quartet); blockers classified 7/3; §136a
- S6c (deterministic, ~0 agent tokens): 12 sibling banks across 3 of 9 jr zero-crack families (func_80178D40 890ins 4/4, func_801734BC 4/4, func_8012ACE0 4/4). The other 6 are ledgered: 5 gate-fail (genuine byte DIFF) + 1 carve-fail (span table starts do not fit the span). R22 clean-fleet 140/140 over the whole S6c series. - FINDING: all 12 banks landed in ov_SC07_006/007/010/011 — the four overlays P27 discovered and P28 made citizens (R36). P28 drained their h_exact backlog via dedup_extend; the jr/h_seq propagation lane was still owed. R14 GUARD AGAINST OVER-READING IT: the quartet are the top four overlays by remaining zero-crack residue (2,190-2,355 ins each vs 500-870 typical) but hold only 7% of the 2,114 remaining slots — a per-overlay priority signal, NOT a bulk lever. - BLOCKER CAPTURE for the 10 wave-4a gate failures -> .run/s7_blockers.json: 7 PLUMBING (all `conflicting types for func_X`) / 3 genuine byte-DIFF. 70% of "the gate refused" is declaration paperwork. New tool .run/s7_capture.py (any overlay/any draft dir; reverts the TU in a finally:). - MY DEFECT, FIXED AND DISTILLED (§136a): the capture tool first classified on the EXIT STATUS, so its `rc == 0 => byte DIFF` branch was UNREACHABLE — `make build` runs `check`, so a draft that compiles perfectly and merely differs in bytes also exits non-zero, and all 3 real DIFFs were filed as "unknown". Now classifies on the OUTPUT ([FAIL]/got/want vs a non-warning error line); the warning-exclusion matters because `conflicting types` also appears benignly for builtins. - Also probe-discipline: my first S6c probe reported 1/9, which was 1 bank + 8 CORRECT REFUSALS — jtbl_family_bank refuses on a dirty config/+src/ (its per-sibling revert restores from HEAD). Driver now commits between families. A uniform failure across N functions is a statement about the mechanism, not the functions (§134). - cookbook-index 364 -> 371 sections, --check green. CURRENT_PHASE SESSION-31 checkpoint refreshed with the queue re-derived at HEAD (the S30 ROI-floor trigger stays REFUTED — do not close on it). |
||
|
|
09d96b1531 |
feat(phase-30 S7): wave 4a — 23 heads + 251 members banked ×N; cookbook §136 (the local-variable lever)
- WAVE 4a (T6, the 33 high-value B-shape families, 61-120 ins / >=10 members):
33 targets, 46 agents, 4.44M tokens, 29 min -> 29 claimed match_one MATCH.
Whole-binary gate BANKED 23/33 (70%); family_sweep --hseq --band all propagated
251 member-matches across 69 overlays (13 failed, 4 STRUCT skipped by design).
Total 274 function-instances from 33 drafted targets.
- R22 clean-fleet: make clean + extract-all + check-all -> 140 passed, 0 failed of 140.
make report: fn-count 95.49% / instr 92.6% / distinct 85.9% (76,180 unique fns);
dedup 1905 validated / 0 failed; 0 NON_MATCHING in any default build (G4).
- COOKBOOK §136 (R30, distilled in-session from 25 banked functions' index-gap reports):
the wave's finding is that in the 60-120-ins band most "regalloc residuals" are decided
by HOW MANY C LOCALS AND AT WHAT SCOPE, not by register pins (local-alloc.c:472 promotes
any pseudo with REG_N_DEATHS>1 to a global allocno). 19 byte-verified idioms: 6 splitting/
merging rules, 6 type-form rules, 5 scheduling rules refining §135-2/§135-4, 2 declaration-
surface rules. One case explicitly REFUTES the pin as the lever for a redundant copy.
cookbook-index regenerated 364 -> 370 sections, --check green.
- TWO SELF-CORRECTIONS (R37/R14), both caught before they could mislead sizing:
(1) I wrote the tier split from the workflow's by_tier, which counts CLAIMED matches (29)
not banks (23). Derived per-function: Opus-direct 10/14, Haiku-direct 3/8, Opus
escalation-after-Haiku-miss 10/11. The operative number is the 10-of-11 rescue rate;
on this band Haiku is triage, not a substitute (it is == Opus only at <=50 ins).
(2) The gate printed "1/1 banked FAILED: func_X" on single-draft groups (the known
double-list artifact) -> bank set DERIVED from corpus.stubs instead. Totals agreed.
- TOOLING: the wave scripts now parse args-as-string and assert Array.isArray, so the
roadmap's standing "args must be an array" gotcha cannot silently kill a future wave
(it killed wave 4a's first launch in 60ms with 0 agents).
- tools-health green + fail-closed before matching (corpus+resident 0 PHANTOM/0 TRUNCATED,
audit-binaries 140/140 citizens, cdecl, report/lint/dedup).
|
||
|
|
bfbcb86b3d |
docs(cookbook §135): six byte-verified gcc-2.7.2 idioms + the two-lane wave shape (P30 S6f-h)
Distilled from ~100 agent-drafted functions gated whole-binary across three waves; each idiom CLOSED a specific residual, none is a hypothesis. CODEGEN: 1. UNSIGNED switch index => pure equality chain — for an unsigned index the case-0 leaf satisfies node_has_low_bound (0==TYPE_MIN) so emit_case_nodes drops the range test entirely. 2. ARRAY_REF vs INDIRECT_REF changes ALIASING hence SCHEDULING — a[i] sets MEM_IN_STRUCT_P and true_dependence() drops the dependence vs a constant-address store, so the load hoists. A '4-ins scheduling residual' that is really a type-form choice. 3. A constant store with the top bit set in the STORED width needs an UNSIGNED destination (u16 -> ori via force_fit_type; s16 -> sign-extended fold -> addiu). 4. The list scheduler PRESERVES relative order of disambiguable stores — a store written late SINKS. Move it earlier in SOURCE. Closed 9 mismatches with no permuter. 5. A short loop counter blocks strength reduction on array indexing; the original walked pointers. 6. Frame size off by a constant => DEAD LOCALS (every diff is an sp displacement of one delta). INTEGRATION (what decides whether a byte-correct draft BANKS): 7. match_one MATCH != a bank (83%/93%/71%->89% survived the gate across the three waves). 8. cc1 reports only the FIRST conflict — grep the whole TU for every symbol in one pass (one draft had SIX bad prototypes, two BELOW the splice point). 9. An INTERIOR address has no symbol (D_801DA0F0 is +0x6C into D_801DA084) -> undefined reference at LINK, not a compile error. 10. Never redeclare a C-library name (one TU declares memcpy THREE times, incompatibly). WAVE SHAPE: two lanes; the reconcile lane is 12/12 across two waves because the orchestrator captures the compiler error BEFORE the fan-out. Promote wave-N's Opus discoveries into wave-N+1's cheap-tier prompt (83->93%). Paste args from a DERIVED manifest. If N reconcile targets share ONE TU, forbid agent builds. An agent that rejects your premise is working correctly. |
||
|
|
39558b2991 |
fix(phase-30 S6b): MULTI-LINE BLINDNESS in family_remap — 4 faces, 3 fixed; +740 members (R22 140/140)
- ONE root cause, four faces (cookbook §134): extract_unit's preamble scanner reads C
one line at a time, so every construct that WRAPS was misread.
D1 the {-guard fired on a documentation comment mentioning a brace -> carry truncated
mid-comment -> `parse error before 'the'`.
D2 _def_head_at's "param list continues -> ANSI definition" fallback accepted a WRAPPED
DECLARATION as a definition head -> a 16-line fragment with no body, closed by a brace
pair inside a comment -> a silent 0/137 that reads exactly like a compiler wall.
D5 the backscan met a multi-line typedef's CLOSING line `} T;` first and stopped -> the
type never travelled -> `T undeclared` across 17 families / 24,332 templatable ins.
(The code comment claimed they "route through the engine_types.h lift"; measured, they
routed nowhere.)
D4 wrapped __asm__("func_...") alias invisible to a single-line regex — MEASURED (1 exemplar,
3,288 ins, second blocker behind it) and deliberately NOT fixed; it now returns None so the
sweep reports a VISIBLE skip instead of 137 silent failures (R32).
- Fixes: _def_head_at(ln, idx, more=()) lookahead (no-lookahead keeps the historical answer);
{-guard exempts comment-only lines + an R32 dangling-comment backstop; forward brace scan
counts over cdecl._mask (R33, one masking oracle); _typedef_block_start carries whole blocks.
- BLAST RADIUS (R14): extract_unit diffed vs the pre-fix tool over all 181 zero-crack exemplars
-> 157 byte-IDENTICAL, 24 changed, all in the intended direction.
- PAYOFF: D1+D2 +323 members from families that banked ZERO; D5 +417 incl. func_8012B77C 139/139
(8,062 ins) and func_80128C98 137/275. S6 total 1,582 members (pre-fix tool scored 842).
- R22 clean-fleet 140/140. Fleet 94.43->94.88% fn-count, 91.4->91.9% instr, 84.0->84.6% distinct.
- TELL worth keeping (§134): bimodal bank rates (57 all / 52 zero / 8 partial) are a TOOLING
signature, not codegen. Probe one member and read one compiler error before writing a family off.
|
||
|
|
1a1463b1c6 |
feat(phase-30 UC): wave-1 propagation — 1,370 member instances, fleet 90.9% instr (R22 140/140)
- 9 banked heads propagated: 1,096 non-jr member-matches (family_sweep --hseq --band all, 0 failed) + 137 (func_80159A20, jr) + 137 (func_801549F8, jr) - func_80176734 (371 ins, the largest single item in the frontier) banked + propagated - FLEET 93.81% fn / 90.9% instr / 83.9% distinct; dedup 1905/0; 0 NON_MATCHING (G4) - cookbook §132b (--span-rel: the already-matched owner that is ITSELF multi-switch) and §133 (the DEFAULT-FILTER class — three times in one session a tool silently answered a narrower question than the one asked: my own >=80-ins cut, worklist's h_exact pricing, --band substantial) |
||
|
|
fc307418a5 |
docs(phase-30): the jr-pair sweep landed 137/137 ×2 — §132a --like over-transfer + fleet 89.6% instr
- 2 × 138 = 276 function-instances banked (exemplar + 137 siblings each); the -O0 cluster is now COMPLETE fleet-wide (these were the last open stubs in every overlay's _o0* region) - §132a: --like matches by subseg ROLE NAME; ov_SC07_010 shares the exemplar's _o0 role (the only other overlay so named — the other 136 are _o0c, whose role never matched, which is the only reason the sweep worked at all). Six derived starts for three emitted tables; guard shipped. - R22 clean-fleet 140/140. Fleet 93.33% fn-count / 89.6% instr / 81.6% distinct (+260 unique fns); dedup 1905/0; 0 NON_MATCHING (G4). Phase arc: 92.00->93.33 / 87.5->89.6 / 78.0->81.6. |
||
|
|
b9efe66f91 |
fix(phase-30): the JR-PAIR "wall" was TWO instrument defects — pair banked, class retired
S28 ledgered `JR-PAIR-IN-ONE-O0-OBJECT` (two jr fns matched in one -O0 object => a clean build that cannot link: `undefined reference to $L105` + `func_8013C938`) with §81 step 1 (isolate one into its own code subseg) as the untested escape. BOTH the class and the escape are REFUTED — no isolation, no compiler wall, both fns banked from a genuinely clean fleet. The 4th consecutive "structural wall" to resolve to our own tooling (§124/§125/§126/§131). - DEFECT 1 (tools/jtbl_carve.py): ov_SC01_077_o0's carve at 0xb01a4 predates the §8e `tables=` persistence and is a MERGED DOUBLE (func_8013C0F8 $L75 + func_8013C414 $L105); the 2nd owner is MATCHED so extract pruned the stub .s naming its table. The single-table- predecessor inference derived 3 starts where the object emits 4 tables -> JTBL_PADS 0,4,4 -> jtbl_rodata_pads refused mid-stream, correctly. FIX: R32 coverage assertion + payload recovery at the single choke point (spec_from_starts) — every zero word inside a span is an original `.align 3` pad (the tool's own axiom), so the word after it STARTS a table; recovered starts are logged. No-op where structure is known (the 134 sibling _o0c spans carry tables=+0x0,+0x70). Honest limit: tight (0-pad) boundaries stay unrecoverable but fail LOUD via the filter's count guard — never silent. - DEFECT 2 (Makefile): no .DELETE_ON_ERROR, so `as` (a pipeline consumer) left a TRUNCATED .o on disk — 12 of 16 T func_, undefined $L57/$L59/$L63/$L75/$L76 — newer than its .c, and the NEXT build linked the corpse. That IS the S28 link error, one build downstream of a loud, correct compile error. Negative-control-proven on a scratch invocation. - BANKED: func_8013B83C (272 ins) + func_8013BD74 (198 ins) in ov_SC01_077 (d19c9580). Byte proof: 4 tables 0x801D8254/828C/82FC/836C (13/27/27/27 entries, each zero-pad separated); span 0xb00fc..0xb0280 = 388 B = 52+4+108+4+108+4+108 exactly; spec 0,4,4,4. - R22 clean-fleet (make clean + extract-all + check-all): 140 passed, 0 failed of 140. The incremental result was NOT trusted (§130). Fleet 93.25% fn-count / 89.2% instr / 80.5% distinct; dedup 1905/0; 0 NON_MATCHING (G4). - cookbook §132 + index (356 sections): the mechanism, the fingerprint (an undefined $L<n> in a LINK error is a truncated object, never codegen), the 30-second standalone-TU ladder that named the 4th table owner before any build, and the transferable rule — a fail-loud guard is only as trustworthy as the artifact hygiene around it. |
||
|
|
b58fd82068 |
docs(phase-30): SS131 the jtbl OVER-SPAN + checkpoint — #9 SOLVED, JTBL-CARVE-BREAKS-BYTES retired
SS131: `sltiu N` is ground truth in BOTH directions. jtbl_range already EXTENDS a span the dlabel cut short and WARNS when a span is shorter than the bound, but had no clamp for a span too LONG for a NON-ZERO reason — and the trailing trim only removes ZERO words, so ordinary data that spimdisasm ran into the dlabel slipped through and under-filled the piece. Records the reusable FINGERPRINT of an under-fill, because it does not look like codegen: hundreds of 1-byte diffs spread over most of the overlay, ~95% at byte 0 (mod 4) = the low byte of a 16-bit immediate, every one changing by exactly -4. Bucket differing bytes by offset%4 and decode a few words; uniform small deltas in the immediate field mean LAYOUT, not codegen. (Measured: 812 of 853 at pos 0 mod 4, all -4.) The clamp's authorization matches the extension path exactly: unambiguous sltiu bound only, and REFUSE LOUDLY if any surplus word is a plausible code address. This was the single instrument failure that survived SS125's retraction round — the one case where "the tool is broken" was actually true. Now fixed, with the 710-ins behemoth banked. |
||
|
|
8d40d55c7a |
docs(phase-30): SS130 — an INCREMENTAL build reported BYTE-IDENTICAL for a change the CLEAN build cannot LINK
I reported func_8013B83C + func_8013BD74 as "BOTH BANKED - BYTE-IDENTICAL". That was
WRONG. My in-loop gate ran `make extract && make build` without `make clean`, and it gave
a FALSE PASS. The clean rebuild does not link at all:
ov_SC01_077_o0.c:(.text+0x10f8): undefined reference to `$L105'
ov_SC01_077_jr_801588CC.o: undefined reference to `func_8013C938'
- the first is a local label from the C-emitted jump table;
- the second is a PREVIOUSLY-MATCHED cluster fn going undefined (the incremental build
reused objects that still satisfied it).
Reverted; R22 140/140; nothing lost, nothing was committed.
SS42b named the stale-object trap for a FALSE FAIL. This is its MIRROR: a FALSE PASS, on a
change that is not even linkable — false in the most convincing direction possible, a green
SHA. Anything touching config/ (carve, resegment, split) must be gated by a full
clean-fleet R22 before it is BELIEVED, let alone reported.
THREE WRONG CLASSIFICATIONS ON THIS PAIR, all corrected in the ledger:
CC1-FAIL-UNREAD -> it has no compile error at all
JTBL-PAD-SPEC-DRIFT -> I had carved ONE fn of a TWO-table span; carving both gives
pad spec [0,4,4] and the filter is satisfied
"both banked" -> the false pass above
Real class: JR-PAIR-IN-ONE-O0-OBJECT. Both bodies ARE byte-correct (match_one --o0 and
rtu_match --o0 both MATCH, 272 / 198 ins); the blocker is integrating TWO jr fns into ONE
-O0 object. Untested escape: SS81 step 1, isolate one into its own code subseg so each
object owns exactly one table.
Also records the diagnostic ladder that found it: diff the two BINARIES and bucket each
differing byte against the function's own vram range. 3,749 of 3,791 diffs were OUTSIDE the
function, first diff near the overlay START, image 57 bytes LONGER - the SS8 signature of
.rodata floating to the front. That fingerprint separates a codegen residual from a layout
effect in one build, and it is what finally redirected three wrong guesses.
|
||
|
|
7281e0af57 |
docs(phase-30): SS129 (two jr traps) + checkpoint — 1 of 3 reach-138 targets banked, 2 ledgered
SS129a: post-carve, rtu_match/match_one COUNT THE JUMP TABLE AS INSTRUCTIONS. For func_8013BD74 it reported `mine=198, target=226, 206 mismatched` — and 226-198=28 is exactly the table's entry count. A draft that verified cleanly BEFORE the carve reads as a total mismatch AFTER it, and the number looks like deep codegen trouble. SS81 says a jr fn's match_one MATCH is not a bank; SS129a says its post-carve DIFF is not a diff either. Let the whole-binary gate arbitrate. SS129b: NEVER commit a carve whose owner is still a stub. harvest_verify refuses a dirty tree (SS97) and the carve dirties config/, so committing the carve to get a clean tree is tempting — and it STRANDS the carve. jr_inventory refused instantly (R32: "carve ownership is not 1:1 ... UNOWNED 0x801d828c"), blocking every later jr operation on that overlay. Reverted; R22 140/140. The route for a jr fn is the INTEGRATED jtbl_family_bank (carve -> extract -> remap -> gate per sibling in ONE uncommitted transaction). The SS81 hand-chain is for diagnosis; as a banking path its two constraints contradict each other. Both were mine, both caught by oracles before any lasting damage, both now documented. Ledger: JTBL-PAD-SPEC-DRIFT (func_8013BD74, with the exact SS8e error) and CC1-FAIL-UNREAD (func_8013B83C — the diagnostic is genuinely unread; say so rather than guess). Fleet 93.21% fn-count / 89.1% instr / 80.4% distinct. |
||
|
|
2ab945035a | docs(phase-30): SS128/SS128a — a raw NUL makes grep silently skip a C source (137 files); negative controls use scratch copies | ||
|
|
a98d138c73 |
docs(phase-30): SS127 the -O0 idiom set + SESSION-28 wave checkpoint (honest ROI)
SS127/SS127a/SS127b distil what the wave's agents kept re-deriving, because the index fired on only 3 of 15 targets: - the -O0 CONSTANT-OFFSET FOLD: `p->f` folds to `lbu 3(r)`, `p[i]` does NOT (addiu + 0-displacement load). At -O2 these converge, which is why nothing in SS1-SS126 covers it. - the -O0 regime generally: spill/reload pairs are REAL named locals; load-delay nops and redundant copies are normal; write plain C, the -O2 steering levers are inert here. - SS127a: SS71 sibling-first is the STRONGEST -O0 lever — an -O0 TU is a near-uniform code regime, so a banked sibling's shape transfers far better than at -O2. - SS127b: two agents' decisive levers came from a SOURCE COMMENT in ov_SC01_077_o0.c, not from docs/. Promote levers out of source comments or every future agent re-buys them. Checkpoint records the wave AND its honest ROI: 1.33M tokens for 12 banks and +0.00pp headline. The value is contingent on three reach-138 functions, and all three are currently unpropagated (func_8013C08C 0/137, SS94 type-carry) or gate-failed (func_8013BD74 CARVE-REFUSED, func_8013B83C CC1-FAIL). Fix propagation before wave 2 — drafting more x2-reach targets is not where the leverage is. |
||
|
|
bbd51be24a |
docs(phase-30): SS126a — a bare except around a coverage oracle re-creates the silent skip
I under-counted this cluster 8x (reported 275 stubs/18 overlays; truth 2,184/138). The scan ran during a background rebuild AND wrapped corpus.stubs() in `except: continue`, so every R32 coverage refusal became a silent skip and the total was taken over the few overlays that happened to be re-extracted already. Two of our own rules broken at once: a measurement taken during a rebuild is not a measurement (caught EARLIER the same session, by the same assertion I then suppressed), and R32 lives in the CALLER — an oracle only asserts coverage if the caller lets it raise. It also cost credibility the other way: I used the bad number to declare the T0(f) "2,192 open members" pin STALE. The pin was right. R35 applies to a re-measurement as much as to the original measurement. Checkpoint updated with the corrected population and the completed fleet-wide sweep. |
||
|
|
d2b48b7680 |
feat(phase-30): tools/o0_subsplit.py — the T2 carve-within-a-carve driver; +3 banked in ov_SC03_015
Promotes the proven probe (commit:1266) into a real tool, and validates it FIRST-TRY on a
fresh overlay.
tools/o0_subsplit.py <ov> --lo <vram> --hi <vram>:
- derives the range's contents from the SOURCE ANCHORS (overlay_src_split.parse_overlay_c:
`asm` = unmatched stub, `define`/`def`/`nonmatch` = already matched), NEVER from an asm
scan -- a matched fn emits no .s, which is exactly the blindness that made the range look
like a clean contiguous run (SS126 / SS124's shape);
- computes the -O0 bound as (address range MINUS already-matched bodies) and emits ONE
sub-region per maximal run of unmatched anchors (K matched islands => K+1 regions);
- names each `<ov>_o0<letter>` picking free suffixes, so the widened Makefile glob selects
them; refuses loudly if it runs out or if the range spans >1 object or is already -O0;
- honours the one-carve-per-region law (forces a cut at every already-banked jr in the
object) and reuses jr_isolate_all's plan/build_new_config/ascending-unique validation
verbatim, so carve-repoint + source-repartition stay on the proven path;
- warns (does not refuse) when a stub in an -O0 run lacks the frame-pointer prologue --
the byte-gate is the arbiter, not the heuristic.
VALIDATION on ov_SC03_015 (untouched by the manual probe): the tool independently derived the
SAME structure found by hand on ov_SC03_014 -- 2 matched -O2 islands (func_80184440,
func_801848E4), 2 -O0 regions (8 + 7 fns), same 5 cuts. Sub-split -> BYTE-IDENTICAL. Then 3
drafts, each global DERIVED FROM THAT OVERLAY'S OWN ASM (%hi operand) rather than copied:
3/3 match_one --o0 MATCH (22 ins), 3/3 through the whole-binary gate.
BANKED this commit: func_801846E4 / func_8018473C / func_80184794 in ov_SC03_015 (6 across
the two overlays now). The other 24 stubs in the region are undrafted -- the route makes them
DRAFTABLE (they were un-bankable at any effort before); drafting them is crack-wave work.
R22 CLEAN-FLEET: extract-all 139/139 (+main); check-all 140 passed, 0 failed of 140.
cookbook SS126 (the address-range-is-not-an-optimization-region law + the probe ladder).
|