mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-10-01 15:43:06 -04:00
c07ee022828b0799734a6b2bbda94f5d1ccf83c6
220 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
c07ee02282 | feat(phase-30 S39): propagate free h_exact class 0x80182bb0 (9 ins x 1) - R22 140/140 | ||
|
|
8059ac8a53 | feat(phase-30 S39): propagate free h_exact class 0x80182bd4 (10 ins x 1) - R22 140/140 | ||
|
|
e88eccac60 | feat(phase-30 S39): propagate free h_exact class 0x8018625c (19 ins x 1) - R22 140/140 | ||
|
|
638f97dbbb | feat(phase-30 S39): propagate free h_exact class 0x80176144 (53 ins x 1) - R22 140/140 | ||
|
|
ff4bc60e09 | feat(phase-30 S39): propagate free h_exact class 0x8017bee0 (10 ins x 6) - R22 140/140 | ||
|
|
c3bf1c988d |
feat(phase-30 S39): func_801758FC propagated x137 (+7,535 ins) — the largest free h_exact class
Measured the h_exact free pool from the bytes rather than trusting the frontier report's numbers (R14 — its whale claim was 3/4 wrong: it said the whale was open in all four SC07 overlays; three were already banked and I closed the fourth earlier this session). MEASURED: 215 open function-instances / 8,763 instructions are byte-identical (h_exact, including reloc payloads) to an already-matched function. ONE class is 86% of that pool: func_801758FC — 55 ins, same address in all 138 overlays, matched in ov_SC01_000 only, OPEN in the other 137 => 7,535 instructions. h_exact means identical INCLUDING jal/lui/%lo reloc immediates, so the matched body compiles byte-identically at every member with NO remap (dedup_extend's correctness argument, §14). dedup_propagate --addr authored it once as DEFINE_func_801758FC() in engine_core.h and instantiated it at all 137 open sites in address order. [ OK ] 138 overlays byte-identical after propagation; 1 new group in config/dedup.us.yaml VERIFIED: make clean && make extract-all && make check-all -> 140 passed, 0 failed of 140. Fleet instr 12411467 -> 12419002 = +7,535 EXACTLY; fn-count +137; instr-weighted crosses to 94.5%. distinct-code unchanged BY DESIGN -- the class was already matched in ov_SC01_000, so the 137 add fleet instructions but no new DISTINCT function. audit-digest OK. 0 NON_MATCHING. Note this function had been sitting in the stored-draft backlog for ov_SC06_030 and ov_SC07_010 and re-gated "no" earlier tonight -- because gating a DRAFT is the wrong move for an h_exact class. The right move is propagating the already-MATCHED body. Same function, two routes, and only one of them is free. Remaining free pool after this: 78 instances / 1,228 ins across 32 classes. |
||
|
|
7b5eda0424 |
feat(phase-30 S39/S4): re-gate probe — A10 broadly stands; 4 banked from the reverted overlays (+146 ins)
Tested whether decision-log A10 ("stored drafts re-gate at 0/958", measured in T1) survives
S38's tool repairs. Three populations, plain re-gate, no draft edits:
fresh wave-6 drafts (diagnosed "blocked on a class") 4/6
stored pool, unbiased sample (every 96th of 1,155) 1/12 <- hit was in a REVERTED overlay
the two REVERTED overlays, targeted 3/17
A10 BROADLY STANDS. ~8% on the general stored pool is not a harvest, and a 1,155-wide sweep
(= 1,155 whole-binary builds) is not justified by it. Do NOT generalise the fresh-draft rate
(4/6) onto the stored pool -- different populations. The honest rule is narrower and cheaper:
after a tool repair, re-gate the drafts THAT DEFECT plausibly touched, targeted by its
blast radius -- not the whole ledger. (R35 applied to the backlog, not just to metrics.)
BANKED (+146 ins): ov_SC06_030 func_80161208 + func_80162CCC; ov_SC07_010 func_801506A4 +
func_8016F0AC. R22 clean-fleet 140 passed, 0 failed of 140 -- which also proves byte-neutral a
fleet-shared engine_core.h edit the bank required (extern s32 func_801506A4(s32,s32) -> the
no-prototype form), reaching all 138 overlays (T2 blast radius).
Fleet 12410129 -> 12410275 instr; distinct +95 / +1 uniq; fn-count +4. audit-digest OK.
Also documents the LEDGER MECHANICS in calibration.md (Drew asked): .run/backlog.jsonl is
append-only and nothing is deleted on bank -- open-ness is DERIVED from corpus.stubs at every
read (load_best drops now-banked rows per-binary, P9) and `make report` runs `backlog.py prune`.
Membership is therefore self-maintaining and currently clean: 863 rows, 0 already-banked, 14
duplicate-addr (was 6,867 rows / 98% banked before Phase-29 compaction). What pruning does NOT
re-validate is the VERDICT on surviving rows -- closeness + residual class are as old as the
tooling that wrote them (Phase 28 found a corrupt one: func_80178004 close=0 -> 91). That is
the staleness that matters, and it is exactly what this probe measured.
|
||
|
|
c57860db4e |
feat(phase-30 S38/S1a): lift 895 local types to engine_types.h — kills the type-scope sweep class
The free-sweep "wall" was a C parse error: a remapped member body names the EXEMPLAR's TU-local types, which are undeclared in the sibling's TU, so gcc-2.7.2 parses the declarator as an expression and dies before ever reaching codegen. extract_unit does carry typedefs, but only ones immediately preceding the function in the preamble — types declared elsewhere in the exemplar's TU are missed. Rather than patch the scanner per-family, remove the class: lift every liftable local type into the shared header once. 895 types lifted, 6,196 local definitions stripped across 1,259 files. R22 clean-fleet 140/140. EXCLUDED s8/s16/s32/u8/u16/u32/f32/s64/u64/f64 — lift_types classified those common.h scalars as liftable and lifting them would have been actively harmful. The tool's own visibility guard kept 8 local defs in src/ov_SC01_077/ov_SC01_077_o0.c, which does not include engine_types.h (stripping a type out of a TU that cannot see the replacement DELETES it, and the link error that follows names an unrelated data symbol). Mechanism proven before scaling: lifting just 3 types took 0x801833f0's family from 0/6 to 6/6. |
||
|
|
91bb3ac76b |
feat(phase-30 S38): the free-sweep "wall" was a TYPE-SCOPE parse error — 0/6 becomes 6/6
family_sweep --hseq returned 0/6 on 0x801833f0 (328 ins, PURE, matched exemplar) and I recorded it as evidence that h_seq families do not template. It was a C PARSE ERROR: the remapped member body carries the EXEMPLAR's TU-local type names (PTag_801833F0 / Ft4_801833F0 / Drm_801833F0), which are declared only in ov_SC02_028's TUs. Undeclared type -> gcc-2.7.2 parses the declarator as an expression -> "parse error before `vtx'" two lines later. Never reached codegen. Lifting the three types to src/shared/engine_types.h (lift_types --apply; each had ONE canonical definition, no variants) turns the same sweep into 6/6 banked. R22 clean-fleet 140/140. This is the §20 propagation cap resurfacing on the h_seq sweep path, where nobody had checked for it. MY ERROR, RECORDED (R37/R14): I claimed in the S38 checkpoint and in commit commit:1410 that "family_sweep reports banked/failed WITHOUT the per-member build error". That is FALSE. There are 23,211 .run/hseq_failed.*.classified.txt files on disk; the diagnosis for BOTH of today's zeros was written by the sweep itself at probe time (0x80128c98's says "PLUMBING: conflicting types for `cdFileLocTable'"). I asserted a tool limitation without checking for it, and then spent two probes plus a manual --stage-only round rediscovering what was already in a file. Probe before costing. |
||
|
|
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). |
||
|
|
7a6a09379f |
fix(phase-30 S33b): relax all 42 func_80146C3C decls — the PROPAGATE remainder is the SAME symbol
Diagnosed the 11,147-ins PROPAGATE remainder with one probe, in §138's order: 1. ONE COMMAND, NO BUILD: the originals of BOTH 0x8016BA68 and 0x8012F274 are sha1-identical across ov_SC07_006 / ov_SC06_025 / ov_SC01_000 / ov_SC01_077 / ov_SC03_001 -> the registry is sound; the cause is TU context. 2. ONE BUILD in an excluded overlay named it: `conflicting types for func_80146C3C` — the SAME symbol as the EXTEND lane, same (void)-vs-(u8*) shape, same one-token lever. The 137 [exclude] lines were one declaration. Relaxed the remaining 42 `extern void func_80146C3C(void);` in engine_core.h to `()`. Measured safe BEFORE editing (§138): every fleet decl of the symbol is `(void)/()/(u8*)/(u8 *a0)` — no default-promotion param anywhere, so gcc-2.7.2's `()` rule cannot bite — and every use in the header is a no-arg call or already cast, so it is codegen-neutral. R22 clean-fleet: 140 passed, 0 failed of 140. TOOL BOUNDARY worth recording: `dedup_propagate` CANNOT finish this one. The 4 SC07 members are now `macro` sites, so `find_site` never returns a `def` and the auto-source scan errors with "no source overlay has it matched". Extending an already-macro-ized group is `dedup_extend`'s job. Probe: exactly 1 extendable group per ordinary overlay — so the fleet has no hidden wiring backlog beyond this function (a useful negative, R32-shaped). Also logged: the §134 scanner sweep is sized and has ONE real target — tools/overlay_src_split.py:345 (_split_macro_body) carries the identical single-line-only comment test, and it decides where a macro body's file-scope externs END, so a multi-line comment there silently truncates the extern set. The other scanners in that file track block-comment state; split_src_region.py and family_remap.py already handle the multi-line form. |
||
|
|
62042f65ca |
fix(phase-30 S11): multi-line-comment blindness in dedup_propagate; func_8012A598 x138
Fleet 96.06 -> 96.10% fn-count / 93.7% instr / 88.0% distinct; dedup 1907 -> 1908 groups, 0 failed, C1 240807/240807. R22 clean-fleet: 140 passed, 0 failed of 140. func_8012A598 (3,288 templatable ins) was being written off as CARRY-FIXABLE. It took TWO fixes; either alone leaves it skipped. 1. TOOL (R33) — find_site's preamble backscan. The SESSION-18 fix handled blank, `//`, and SINGLE-LINE `/* … */` lines, but a MULTI-LINE block comment still halted the walk: its middle lines start with `*` and its last line ends `*/` without starting `/*`. So the three externs above the body were dropped and the body then failed compiles_standalone on now-undeclared data. This is the §134 multi-line-blindness class — S6b fixed the identical shape three times in family_remap (D1/D2/D5) and this copy was never reached. Fixed by deciding skippability on `cdecl._mask` — the project's ONE masking oracle — instead of on line syntax: it subsumes every comment form at once and cannot be fooled by a `/*` inside a string, with an R32 assertion on the length-preservation invariant it rests on. Strictly monotone (it can only carry MORE preamble), and dedup_propagate is a byte-gate feeder, so a bug here can fail to bank but never falsely bank. 2. EXEMPLAR — the body also declared a draft-local `struct BigCopy164` tag, which the tool refuses by design (two macros defining one tag would redefine it in a single TU). The shared `struct BigCopy` (engine_types.h L312) is the identical layout and is ALREADY used this exact way at engine_core.h:16158, so switching the exemplar to it is byte-neutral and drops the alias too. Probed on ONE member before scaling (R37/S29): byte-identical 9052dc0e first try; then 138 overlays byte-identical. PROPAGATE head accounting after this: 7,398 of 18,545 ins banked (func_80147364 4,110 + func_8012A598 3,288). Still open, each with a NAMED cause and none yet diagnosed against a build: func_8012f274 (3,973, dropped), func_8016ba68 (3,886, 4/138), func_801466f0 (3,288, the S6b D4 wrapped-alias gap). |
||
|
|
c7ad41c8a3 |
feat(phase-30 T6/S11): the propagation lag — EXTEND 31/36, and the PROPAGATE head measured
Continues the S11 lane. Fleet 96.01 -> 96.06% fn-count / 93.6 -> 93.7% instr / 88.0% distinct; dedup 1905 -> 1907 groups, 0 failed, C1 240669/240669. R22 clean-fleet: 140 passed, 0 failed of 140. 0 NON_MATCHING (G4). EXTEND (SC07): the 16 volatile-blocked DIFF slots banked on retry after the data asm-label alias -> lane total 31/36. PROPAGATE head, measured rather than projected. .run/s8_lag.json re-split: the checkpoint's "45 classes / 20,837 ins" is really 5 classes carrying 18,545 ins (89%) and 41 carrying 2,316. Per-class outcome: func_80147364 30x137 = 4,110 BANKED x137 (definition-side asm-label alias) func_8012f274 29x137 = 3,973 DROPPED — byte-diverges in ~130 overlays func_8016ba68 29x134 = 3,886 4 of 138 banked; excluded from ~130 func_8012a598 24x137 = 3,288 SKIPPED, cause NAMED by the tool func_801466f0 24x137 = 3,288 no source found — the S6b D4 gap, still open func_80147364's byte-true definition is `(u16, u16)` while 4,046 fleet decls say `(u16, s32)`. u16 is a default-promotion type, so the `()` no-prototype escape is ILLEGAL (the documented gcc-2.7.2 dead-end) and conforming the decl would change caller codegen. The DEFINITION-SIDE asm-label alias gives the def a distinct C identifier while emitting the real symbol -- zero blast radius on every caller. Probed on ONE member first (1 build, not 137 -- the S29 discipline): byte-identical 9052dc0e first try; then 137 overlays clean. In-tree precedent for the form: 1,725 files. MEASURED NEGATIVE, recorded not buried: `dedup_propagate --recover` banked only 4 of 138 on func_8016ba68 and dropped func_8012f274 entirely (137 [exclude] lines). The caller-extern reconcile that is 16/16 lifetime ON DRAFTS does NOT transfer to PROPAGATION of these two. Cause not yet diagnosed -- probe one excluded overlay's build output before any further attempt (§136a), do not re-run the lever hoping. NAMED NEXT (cheapest first): func_8012a598 skips on `missing file-scope extern (CARRY-FIXABLE): D_801151D4, D_80126DB8_a, D_80127504` -- the SESSION-18 preamble-backscan class. Its body is 2 statements and `struct BigCopy` is ALREADY in the shared engine_types.h (L312) with the identical statement already macro-ized at engine_core.h:16158, so a hand-authored macro (the func_80147364 path) should take it x137 for ~0 tokens. Process errors recorded in CURRENT_PHASE.md, all three one mechanism -- the signal sampled is not the thing waited for: (1) a `nohup CMD &` wrapper's exit read as the fleet check finishing (it stood at 63/140); (2) a corpus.stubs probe mid-rebuild, which R32's coverage assertion refused rather than answer wrongly; (3) CORRECTION to the S10 checkpoint's own rule -- `pgrep -x make` is right for one make and WRONG for a campaign of sequential makes (it fired in a gap and reported a live campaign done), and `pgrep -f <pattern>` SELF-MATCHES so that waiter can never exit. Wait on the campaign process or `treelock.sh --status`. |
||
|
|
16a1dabc79 |
feat(phase-30 T6): SC07 EXTEND lane 0/36 -> 15 banked; the 4 "DIFF"s are a volatile decl
Banked 15 h_exact members into the 4 SC07 overlays via dedup_extend, and
diagnosed the class that dedup_extend's own header records as UNDIAGNOSED.
THE 4 DIFFs ARE NOT A CODEGEN WALL. dedup_extend's correctness argument says an
h_exact match guarantees byte-identity including relocs, so a DIFF should be
impossible. Both halves of that tension resolved against the bytes:
1. The contract HOLDS. func_80162FF4's original bytes are sha1-identical in
ov_SC07_006 and ov_SC01_000 (af1aceb2...), so the registry is not lying.
2. The cause is TU CONTEXT. The SC07 host TU (_jr_8015C32C.c:1177) declares
`extern volatile s32 D_80127090/94/98` at FILE scope; none of the 134
working overlays' copy of that TU does. Volatile makes the macro's three
stores a scheduling barrier, so `addu $a0,$s2,$zero` cannot sink into the
`jal func_80146D30` delay slot -- the built body emits it early plus a nop,
one instruction longer. Measured word-for-word against the payload:
built +0x090 addu / lui,sw x3 / jal / NOP
ref +0x090 lui,sw x3 / jal / addu-in-delay-slot
All 4 DIFF macros touch exactly those 3 symbols, which is why all 4 fail in
all 4 binaries and nowhere else.
Fix: the §37/§124 DATA asm-label alias inside the 4 macros
(`extern s32 aD_80127090 __asm__("D_80127090")`) -- a distinct C identifier is
immune to any TU's declaration of the symbol, and is byte-neutral by
construction in the other 134 (same symbol, same type, same non-volatile
semantics). In-tree precedent: ov_SC06_008_jr_80135D20.c:1434.
R22 clean-fleet: make clean && extract-all && check-all -> 140 passed, 0 failed
of 140, with the 15 banks AND the alias edit in.
Remaining in this lane, both named not walled: func_80144B9C x4 (the whale --
its registry `func` field is a bare name, not a DEFINE_ macro, so write_drafts
emits a CALL; it needs the §38 -O0 shared-header route, and dedup_extend should
refuse-and-name it per R32) and func_80149954 x1 (blocked behind func_80147364,
whose u16 params make the `()` no-prototype escape illegal -- the documented
gcc-2.7.2 default-promotion dead-end; needs the alias or a de-macroize).
|
||
|
|
eb2e72328b |
fix(phase-30 T6): byte-neutral decl conforms unblock the SC07 EXTEND lane
The dedup_extend SC07 lane banked 0/36. Captured every failure's own compiler error rather than guessing: 5 PLUMBING (declaration conflicts) + 4 DIFF per binary, and the PLUMBING set reduces to 4 distinct symbols repeated across all four binaries. Fixed at the lowest available blast radius, each byte-neutral BY CONSTRUCTION and proven by R22: - func_80146C3C (8 of 36): T2, but 1 token. DEFINE_func_8016A08C / DEFINE_func_8016A1CC declared it `(void)` while the SC07 TUs declare `(u8 *a0)`. Both macros already CAST at the call site, so the prototype is codegen-irrelevant -> relax to `()` (no-prototype). Measured first: all 4,020 fleet decls are (void)/()/(u8*)/(u8 *a0) — no default-promotion param anywhere, so `()` is compatible with every one of them (the gcc-2.7.2 `()` dead-end needs a promoting param; there is none). - func_8014F4C0 (4 of 36, self-axis), D_80126CC4 (3), func_8012E5CC (1): T1 binary-local. Conformed the SC07 decls to the fleet-canonical form. Every one has ZERO uncast uses in its TU (verified per file), so the decls were pure splat boilerplate with no codegen effect. Deliberately NOT touched: engine_core.h beyond those 2 lines. The §29 law is about BULK header edits (the 2,046-file sed that still didn't build); 2 targeted macro lines with a measured compatibility argument is not that. R22 clean-fleet: make clean && extract-all && check-all -> 140 passed, 0 failed of 140. Enabling change only; no function banked in this commit. Method note (mine, recorded): I read `corpus.stubs` while `make extract-all` was mid-flight and got garbage — R32's coverage assertion refused to answer instead of returning a wrong stub set. A measurement taken during a rebuild is not a measurement (S27's law, re-earned). Also: `nohup CMD &` inside a backgrounded Bash call makes the harness signal completion of the WRAPPER, not the campaign — the R22 "finished" at 63/140. Waited on `pgrep -x make` instead. |
||
|
|
6dab5a446b | feat(phase-30 UC): func_80159A20 + func_80139BE0 banked via gate_stage ladder (13,386 ins) | ||
|
|
3b3accd5a2 | feat(phase-30 UC): func_80163764 banked via targeted decl reconcile (compiler-named edits only) | ||
|
|
b5362c7b7f |
feat(phase-30): the -O0 cluster HARVEST — 1,364 banks for ZERO agent tokens; fleet 92.71->93.09% fn / 88.3->88.6% instr / 78.7->79.3% distinct
The payoff of routing the cluster to -O0 (commit:1270). These functions were ALREADY
CRACKED in ov_SC01_077 and could not be banked anywhere else purely because every
destination file compiled -O2. With the destinations now -O0, they template in
deterministically -- no drafting, no agents.
dedup_propagate --recover 0x8013C360 (h_exact x138) -> 137 overlays byte-identical
family_sweep --hseq 10 variant families -> 1,227 banked / 133 failed (90%)
1360 staged across 136 groups
------------------------------------------------------------------------------------
1,364 new banks
FLEET: fn-count 92.71 -> 93.09% · instr 88.3 -> 88.6% · distinct-code 78.7 -> 79.3%
(71,756 / 87,459 unique fns; +1,162 unique). dedup 1904 -> 1905 groups, 0 failed;
C1 coverage 240496/240496. 0 NON_MATCHING in any default build (G4).
R22 CLEAN-FLEET: extract-all 139/139 (+main); check-all 140 passed, 0 failed of 140.
--recover WAS LOAD-BEARING (SS75): without it dedup_propagate took its historical
all-or-nothing branch -- one failing overlay (the SOURCE, ov_SC01_077) dropped the whole
function and it printed "all candidates dropped", which reads exactly like a wall. Reading
the exclusion code instead of believing the message showed the remedy: --recover excludes
only that overlay (kept x1 with its own inline match) and propagates to the other 137.
The two has_mid_jr families in the cluster were REFUSED BY DESIGN, not attempted (SS53
interlock): 0x8013C0F8 (154 ins) and 0x8013C414 (329 ins), ~137 members each = ~466
members queued behind the jtbl carve path they actually need, rather than a fake 0% from
the wrong tool.
REMAINING in the cluster: the 133 sweep failures + the 2 jr families + the 3 addresses
never cracked anywhere (0x8013B83C, 0x8013BD74, 0x8013C08C) -- the last are genuine
drafting work, now finally possible since their TU is -O0.
|
||
|
|
0130fb340a |
feat(phase-30): wave-4 resumed 10/10 MATCH banked + h_exact leg (14 propagated); R22 140/140
The 12 agents killed by the usage-limit pause were resumed and ALL returned MATCH (2 had already banked from their partial drafts, so 10 ran). h_exact propagation leg completed over all 112 banked exemplars: 14 propagated, 42 benign skips (h_seq tier, correctly routed away per §123), 0 failures — the 0x801466F0 'halt' was a third benign-refusal phrase, not a partial write. fn-count 92.61 -> 92.67% | instr 88.2 -> 88.3% | distinct 70,581 -> 70,590 unique fns. |
||
|
|
159317d3fe |
feat(phase-30): T3 wave-1 — 8 cores banked + 4 propagated fleet-wide; R22 140/140 (fn-count 92.00 -> 92.16%)
Ultracode wave of 14 agents over fresh reach-138 cores: 14/14 match_one MATCH, 8 accepted by the whole-binary gate (the §52b law reproduced exactly). Propagated per-function (the incident fix): 0x8012E014, 0x80151C54, 0x8012F49C, 0x80151B98 -> +573 instances. R22 clean-fleet 140/140; instr 87.5 -> 87.7%, fn-count 92.00 -> 92.16%, distinct 69,828 -> 69,836. The other 4 banked cores are h_seq (PURE/IMM) families: dedup_propagate is h_exact-only, so its 'reach<2' / 'not self-contained' refusals were statements about the TOOL's tier, not the functions -> cookbook §123 (the §53 carve-law generalized to the propagation-tier axis) + a routing table. They bank via family_sweep --hseq next. |
||
|
|
ceae8bb4cd |
feat(phase-29): T97 — func_80151944 138/138; the "three-edit job" was ONE edit
- The last big NAMED blocker, costed across four checkpoints as §112 header + §20 call-site cast + a scripted §99 pass over 2,022 overlay-local decls. Probing first showed two of the three were unnecessary: the conflict is entirely between DEFINE_func_80151924()'s own forward-decl (extern s32 func_80151944(void)) and the byte-true definition (void f(void *a0)), four lines apart in the assembled TU. The 2,022 decls live in OTHER TUs and never entered it. - ONE 4-line edit in engine_core.h: decl -> byte-true, call site -> ((s32 (*)(void))f)() so the caller's codegen is unchanged. rtu_match: conflicting types -> MATCH (15 ins). Sweep 138/138. - Family 0x80131eec fully closed: 149 (T87) + 138 (T97) + 1 immediate-refusal = all 288 members. - SHARED-HEADER RISK VERIFIED, NOT ARGUED: engine_core.h is included by all 138 overlays, so §20 cast-folding is a hypothesis. Per-binary gates 138/138 are necessary but not sufficient; the fleet check is the one that counts. R22 clean-fleet 140/140 + tools-health RC=0 (corpus 0 PHANTOM/0 TRUNCATED, cdecl, audit-binaries, dedup 1886/0, C1 239604/239604). - METRICS: fn-count 91.96 -> 92.00% (+138, exact) · instr 87.4 -> 87.5% (+2,070) · distinct +72. - COSTING LESSON: the estimate came from reading the symptom (2,022 decls of this name exist) instead of probing the failure (which decl actually conflicts). Probe before COSTING, not just before scaling. |
||
|
|
14bc520c96 |
fix(phase-29): engine_core.h — §99 no-prototype for func_80147364 (sidesteps a 4,021-site conform)
Item 3, and the cheap route won. conform_decls' dry run priced the direct fix and warned it off:
byte-true def : void func_80147364(u16 param_1, u16 param_2)
4,021 decl sites: 2,030 (u16,s32) + 1,983 (u16 a0,s32 a1) + 4 byte-true + 4 (u16,u16)
⚠ SCALAR-NARROWING (s32 -> u16) — NOT caller-neutral; argument promotion changes at every call
site, so callers emit different code (byte-proven on func_80175DA8)
So conforming 4,021 sites would likely trade a PLUMBING failure for a BYTE failure. The §99
no-prototype form on the HEADER is compatible with both the byte-true definition and the existing
(u16, s32) prototypes, and touches 9 sites instead of 4,021:
extern void func_80147364(u16, s32); -> extern void func_80147364();
Verified: header change ALONE, no src change, R22 clean-fleet 140 passed, 0 failed of 140.
This is the T67 failure resolved — that batch failed 2/140 with because it corrected the header's TYPES while 272 TUs disagreed. Dropping the
prototype instead disagrees with nobody.
|
||
|
|
86c315ec08 |
fix(phase-29): engine_core.h — §99 no-prototype for the three CALLED ARITY functions
Item 1's payoff. §113's call-vs-address re-check found func_80144B14 was the ONLY address-taken one (already fully retyped, T72); func_8013BD34 / func_8014358C / func_8017D808 are genuinely CALLED, so their arity IS constrained by the macro's own call site and the full retype is unavailable. §99 no-prototype is the fix: `extern void func_X();` accepts the macro's fixed-arity call AND the definition's differing arity, and a no-prototype call passing the same arguments generates the same code. extern void func_8013BD34(void); -> extern void func_8013BD34(); (def takes s32 a0) extern void func_8014358C(void); -> extern void func_8014358C(); (def takes s32 param_1) extern void func_8017D808(s32, s32); -> extern void func_8017D808(); (def takes void *a0) Verified in one step per the T48 discipline: the header change ALONE, no src change, R22 clean-fleet 140 passed, 0 failed of 140. Batched three because the technique was the variable, not the targets — a bisect over three is cheap if it fails. |
||
|
|
df86fcce50 |
fix(phase-29): engine_core.h — func_80144B14 declared int(int), not void(void)
The ARITY blocker did not apply: DEFINE_func_* does not CALL func_80144B14, it takes its ADDRESS (`*(s32 *)((s32)a0 + 0xDC) = (s32)&func_80144B14;`). There is no call site to break, so the FULL correction is available rather than the §99 no-prototype workaround. That is a refinement the audit needs: the ARITY precondition asks whether the macro's own call site would break, but an address-taken use has no call site. Over-fires on that shape. §85: 0 consumers, so the void->int return widening is byte-neutral. Verified in two steps (T48 discipline): header change ALONE, no src change, R22 clean-fleet 140 passed, 0 failed of 140. Fleet-shared (§61/§63), R22 mandatory. Probe target switched from func_8013BD34 on measured evidence: that one's definition lives in ov_SC07_010_o0.c, and _o0 families sweep ~1/137, making it a poor test of an unproven technique. func_80144B14 is the same class, 137 stubs, not -O0, with a real 34x137 family. |
||
|
|
0c5df25faf |
feat(phase-29): T67 — audit_header_sigs.py; 61 header decls contradict byte truth, 6 corrected
THE TOOL (tools/audit_header_sigs.py, cookbook §112). A DEFINE_func_*() macro forward-declares the
functions its body calls, and that decl is visible in EVERY overlay instantiating the macro — so when
it disagrees with the byte-true definition the whole family becomes untemplatable and the failure
wears a compiler wall's clothes. Three such were found ONE AT A TIME earlier this phase
(func_80156044, func_8016163C, func_8014D610), each worth ~137 members, each costing a
diagnose/fix/re-sweep cycle. This audits all of them in one pass: parse every `extern func_X(...)` in
src/shared/*.h, find every DEFINITION in src/**/*.c (via §110's _def_head_at, not "ends in ;"),
compare with cdecl, and report only where NO definition agrees — one overlay disagreeing is loose
typing (§16/T49), all of them disagreeing means the header is the outlier.
RESULT: 3,043 decls across 1,023 functions; 265 have definitions; 61 contradict every one. The top 10
are full-fleet families (137/136/134 live stubs, 1,366 total), all with an unambiguous byte truth.
APPLIED: 6 functions / 11 decl sites, R22 clean-fleet 140 passed, 0 failed of 140 —
func_80138DE0, func_80146750, func_80161374, func_80161774, func_80161888, func_801778A8.
TWO PRECONDITIONS THE AUDIT DOES NOT YET CHECK, both found by gating rather than by reasoning:
1. ARITY. func_80144B14 / func_8013BD34 / func_8014358C declare (void) but are DEFINED with one
parameter. Correcting the header would break the macro's OWN call site (too few arguments), so
they need the §99 no-prototype treatment instead. Excluded before the batch, by measurement.
2. OTHER IN-SCOPE DECLS. The first batch of 7 FAILED the gate 2/140 with `conflicting types for
func_80147364` — the overlays' own TUs declare it the old way (9 header sites rewritten, but
src/ov_*/…:347 disagrees). A header correction is only safe when no other in-scope declaration
disagrees; that one additionally needs a conform_decls pass. Excluded; the other 6 then gated
140/140 clean.
The gate caught the bad batch immediately and the culprit was found by reading one object's real cc1
output rather than by a 7-way bisect (7 fleet gates = ~2.5h; one serial compile = seconds).
|
||
|
|
3c380fec83 |
fix(phase-29): engine_core.h — func_8014D610 declared s32(s32,s32,u16*), not void(s32,void*,void*)
Same class as func_80156044 and func_8016163C: the shared header contradicted the byte truth. The
exemplar's banked definition is `s32 func_8014D610(s32 param_1, s32 param_2, u16 *param_3)`
(ov_SC07_006_jr_80140608.c:4576); DEFINE_func_8014D438 declared
`void func_8014D610(s32 a0, void *a1, void *a2)`.
That mismatch is what made --fix-def-sig retype param_3 to `void *` while the body does
`param_3[0]` -> `void value not ignored as it ought to be` (T61's param-use guard now refuses it,
naming the header as the real fix — this is that fix).
§85 sized first: 0 callers consume the return. The macro's call site passes `s16 buf1[4]`/`buf2`
into the s32/u16* params — same 4-byte values in $a1/$a2, so the retype is a warning, not a codegen
change.
Verified in two steps (T48 discipline): the header change ALONE, no src change, R22 clean-fleet ->
140 passed, 0 failed of 140. Fleet-shared (§61/§63), so R22 was mandatory.
NOTE: ov_SC07_006_jr_80140608.c:4529 records an earlier, DIFFERENT resolution of the same conflict —
a per-overlay de-macroized local decl ("do NOT re-macroize"). That remains correct and untouched;
this fixes the shared decl the other 137 overlays see.
|
||
|
|
2d91ed54fb |
fix(phase-29): engine_core.h — func_8016163C declared s32(s32,u32), not void(void*,s32)
The shared header contradicted the byte truth. The exemplar's banked definition is `s32 func_8016163C(s32 arg0, u32 arg1)`; both DEFINE_ macro decl sites said `void func_8016163C(void *a0, s32 a1)`. That mismatch is why the family could not template, and it is what made --fix-def-sig DEMOTE the return to void — gcc then deleted the computation feeding it and the draft compiled to 58 instructions against a 78-instruction target (T62's self-inflicted SIZE-MISMATCH). §85 sized first: conform_decls.consumers(func_8016163C) = 0 — both macro call sites discard the return (`func_8016163C(a0, func_801615C4(a0, 0));`), so the return-axis flip is byte-neutral. Verified in two steps (T48 discipline): the header change ALONE, no src change, R22 clean-fleet `make clean && extract-all && check-all` -> 140 passed, 0 failed of 140. Fleet-shared edit (engine_core.h reaches all 138 overlays), so R22 was mandatory (§61/§63). |
||
|
|
51bac9f3e6 |
fix(phase-29): engine_core.h — DEFINE_func_80155FF8 declares func_80156044 void, not int
The exemplar's own @stuck note asked for this (ov_SC01_077_jr_80154C24.c L1349-1350): the handwritten func_80155FF8 wrapper calls func_80156044 via inline-asm `jal`, so nothing consumes the return, and ov_SC01_077 already declares it `void` inline — the MACRO was the outlier. §85 precondition measured before touching it: conform_decls.consumers(func_80156044) = 0 callers consume the return, so the return-axis flip is byte-neutral. Verified in two steps (T48 discipline): the header change ALONE, with no src change, R22 clean-fleet `make clean && extract-all && check-all` -> 140 passed, 0 failed of 140. Fleet-shared edit (engine_core.h reaches all 138 overlays), so R22 was mandatory (§61/§63). |
||
|
|
f3e8317bd1 |
feat(phase-29): T49 — func_80135260 x4 siblings + the 3,744-site decl conform
The §53 carve path banked only 4 of 137 siblings, ALL of them SC07 — the exact signature func_80177DA8 showed before its §99 fix, so the same lever applies. - jtbl_family_bank func_80135260: 4 BANKED / 133 gate-fail. The 4 are SC07 overlays. - conform_decls dry run confirmed the class: byte-true def is `s32 func_80135260(s32, s32, s16 *, s16 *)` but 3,744 declaration sites say `(s32, s32, s32, s32)` — params 3 and 4 declared s32 where the byte truth is s16 *. Return type agrees, so the §85 return-axis precondition does not fire. - Applied: 3,744 sites rewritten across 2,021 files; the tool's R32 assertion reports "non-canonical declarations remaining: 0 OK (axis complete)". It correctly SKIPPED the 5 DEFINING TUs (the 4 SC07 banks + ov_SC01_077) — a defining TU owns its own declarations, since per-overlay byte-true signatures legitimately differ under §16 loose typing. - This touches src/shared/engine_core.h, so it is FLEET-SHARED and R22 was mandatory (§61/§63): R22 clean-fleet 140 passed, 0 failed of 140. Also recorded: jtbl_family_bank's [gather_externs] warning named func_80135D20 as an undeclared referenced symbol, but that symbol appears ONLY in the draft's header COMMENTS (lines 3 and 29) — a comment-scanning false positive, same class as the Phase-19 gen_harvest_targets garbled-hint bug. It was not the cause of the 133 failures. Next: re-run the carve path for the remaining 133 siblings now that the decl axis is conformed. |
||
|
|
05430eb26e |
feat(phase-29): T32 — NEAR-6 crack wave banks 4 reach-138 cores ×1; R22 140/140
Ultracode fan-out (12 agents, 1.70M subagent tokens): 6 crack agents, one per NEAR target, each carrying its byte-measured residual + T31's disproved routes, then a distill agent per target that adversarially re-checks the claim. - BANKED ×1 (whole-binary gate, gate_stage --no-propagate per §55b law 1): func_80140958 (260 ins), func_80177B5C (147), func_80132F40 (72), func_8012E364 (67). Every agent MATCH claim was RE-MEASURED BY ME with match_one before it was believed (G3/P9: match_one is a candidate, a bank is the whole-binary gate), and verified against the SOURCE not gate_stage's accumulating verified-list (§55b trap 4). R22 clean-fleet: 140 passed, 0 failed of 140. - engine_core.h moved by exactly one byte-neutral arity fix (void -> no-proto) = fleet-shared, so R22 was mandatory (§61/§63), not the per-binary gate. - func_80140D68 MATCHes standalone but NOT whole-binary — the §30a integration class; its distill agent named the likely cause in advance (DEFINE_func_* extern must return u32*, not void). - func_80176734 217 -> 13 with the instruction count now EXACT (371/371). cse_expr.md §H's "no bank, 5 permuter-shaped clusters" is BYTE-REFUTED: 4 of 5 were steerable from C; the -1 length delta was a combine/LOG_LINK effect (flow.c links a SET only to the next use in the SAME bb), not frame pressure. Two coupled allocator/sched ties survive. - FOUND: docs/gcc-2.7.2-map/sched.md cites gcc-2.8.1 line numbers (birthing_insn_p 2498->2469, adjust_priority 2534->2507, potential_hazard 1345->1318, schedule_select 2646->2616) — surviving papermario numbers Phase 23's source-version correction never swept. One is LOAD-BEARING: §1.7 and §S12 claim the S2 boost needs SET(REG_pseudo,...) so pins must be removed; sched.c:2477 tests only GET_CODE(SET_DEST)==REG with NO pseudo check, discriminator is reg_n_sets==1 (2490). Verified by me against tools/reference/gcc-2.7.2, not taken from the agents. Map edits owed (next task). - MY DEFECT: all 6 agents shared one scratch dir (1,452 files); deliverables are uniquely named and verified intact, but short-named scratch could collide. Per-agent subdirs next wave. |
||
|
|
599a33c056 |
feat(phase-29): wave22 — 5 exemplars banked from an 18-target Ultracode wave (R22 140/140)
THE WAVE: 18 h_seq family exemplars (~255k templated instructions), one agent each, drafting from
cached Ghidra-C + the target .s with canonical callee/data decls resolved from the real TU scope.
Result 12 MATCH / 6 NEAR / 0 FAIL (2.59M subagent tokens). No agent touched the tree — the
draft-only constraint held (verified: git status clean across src/config/tools/include).
BANKED 5: func_80148E54, func_80171B4C, func_8014A738, func_8012A328, func_80163534.
R22 clean-fleet 140 passed / 0 failed of 140.
A BUG I INTRODUCED EARLIER TODAY, FOUND BY WORKING THE 12->5 GAP. My block-scope descent in
reconcile_tu fed ordinary STATEMENTS to cdecl.parse; some parse without raising into a declarator
with an EMPTY base type and the statement's symbol as its name. That fake row overwrote the genuine
plan entry for the same symbol, so the span rewrite landed on a statement instead of the declaration
— and my own R32 completion assertion still PASSED, because the conformed text appeared somewhere.
Byte-witnessed on D_80126B5C: planned twice ("draft 's32'" and "draft ''"), output unchanged, gate
PLUMBING. Now block-scope rows are accepted only from a real `extern` with a non-empty base type.
TWO BANKS CAME FROM TODAY'S OWN FINDINGS:
- func_8012E014's single 0-arg call site took --cast-zero-arg-calls (built this morning for
func_801789AC's 138 sites).
- §99 HELD A THIRD TIME: K&R conversion dissolved func_80163534's s32->u16 narrowing across 1,072
declarations, leaving only a caller-neutral pointer change on the last param.
STILL UNBANKED (measured blockers, not guesses): func_8013B6A0 + func_8013B598 CC1-FAIL in the _o0
split; func_80133298 + func_80135260 + func_8012E014 genuine DIFF (match_one MATCH did not hold
whole-binary = TU-context); func_80138C60 parse-order (an extern referencing a body-local typedef
declared after it); func_80177DA8 prototype-vs-K&R mismatch.
|
||
|
|
ee55bd5cae |
feat(phase-29): func_801330E0 banked — conform_decls taught to read K&R definitions
THE GAP: conform_decls could not parse a K&R definition at all — it exited "no DEFINITION found, refusing to guess". Honest, but §43 (a narrow param declared K&R-style, producing the in-place `sll $a2,$a2,16` tell) is a documented, load-bearing idiom here for exactly the narrow-param class. So the tool was silently refusing the drafts that most need it: a whole idiom family read as "nothing to conform" (R32 coverage). THE SUBTLE PART IS PROMOTION (C89 6.3.2.2). A K&R definition promotes each narrow parameter, so a prototype in scope must declare the PROMOTED type or gcc rejects the pair with `argument 'x' doesn't match prototype`. That is why the fleet prototype reads `s32 a2` for a parameter the definition declares `s16` — and why emitting the declared (unpromoted) type would RE-CREATE the narrow-param conflict this tool exists to remove. The parser now promotes s8/u8/char/s16/u16/short -> s32 and float -> f64, pointers untouched, and reports (R32) any K&R param with no declaration. RESULT: byte-true signature read as `void func_801330E0(void *, s16 *, s32)`; the only real change vs the fleet's 973 declarations was param_1 `s16 *` -> `void *` (a pointer shape, caller-neutral). 973 sites / 973 files rewritten, axis complete. Gate: verified 1 / failed 0, d19c9580 BYTE-IDENTICAL. R22 clean-fleet 140 passed / 0 failed of 140. Reach 138 x 110 ins = 15,180 templated instructions unlocked for the family sweep. |
||
|
|
ad57c16e61 |
feat(phase-29): func_8014CF04 + func_8015D1B8 banked; conform_decls had 3 defects R22 caught (§98)
THE BANK: the T14 PLUMBING census showed func_8014CF04 blocking THREE drafts at once. Conforming its
decl axis banked func_8014CF04 + func_8015D1B8 (func_80135260 is a genuine DIFF, agreeing with its
independent SESSION-21 diagnosis). R22 clean-fleet 140/140; report fail-closed green (dedup 1886/0,
0 NON_MATCHING). fn-count 317,896 -> 317,898; distinct 66,110 -> 66,111.
BUT THE AXIS WAS A 1,748-FILE T2 WRITE SET (the --check per-form counts read "1"), and R22 came back
139/140 -- TWICE -- on a change the per-binary gate called BYTE-IDENTICAL. Three defects (§98):
1. THE REGEX CROSSED NEWLINES. `[^;]*` matches '\n', so a match starting at a DEFINITION line ran
past the `{` to the first `;`, swallowing `s32 func_8014CF04(...) {` PLUS the register pin on the
next line and replacing both with a prototype -> undefined reference. Fixed to `[^;{\n]*`: a
definition is now unmatchable by construction.
2. IT REWROTE INSIDE COMMENTS (H5, 3 lines). Now scans cdecl._mask() and rewrites by SPAN (R33 --
that length-preserving primitive already existed for exactly this).
3. THE REAL CAUSE -- IT ASSUMED ONE SIGNATURE FITS THE FLEET. ov_SC07_006 carries its own banked
definition with a DIFFERENT byte-true signature ((s32,s32,void*) vs (s32,void*,void*)), under a
decl marked "per-overlay-local decl (byte-true sig); do NOT re-macroize". That is the Phase-16
loose-typing wall inside a tool that structurally assumes it away. NEW RULE: a TU that DEFINES the
function owns its own declarations; a fleet axis is meaningful only for CONSUMING TUs. This grows
more common as banking proceeds -- every overlay that banks a function becomes an exception.
Then the R32 completion assertion cried wolf on its own by-design skip ("HALF-AXIS -- DO NOT BUILD"
for a complete rewrite): an assertion must be exact about its DOMAIN, not just its condition. Scoped
to consuming TUs -> 1,747 sites, 1 excluded by design. Also hardened to PLAN -> VALIDATE -> WRITE;
the refusal path had aborted mid-write while claiming nothing was modified, creating the very
half-axis §85 calls a guaranteed break.
META (R22's premise, re-earned): after fixing defect 1 I EXPECTED R22 to pass; it failed again for an
unrelated reason, and an individual `make build` of the failing binary SUCCEEDED by reusing objects
the clean run rebuilds. An incremental pass does not refute a clean-tree failure.
|
||
|
|
1670fe293c |
feat(phase-29): func_8016B6BC 0/137 -> 137/137 — it was a TYPE-CARRY failure, not a wall
The family that failed its sweep twice (once in the 274-member batch, once after the §91 guard) and looked like the §86 bimodal 'some families just don't template' case. It was not. DIAGNOSIS (§59 + §93): spliced ONE sibling and read cc1 directly. It reported `c`, `v`, `off` undeclared — ordinary locals that ARE declared in the remapped body. cc1 says 'undeclared' because it aborted the declaration block at an unknown TYPE and every later declaration fell out with it. Read the FIRST error, not the loudest: a visibly-declared variable reported undeclared means suspect its type. THE LIFT MUST BE TRANSITIVE. Lifting the type the body names directly (M8_8016B6BC) changed nothing — still 0/137. The real set was four, found by following each definition's own references: M8_8016B6BC -> Prim_8016B6BC -> Vtx_8016B6BC (named only inside Prim's body) -> DVec_8016B6BC. lift_types.py --apply, byte-gated ALONE first (neutral, d19c9580 unchanged), then swept. RESULT 0/137 -> 137/137, zero failures. R22 clean-fleet 140/140. cookbook §94. Cost of not diagnosing: this family sat recorded as 'doesn't template' across two sessions. Pointed at one sibling's real stderr it took under an hour and was worth 137 members. |
||
|
|
2985f306d9 |
feat(phase-29): func_80179B74 banked — conform_decls cleared it as pointer-type-only (R22 140/140)
1,600 decl sites across 523 files, in THREE different forms (s16 *a0 / short * / short *p), conformed to the byte-true 'void func_80179B74(u16 *p)'. conform_decls ALLOWED this one: the arity is unchanged, so no 0-arg call site can break, and the return is unchanged, so §85's precondition does not apply. Gated BYTE-IDENTICAL; R22 clean-fleet 140/140. The tool has now refused one axis (func_8015B950, correctly — it would have broken 138 binaries) and cleared another (this one, correctly). Both verdicts held under R22. |
||
|
|
f459f53083 |
feat(phase-29): func_8015B950 banked — ONE cast unlocked the 925-site axis that broke 138 binaries
The same axis that broke 138 of 140 binaries an hour ago now lands clean, because conform_decls' NEW arity guard located the actual obstruction instead of leaving me to absorb it by hand. THE OBSTRUCTION WAS ONE LINE. Conforming `extern s32 func_8015B950(void)` -> `(s32 arg0)` turns every 0-arg CALL SITE into `too few arguments`. My hand attempt assumed those were spread across the 926 TUs and would need 926 casts (the func_8012AAAC precedent, where it really was 137 separate sites). They are not: there is exactly ONE call, in `src/shared/engine_core.h`'s `DEFINE_func_8015BEE4()` macro body — expanded into all 926 TUs by the preprocessor. func_8015BEE4 is a THUNK: `return func_8015B950();` with $a0 passing straight through from its own caller. So the 0-arg call shape is byte-CORRECT and must be preserved, not fixed — `return ((s32 (*)(void))func_8015B950)();` keeps it exactly (§17a-1; gcc folds the cast of a known symbol to a direct jal, and the s32 return is unchanged so the thunk's value still flows). Sequence: 1 cast -> conform_decls --apply (925 sites, R32 completion assertion: 0 remaining) -> gate BANKED byte-identical -> R22 clean-fleet extract-all 139/139, check-all 140 passed / 0 failed. The draft's 2 callee-decl conflicts (func_801725A4, func_80147078) dissolved with the axis. Worth 37,398 templatable ins; the ×137 family sweep is next. |
||
|
|
2cc49d0310 |
feat(phase-29): SESSION-21 — func_8012AAAC banked via the §81 carve chain (R22 140/140)
The first jtbl-routed bank of the session, and it validates the whole chain end-to-end:
1. jtbl_carve SPLIT-TABLE repair (this session): jtbl_801D7FB0 28 -> 50 words (112 -> 200 B),
authorized by func_8012AAAC's own `sltiu 0x32`.
2. NEW FIX — SINGLE-TABLE PREDECESSOR: adding a second table to a subseg whose existing carve was
single-table lost the FIRST table's start entirely (new_offs has only the new one;
overlay_jtbl_addrs cannot see the old one because its owner is banked and extract PRUNED the
stub .s; and single-table carves persist no tables= to rebase). The span then failed its own
validator with "first must equal the span start" — the invariant naming the missing entry.
A single-table carve spans exactly its one table, so ITS SPAN START *IS* THAT TABLE'S START:
inference, not persistence, so it also works for spans carved before tables= existed. This is
the RECOVERABLE half of the documented func_8013F350 lesson (that one was a pre-§8e merged
DOUBLE — two tables, no record, genuinely unrecoverable).
Result: ov_SC01_077_a JTBL_PADS := 0,0 tables=+0x0,+0x14. Carve alone byte-gated BYTE-IDENTICAL
BEFORE the bank was attempted (§81 step 2).
3. ARITY axis, all-or-nothing: 1,244 decl sites / 1,240 files `(void)` -> `()` + an R32 completion
assertion (old-form remaining: 0).
4. ONE call-site cast: the definition lands at line 811 and a 0-arg call sits at 822, so gcc sees
the prototype and rejects it — `((void (*)(void))func_8012AAAC)()` (§17a-1; gcc folds the cast
of a known symbol to a direct jal). Only 1 of the 1,386 fleet-wide 0-arg call sites needed it:
the others see only the `extern ()` decl, which permits a 0-arg call.
DIAGNOSIS NOTE: the failure read CC1-FAIL with only a warning visible under make. Running the
pipeline stage-by-stage (cpp | cc1 | maspsx | jtbl_rodata_pads | as) put it on cc1 rc=33, and cc1's
own stderr named it exactly: "too few arguments to function func_8012AAAC" at line 994. Isolating
the stage was what turned an opaque Error 33 into a one-line fix.
R22 clean-fleet: extract-all 139/139, check-all 140 passed / 0 failed.
family_sweep correctly REFUSED this exemplar (§53: a jr-family must route through
jtbl_family_bank.py; "a 0% from this path would be a TOOL artifact, not a wall") — the ×137 member
sweep is the next step and needs a clean tree, which this commit provides.
|
||
|
|
2ce6c5fade |
feat(phase-29): SESSION-21 — 3 family exemplars banked + the §85 return-axis widen (R22 140/140)
BANKED (whole-binary byte-gate, the sole arbiter): func_8014D2A0 (80 ins ×138) · func_80158638
(87 ×138) · func_8016B6BC (94 ×138). Stubs in ov_SC01_077: 150 -> 147, 0 new stubs.
R22 CLEAN-FLEET: extract-all 139/139, check-all 140 passed / 0 failed. dedup 1886/0,
0 NON_MATCHING (G4). Fleet 81.7% instr / 69.3% distinct-code / 89.52% fn-count.
- WAVE STOPPED at Drew's request with 15/24 agents returned, ALL 15 status=match. Only the
completed drafts were gated; in-flight ones are still being written (§90d).
- PRE-GATE, both oracles, all 15: match_one MATCH + reloc_verify ALL RESOLVED. Routed 7 plain /
8 to the §81 jtbl carve chain.
- THE BLOCKER, MEASURED: 7 of 7 plain drafts failed PLUMBING, 0 DIFF, 0 compiler walls — the same
shape as SESSION-20's T0.2. §58b applies: the draft sig is byte-TRUTH (it MATCHed), the header
decl is the stale stub-era guess, so conform the DECLS.
- §85 RETURN-AXIS WIDEN, all-or-nothing: 3,471 decl sites / 1,736 files, precondition verified
(ZERO callers consume the return => byte-neutral by construction) + an R32 completion assertion
(old-form decls remaining: 0). func_8014D820's s32 return is load-bearing — forcing `void` costs
2 instructions (302 vs 304), so the decls had to move, not the draft.
TWO HONESTY ITEMS:
1. I REPORTED "0 of 7 banked"; the true number was already 2. My diagnostic pass printed only
lines starting with "- func_" (the failures) and hid its own successes while I read it for
error text. A script that prints only failures cannot tell you it succeeded — the R32
silent-skip shape aimed at my own instrumentation. Ground truth is the stub count (§55b(3)).
2. A REAL FINDING fell out of that mistake: same drafts, same tree, minutes apart — gate_stage's
full ladder banked 0/7 while bare harvest_verify banked 2/7. The LADDER REGRESSED two drafts
the bare gate accepts (§19's "sig_unify regresses already-canonical drafts", one level up, and
the exact mirror of SESSION-20's missing-ladder false 33%). Neither "always ladder" nor "never
ladder" is right — run both, let the byte-gate arbitrate. One build per draft.
OPEN: func_8014D820 still a stub — after the widen its error moved from `conflicting types` to an
assembler-stage failure, not finished diagnosing. Recorded as open, NOT as a wall.
|
||
|
|
09b1993059 |
feat(phase-29): T0.7 sweep (104 members) + BEHEMOTH func_8017D2DC banked (1,586 ins)
T0.7 — the §86 one-member probe applied to the remaining FREE families: 9 LIVE / 6 DEAD / 5 unstaged. The three highest-value families by raw size (18,084 / 11,234 / 10,880 ins) all probed DEAD — the probe skipped them instead of burning ~400 gate cycles rediscovering it. Swept the 9 live: 104 banked, 8 of 9 families fully cleared (func_8017BEF8 has 8 stragglers). BEHEMOTH 2 of 3: func_8017D2DC (1,586 ins, ov_SC01_001) MATCHED and BANKED — closed in ONE agent round, pin-free. Verified independently (R14): match_one MATCH (1586 ins). §81 carve chain: the agent predicted step 1 unnecessary; jtbl_carve REFUSED (the subseg already hosts a .rodata carve and the new table's start != span start). The refusal was RIGHT and is the instruction to run step 1 — jr_isolate_all --only (2 fns/1 object) -> BYTE-IDENTICAL, then jtbl_carve -> BYTE-IDENTICAL, then the ladder banked it. R22 clean-fleet 140/140 BYTE-IDENTICAL; tools-health OK; dedup 1886/0; 0 NON_MATCHING (G4). Fleet: instr 81.5 -> 81.6% · distinct-code 69.0 -> 69.1% · fn-count 89.49 -> 89.52%. |
||
|
|
772b5c4e02 |
feat(phase-29): the RETURN-axis fleet widen — 2 more families unlocked (cookbook §85); 140/140
Continues the "see why and try again" chain. Diagnosed all 4 T0.2 failures to 4 DISTINCT causes: func_8013D53C 240x123 §84 derived-offset remap bug -> BANKED (previous commit) func_8012CC88 105x137 §73/§30#2 RETURN-axis conflict -> BANKED here func_8014D12C 93x137 §73/§30#2 RETURN-axis conflict -> BANKED here func_80144090 154x136 LENGTH-DRIFT (+13 B, ~3 ins long) -> genuine codegen, real work THE FAILURE THAT TAUGHT THE FIX: widening only src/shared/engine_core.h banked the member in the TARGET overlay and BROKE ov_SC01_077 (R22 139/140) — the source overlay carries its OWN local `extern void func_X(...)` decls, so a shared-header-only widen puts them in direct conflict. The per-binary gate passed while breaking a binary it never built (§63/§61: a T2 write set is only provable by R22). A half-done axis is a guaranteed break, not a smaller win. THE FIX: do the WHOLE axis — 3,668 `extern void` decl sites across 2,688 files widened to `s32`, 0 remaining (R32 completion assertion). Precondition verified first: 0 callers consume the return value, so the widen is byte-neutral by construction. R22 clean-fleet 140/140 BYTE-IDENTICAL; tools-health OK; dedup 1886/0; 0 NON_MATCHING (G4). MY OWN ERROR, recorded (§85 trap): I first spot-checked ov_SC01_077 with `make build | grep | head; echo rc=$?` and read rc=0 as success — that is the exit status of `head`, not make, and the output had no BYTE-IDENTICAL line. I reported a false BYTE-IDENTICAL in the interim. Assert on the SUCCESS STRING, never on $? after a pipe. Fleet: instr 80.6% (10,589,503) · distinct-code 68.3% (3,846,656) · fn-count 89.19%. |
||
|
|
3ffff74f5b |
feat(phase-29): BEHEMOTH #3 func_8017F510 CRACKED — 97 -> MATCH (1,511 ins), pin-free
- BANKED into ov_SC03_006 through the whole-binary byte-gate (G3/P9); R22 clean-fleet 140 passed, 0 failed of 140. Verified independently before believing the agent's report (R14): match_one -> MATCH (1511 ins), then harvest_verify -> BYTE-IDENTICAL. - DISTINCT-CODE 3,813,512 -> 3,815,023 = +1,511, EXACTLY the function's instruction count and the ONLY distinct-code movement of the entire session. Reach is ×1 by sig, no propagation -- which is precisely why it moves the metric propagation cannot touch. instr 80.3%, fn 89.18%. - EFFORT EXPERIMENT (Drew): behemoths #1-#3 were worked at High; this is the first at xHigh (Opus 5 agent). It closed a residual the lower tier had fully localized but could not move, and that 3,663 permuter candidates at base 97 had failed to improve by even 1. - MECHANISM -> cookbook §76: the allocno CLASS (local vs global) is the dominant regalloc lever and C reaches it ONLY through declaration scope and variable reuse -- unreachable by statement order, expression shape, pins, or random search, which is exactly why the permuter was spent. (1) `otp` per emit ARM: 4 deaths -> four 1-death local pseudos (local-alloc.c:472); its second-order effect via global.c:668-671 (local placements re-marked as HARD regs for global-alloc) had made the target's otp=$a0 STRUCTURALLY IMPOSSIBLE, visible as hard-reg 4 in the `;; N conflicts:` tail of the .greg dump. (2) `cb` reused as the unlit rgbc temp: refs 27->39 lifts its global.c:594 allocno_compare priority past `tp`, flipping the 3-colouring -> 97 -> 10. (3) one shared `rgbw` temp -> 10 -> 2. (4) mny-before-my + one zero-byte __asm__ at the head of the tri cull block -> MATCH. - THREE CORRECTIONS TO MY OWN BRIEF, all byte-evidenced: residual B was never a scheduling residual (it fell out free with lever 2 -- a register grant seen as a schedule diff); residual A is RTL EXPANSION order, proven with -fno-schedule-insns AND -fno-schedule-insns2 (source order survives both -- that attribution primitive is the reusable bit); residual C had no single c3 seed (c3 has no lever of its own, it moves only when cb out-ranks tp). - FIXED a latent SHARED-HEADER defect, pre-existing and unrelated to the draft: src/shared/engine_types.h closed its include guard at line 1174 of 1259, leaving 11 typedefs / 85 lines OUTSIDE the guard since the crack-wave lift. A TU including it twice re-declares them and gcc-2.7.2 rejects a repeated typedef even when identical -> `conflicting types for Blk16_956C`. Guard moved to EOF; byte-neutral. - ARTIFACTS TRACKED (R20): .run/giants/s19_func_8017F510_b4.c (130-line dossier) + s19_f510_report.md, whose ~50-row do-not-re-buy table is arguably worth more than the match, + the s19_* analysis tooling. - STRETCH, MEASURED: func_8017F5B4 (1,511 ins, ov_SC02_031) has a DIFFERENT h_exact -- not a dedup sibling, a family_remap TEMPLATE candidate off the b4 source. |
||
|
|
398e653c92 |
fix(phase-29): §75a class-B remedy is the FULL §17a-1 pair — decl AND call-site cast
- The K&R-decl-only probe was HALF the fix, and cc1 said so exactly:
ov_SC01_001_jr_801734BC.c:2616: too many arguments to function `func_8012F14C'
`()` dissolves the DECLARATION conflict (the failure class moved PLUMBING -> CC1-FAIL), but the
composite type after the TU's earlier `void func_8012F14C(s32);` prototype is still 1-param, so
the macro's 3-arg CALL is a hard error. Reproduced by hand-splicing the macro into
ov_SC01_001 and reading real cc1 stderr rather than trusting the classifier's `Error 33`.
- FIX = the other half of §17a-1 (what cast_call_sites.py does, and what §20 established): cast
the call site so it does not depend on the TU's prototype at all —
((void (*)(s32, s32, s32))func_8012F14C)((s32)&mtx, (s32)&vec, (s32)&out)
gcc-2.7.2 folds a cast of a KNOWN function symbol back to a direct `jal`, so the bytes are
unchanged. Decl stays `()` so it cannot conflict in either declaration order.
- BYTE-GATED on the full existing radius: ov_SC07_006 7ca772be · 007 b3b95547 · 011 9885af74 —
all BYTE-IDENTICAL.
- LESSON for §75a class B: the remedy is the PAIR, never the decl alone. A decl-only change moves
the error from `conflicting types` to `too many arguments` and looks like a new wall.
|
||
|
|
8f63c1a8e0 |
probe(phase-29): §75a class-B — K&R () for the carried func_8012F14C decl (func_80174CB0)
- The class-B arity split (1944 `(s32)` vs 968 `(s32,s32,s32)`) blocked func_80174CB0 in 131 of 134 overlays: the macro carried the 3-param prototype, the failing TU declares the 1-param one FIRST (ov_SC01_001: TU@328 vs instantiation@2616), so cc1 sees two prototypes of different arity and rejects. - Per cdecl.compatible's MEASURED gcc-2.7.2 behaviour a no-prototype `()` is accepted in BOTH orders here: prototype-first + ()-second always; ()-first + prototype-second when no parameter is altered by default promotion -- and all three args are s32, which does not promote. So one K&R decl should satisfy both populations regardless of where each TU declares it. - Call site UNCHANGED (`func_8012F14C((s32)&mtx, (s32)&vec, (s32)&out)`): with a K&R decl the args pass under default promotions, and s32 args are unaffected -> same codegen. - BYTE-GATED on the full existing radius before extending: ov_SC07_006 7ca772be · 007 b3b95547 · 011 9885af74 -- all BYTE-IDENTICAL. The extend result is the real test of the prediction. |
||
|
|
364ddd7055 |
fix(phase-29): ENGINE_SHB — the carried-#define gap that capped func_80165CA0 at ×3
- CAUSE (measured, not guessed): the 132 extend failures were `undefined reference to 'SHB'` --
a LINK error, not a type conflict. SHB is not a symbol; it is a file-scope
`#define SHB(x) __asm__(...)` sign-extension barrier. A body's preamble can carry `#define`s
as well as `extern`s, but extraction lifts only the externs -- so the `#define` was left behind
in the source overlay. In ov_SC01_077 it sits literally BETWEEN the two carried externs and the
instantiation:
extern s32 D_8011D030;
extern s32 D_80126728;
#define SHB(x) __asm__ __volatile__("" : "=r"(x) : "0"(x))
DEFINE_func_80165CA0()
The other 132 overlays DO define SHB -- ~300 lines further down the file (stub @4462 vs
#define @4781 in ov_SC01_001), i.e. BELOW the splice point, so the preprocessor never expands
it and cc1 emits a call to an undeclared `SHB`. Pure ORDERING; nothing was missing.
- Also explains why the 3 current members are EXACTLY the 3 files carrying the __volatile__ SHB
spelling: that define is the function's own preamble, still sitting above its instantiation.
- FIX: engine_core.h owns the barrier as ENGINE_SHB (distinct name, so the overlays' own SHB --
which exists in BOTH a volatile and a non-volatile spelling -- can never collide), and
DEFINE_func_80165CA0's 7 uses now call it. Volatile form: what the 3 banked members compile
with today. The body is now self-contained wherever it is instantiated.
- BYTE-GATED the full existing blast radius: ov_SC01_077 d19c9580 · ov_SC01_000 9052dc0e ·
ov_SC07_006 7ca772be -- all BYTE-IDENTICAL.
- This is the dedup_propagate counterpart of Phase-27's family_remap._carry_macros (§75b).
|
||
|
|
2fcb8de6bf |
fix(phase-29): normalize func_8014F468 to the fleet-canonical s32 (unblocks the ×138 reach) + §75
- THE PROPAGATION CAP WAS A MINORITY-SPELLING SOURCE OVERLAY, byte-censused:
extern s32 func_8014F468(void); 1710 | s32 func_8014F468(void) 134 <- fleet canon
extern void func_8014F468(void); 20 | void func_8014F468(void) 4 <- the outlier
and ALL 4 `void` definitions are ov_SC07_{006,007,010,011} — the overlay the F3E8 body was
banked from. dedup_propagate carries the source overlay's file-scope externs into the shared
macro VERBATIM, so the macro inherited `extern void` and the 134 overlays that define the
symbol `s32` rejected it. Propagation landed on exactly that 4-overlay island.
- The exclusion message ("byte-diverge / irreconcilable") is provably the wrong cause: members
are selected BY h_exact, so all 138 are byte-identical by construction. It is a COMPILE
conflict, never a byte one (same defect family as §68's mislabel, same tool).
- NORMALIZED the 24 minority occurrences to s32 (4 definitions + 19 overlay externs + the 1
line in the freshly-authored macro). func_8014F468 is a pure inline-asm $sp-switch trampoline
— no C-level value flow — and 134 overlays already PROVED s32 is byte-correct for the
identical function. Fleet is now uniform: 1730 extern s32 + 138 s32 defs, 0 `void`.
- BYTE-GATED the complete blast radius (the 4 instantiators of DEFINE_func_8014F3E8):
ov_SC07_006 7ca772be · 007 b3b95547 · 010 d7b5875d · 011 9885af74 — all BYTE-IDENTICAL.
- cookbook §75: census the carried extern before believing an exclusion message; prefer a
majority-spelling source overlay; always pass --recover; after normalizing use dedup_extend
(the body is already a macro) not dedup_propagate --addr.
|
||
|
|
10ea5ff653 |
feat(phase-29): propagate the widen batch — func_8014D4C0 ×138; func_8014F3E8 ×4 (cause measured)
- func_8014D4C0 (84 ins) PROPAGATED ×138: all 138 overlays rebuilt byte-identical, group
E_func_8014D4C0 registered. 84×138 = 11,592 ins.
- func_8014F3E8 (32 ins) propagated ×4 only (the ov_SC07_{006,007,010,011} island), 134
overlays excluded one at a time.
- TWO FINDINGS, both measured:
(1) THE FIRST RUN'S "drop" WAS A FLAG OMISSION, NOT A WALL. Without --recover,
dedup_propagate takes the historical all-or-nothing path on the first culprit overlay,
so ONE divergent member cost the whole group (×0). With --recover, Part A excludes just
the culprit -> ×4 instead of dropped. Always pass --recover on a targeted --addr run.
(2) THE EXCLUSION CAUSE IS A MINORITY-SPELLING SOURCE OVERLAY, not byte divergence. The
sigs prove all 138 members share ONE h_exact (2ccf344d), so nothing diverges in bytes.
The macro carries the source overlay's `extern void func_8014F468(void);` while the
fleet census is 1,710 `extern s32` + 134 `s32` definitions vs 20 `extern void` + 4
`void` definitions -- and all 4 `void` definitions are ov_SC07_{006,007,010,011}, i.e.
the source overlay I banked from is the OUTLIER. The macro inherited the minority
spelling and silently capped its own reach at that island.
- => the fix is NORMALIZATION (24 occurrences), not a reconciliation engine; the follow-up
commit flips the SC07 minority to the fleet-canonical s32 and re-propagates.
- R22 clean-fleet: make clean && extract-all && check-all -> 140 passed, 0 failed of 140.
|
||
|
|
1c0d29d91d |
feat(phase-29): §30#2 widen batch — func_8014F3E8 + func_8014D4C0 banked; §73 (the two axes)
- FLEET WIDEN (T2, one edit): extern void -> extern s32 for func_8014F3E8 + func_8014D4C0 across src/** (16 decls in engine_core.h + 5,079 in 3,459 overlay .c; 0 `extern void` left, 0 pre-existing `extern s32`). Scope re-verified against the tree first (R14/R35): the SESSION-18 counts reproduce exactly and no decl exists outside the `extern void <name>` shape in any .c/.h under src/. - BYTE-NEUTRALITY OF THE WIDEN ISOLATED FIRST: ov_SC07_006 7ca772be + ov_SC01_000 9052dc0e BYTE-IDENTICAL before splicing any draft (ov_SC01_000 chosen because it instantiates the two return-CASTING macros — the only sites a decl's return type could touch codegen). - BANKED into ov_SC07_006 (both ×1, both reach ×138 by sig: single h_exact across 138/138): func_8014F3E8 (32 ins) on gate 1; func_8014D4C0 (84 ins) on gate 2. - FINDING -> cookbook §73: the widen fixed only HALF the conflict. A def-side self-decl conflict has TWO independent axes — RETURN (fleet macro-widen, T2, R22-mandatory) and PARAMS (canonical param types + casts at each USE, T0, no fleet edit). func_8014D4C0 failed the first gate on the PARAM axis (canon `void*` vs draft `u16*`); the §17a-1 move applied to the def's own signature banked it with nothing outside the draft touched. Diagnose the axis before reaching for the expensive fix. - R22 clean-fleet: make clean && extract-all && check-all -> 140 passed, 0 failed of 140. make report: dedup 1884 validated / 0 failed, C1 coverage 239039/239039, 0 NON_MATCHING (G4). Fleet 80.0% instr / 67.7% distinct / 89.02% fn-count (the ×138 propagation is the value). |
||
|
|
ba35785ec4 |
feat(phase-29): bank func_801777BC (59 ins) x138 — the giv-init base-register lever (§70)
- MATCH (59 ins), real-TU verified by the agent before handing back (cc1 rc=0, 59/59, 0 diffs). - Propagated x138 with ZERO exclusions -> confirms the ×3 cap on func_80174CB0 was purely the carried-extern collision: a body with no externs propagates clean. - R22 clean-fleet 140/140, 0 failed. dedup-check 1884 validated / 0 failed, C1 coverage complete. - FLEET CROSSES 80.0% instr-weighted (10,509,526 / 13,141,652); fn-count 89.02%; distinct 67.7%. - THE LEVER (cookbook §70): residual was ONE instruction, addiu $t0,$t1,0xC vs $t0,$a0,0xC -- a giv based on a copy of the param. Reading gcc-2.7.2 loop.c/cse.c proved the natural form can never emit the target: cse.c:make_regs_eqv makes the copy canonical (it out-lives a0) and loop.c:update_reg_last_use won't extend a0's last-use (giv-init UID >= max_uid_for_loop). Fix: walk the PARAMETER itself, so record_initial sees the biv init as hard reg (reg:SI 4), valid_initial_value_p accepts it (precondition: no calls), and emit_iv_add_mult bases the giv on $a0 -- yielding both required instructions free. - META: this compiler-source reasoning was done by an ORDINARY Opus 5 drafting agent, unprompted -- the tier Phase 23 reserved for Fable5. One data point, recorded as such; the cheap action is to give routine drafting agents the gcc source path. |