Commit Graph

486 Commits

Author SHA1 Message Date
Drew T bd768d8a4e docs(phase-29): record the func_8017BF14 round-2 agent in the checkpoint
Opus 5 (xHigh) closing the last 45/4763. Checkpoint records its deliverables, sandbox, the
round-1 residual map (a)/(b)/(c) with the measured do-not-re-buy constraints, the #1 move
(variable-REUSE sweep across c0..c3/a0v..a3v -- the one §76 lever class round 1 never swept,
and the exact merge that took func_8017F510 from 97 to 10), and the cheapest unrun probe (the
§76 attribution primitive on residual (c)).
2026-07-25 17:13:53 -06:00
Drew T f5f8dec5ee docs(phase-29): the cold-start experiment — func_8017BF14 to 45/4763; §79; full R22 discharged
- COLD-START RESULT (verified independently): 4763/4763 ins, 45 mismatched = 99.06% byte /
  99.94% structural, exact frame, exact opcode histogram. NOT a match; nothing banked (45 != 0,
  the byte-gate is the sole arbiter). The residual is 3 register-grant ties, 0 structural
  divergence. Named next move: variable REUSE across c0..c3/a0v..a3v, the one §76 lever class
  the pass never reached.
- MY BRIEF'S PREMISE WAS WRONG BY CONSTRUCTION -> §79. I chose this target partly because §71's
  callee-set fingerprint returned 0.00 against every matched giant = "a genuine cold start". But
  the function makes ZERO jal calls, so its callee fingerprint is EMPTY and §71 CANNOT FIRE:
  0.00 meant "cannot answer", not "no relative". Grepping the target's DATA symbol D_800A5E60
  found the matched func_8017BEBC at once -- func_8017BF14 is the 4-light-box member of the same
  renderer family whose 3-box sibling func_8017D960 was matched hours earlier. RULE: when §71
  returns an empty/zero-overlap callee set, fall back to DATA-symbol fingerprinting; an empty
  fingerprint must never become a cold-start brief.
- NEW LEVER (§79): THE FRAME LAYOUT IS A DECLARATION-ORDER ORACLE. gcc-2.7.2 assigns stack slots
  to spilled pseudos in pseudo-number order, and pseudo numbers follow first use ~ declaration
  order -- so the target's frame map reads back its source's declaration order. Moving ONE line
  took 73% -> 84% structural and brought all 127 slots into exact correspondence.
- §76 CONFIRMED AT SCALE: the entire -62 length residual was ONE allocno-class decision (c0..c3
  declared inside the cull blocks -> 1-death local allocnos -> global.c:668-671 removes those
  regs from the global pool -> r1lo spills), 52% -> 93%. An __asm__ ref-dial reached the same
  spill and scored WORSE -- declaration scope beat the ref dial again.
- PIN NUANCE: pins are safe on a 0-jal function (§74's hazard cannot arise), 4 pins took
  94% -> 99%; but §72 held -- pins 5 and 6 made it worse.
- EFFORT ANSWER, HONEST: xHigh from a genuine cold start on a 4,763-ins giant bought the decode,
  the exact length, the exact frame and 99.06%, and did NOT close. Budget a SECOND pass at this
  size: the first buys structure, the last ~1% is register grants.
- FULL R22 DISCHARGED: make clean + extract-all + check-all -> 140 passed, 0 failed of 140 (run
  after the agent finished, per the deferral recorded in the pool commit). tools-health OK.
2026-07-25 17:08:02 -06:00
Drew T a1f1a948af feat(phase-29): h_norm-remappable pool — +4,919 ins banked, no cracking, no agent
- BANKED (each whole-binary byte-gated; make check-all -> 140 passed, 0 failed of 140):
  func_80130D48 ×4 (1,064) · func_8018F3E4 (478) · func_8018B3D0 (478) · 13 × 223-ins siblings
  of func_8017E6D8 (2,899). distinct-code 3,833,224 -> 3,838,143 = 68.0% -> 68.1%.
- TWO OF MY OWN COUNTS COLLAPSED UNDER SCRUTINY BEFORE I ACTED ON EITHER (R14/R35):
  "func_8017CA80's family = 102 unmatched" was really 13 -- my count tallied family members whose
  NAME appears as a stub anywhere in the fleet, not instances actually unmatched (a semantics
  error, not arithmetic). "56,267 ins remappable" was really 8,114 -- 86% was the known -O0 /
  deferred set (the func_80144B9C whale, the func_8013C414 cluster). I nearly recommended a
  target on the first number.
- THE §77 CARRY GAP IS THE DOMINANT COST OF MECHANICAL REMAP: 23 of 27 first-pass CC1-FAILs.
  NEW .run/giants/s19_remap_tu.py sources the preamble from the exemplar's OVERLAY TU (the block
  between the previous top-level `}` and the def), applies family_remap's own substitution map,
  and adds the two includes match_one never adds -> 21 drafts went 0 MATCH -> 14 MATCH. The 13
  223-ins siblings share ONE exemplar, so a single preamble fix cleared all 13.
- USEFUL ASYMMETRY: func_8018F3E4/func_8018B3D0 FAILED match_one but BANKED in the whole-binary
  gate -- the real TU supplies decls the standalone compile lacks. A match_one CC1 FAIL is not a
  reason to skip the real gate on a remapped sibling.
- RESIDUAL 3,195 ins, causes NAMED not guessed: func_8017D5C0 (952) matches standalone, gate
  reports `conflicting types for memcpy` = the §58 red-herring (a warning from an unrelated TU
  position; SESSION-14 hit the same label and the true cause needed a hand-splice + real cc1
  stderr). func_80166994 ×3 + func_8016A290 ×4 still CC1-FAIL after the TU carry.
- FULL R22 DEFERRED DELIBERATELY: make clean wipes asm/, which the concurrently-running BF14
  agent reads on every probe. This batch changed only src/*.c (no config), so check-all is sound;
  the clean R22 must still run once the agent finishes.
2026-07-25 16:11:38 -06:00
Drew T 95684f9807 docs(phase-29): reconcile checkpoint — 3 behemoths + a 5-member family banked
HEAD commit:1012, 22 commits, R22 140/140 (8x). Fleet 80.5% instr; distinct-code 3,833,224 = 68.0%
(+19,712 ins this session, ALL from the three behemoths; propagation contributed +0). Banked
table updated with func_8017D960's 5-member family. Open actions re-ranked: 6 behemoths remain
(func_8017E778/func_8017CD9C are DONE as part of behemoth #2's family).
2026-07-25 15:49:22 -06:00
Drew T f9a2de3edd feat(phase-29): BEHEMOTH #2 func_8017D960 CRACKED (1806 -> 0) + its 5-member family = 16,690 ins
- CRACKED pin-free at xHigh (Opus 5 agent), then ALL FOUR family siblings banked via §40 remap,
  each MATCHING FIRST TRY: ov_SC03_090 (the crack) · ov_SC03_089 · ov_SC03_104 ·
  func_8017E778 @ ov_SC03_091 · func_8017CD9C @ ov_SC03_102 (the last two cross-address).
  Verified independently before believing the report (R14): match_one MATCH (3338 ins), then
  harvest_verify BYTE-IDENTICAL on all five binaries, then R22 clean-fleet 140/140.
- METRICS: distinct-code 3,816,534 -> 3,833,224 (+16,690) = 67.7% -> 68.0%, the first
  percentage-point movement in that metric all session. instr-weighted 80.3% -> 80.5%.
  Session distinct-code total +19,712 ins, ALL from the three behemoths; propagation gave +0.
- MY BRIEF WAS WRONG IN AN INSTRUCTIVE WAY -> §78. I said a negative length drift means "missing
  instructions". The 4 absent instructions were 4 emit tails × 1 nop -- delay slots the target
  could NOT FILL because the register it wanted was still live. otp at function scope has 4
  deaths -> fails local-alloc.c:472 -> global allocno in $a2 -> via global.c:668-671 pushes tp
  off $a1 -> the 0xFFFFFF mask is free early -> maspsx hoists it into the slot. Declaring otp
  PER EMIT ARM fixed the whole drift in one edit (3334->3338, 1806->333).
  SECOND TIME IN ONE SESSION a "structural"-looking residual was an allocno-class choice (the
  first: F510's "scheduling" transposition, §76). A nop present in the target but absent from the
  draft is usually a register-liveness fact, not missing code.
- TWO MORE REUSABLE FINDINGS (§78): gcc-2.7.2 fold NEVER leaves a literal first in an `|` chain
  (7 parenthesisations, all reassociate) -- so `or acc, var, K` first in the target means K was a
  VARIABLE in the source, an asm->source read that retires a whole sweep family. And "make it a
  variable" has TWO separable effects (fold-opacity vs a new allocno): a fresh short-lived local
  fixes structure and wrecks allocation (690 mismatched, damage ~300 ins away); reuse a busy one.
- ECONOMICS: 9 levers, each necessary by drop-one ablation, and 5 of the 9 were read straight off
  the MATCHED relatives func_8017F510 (cracked earlier today) and func_8017CA80. Crack the
  smaller family member first -- it is a lever library for the larger one.
- NEW TOOL .run/giants/s19_remap_family.py: family_remap + the §77 preamble carry in one step
  (reproduces the exemplar's FULL file-scope preamble with the tool's own substitution map
  applied). Took the 4 siblings from "4 rounds of CC1 FAIL each" to MATCH first try, ×4.
2026-07-25 15:48:54 -06:00
Drew T a5954802bf docs(phase-29): record the behemoth #2 agent run in the checkpoint
Opus 5 agent (xHigh) cracking func_8017D960 (3,338 ins, ov_SC03_090). Checkpoint records the
prize (5-member h_norm+h_seq family => ~16,690 distinct-code ins), the MEASURED baseline
(3334 vs 3338, 1806 mismatched, LENGTH-DRIFT/-4) with an explicit correction of the misleading
'one fold OR-chain error left' summary, the sandbox constraints, and the assets it was briefed
with (func_8017F510 matched today = same family at half size; func_8017CA80 matched in the same
TU; §76 allocno-class levers; the -fno-schedule-insns{,2} attribution primitive).
2026-07-25 15:15:26 -06:00
Drew T d8c96a5164 docs(phase-29): reconcile checkpoint — 2 behemoths banked, +3,022 distinct-code
HEAD commit:1009, 19 commits, R22 140/140 (7x). Fleet 80.3% instr; distinct-code 3,816,534
(+3,022 this session, ALL from the two behemoths; every propagation win contributed +0).
Open actions re-ranked: behemoths are now the PROVEN distinct-code lever, with the 8 untouched
ones listed and the func_8017D960 '4 off' summary corrected to its measured 1,806-mismatched
LENGTH-DRIFT reality. Notes that a FRESH behemoth at xHigh is the clean effort experiment,
since F510 was a High-effort continuation.
2026-07-25 15:02:57 -06:00
Drew T 130b9407b1 feat(phase-29): func_8017F5B4 (1,511 ins) banked MECHANICALLY off behemoth #3 — ~0 agent tokens
- func_8017F5B4 @ ov_SC02_031 shares behemoth #3's h_norm AND h_seq (96fe0455c344 /
  9a6bd2b91fd4) with a different h_exact = the same instruction stream differing only in masked
  reloc fields. The §40 family_remap case exactly, so NO agent was spent: family_remap
  --addr 0x8017F510 --from ov_SC03_006 --to ov_SC02_031 --to-addr 0x8017F5B4 substituted 52
  per-overlay symbols correctly on the FIRST invocation.
- match_one -> MATCH (1511 ins); harvest_verify --binary ov_SC02_031 -> BYTE-IDENTICAL;
  R22 clean-fleet 140 passed, 0 failed of 140.
- DISTINCT-CODE 3,815,023 -> 3,816,534 (+1,511). With behemoth #3 that is +3,022 distinct-code
  instructions from the two behemoths, versus +0 from every propagation win this session.
- ALL the work was PREAMBLE, none of it the body -> cookbook §77. Four CC1 FAIL rounds, each
  naming one construct the extractor drops: (1) multi-line `typedef struct {...} PolyGT4;` --
  family_remap's backward walk accepts a line only if it STARTS with extern/typedef/comment, and
  a multi-line typedef ENDS with `} PolyGT4;`, so the walk halts there AND LOSES EVERYTHING ABOVE
  IT; (2) hence the file-scope extern block above the #define BOXTEST/ATTEN block; (3) the
  exemplar's own #include lines (PolyFT3/PolyFT4 live in engine_types.h).
- THIRD CONFIRMATION TODAY OF ONE DEFECT CLASS, NOW ACROSS TWO TOOLS. §75b found
  dedup_propagate dropping a file-scope #define and PREDICTED the generalisation; family_remap
  then dropped a typedef, an extern block, and the includes. RULE (§77): after any mechanical
  template/propagate step, diff the exemplar's full file-scope preamble against what the tool
  emitted. A CC1 FAIL on a remapped sibling is a PREAMBLE report until proven otherwise -- it
  says nothing about whether the remap was right.
- Artifact preserved: .run/giants/s19_func_8017F5B4_remap.c
2026-07-25 15:02:37 -06:00
Drew T e3b51454bd docs(phase-29): reconcile checkpoint — behemoth #3 banked, no job running
HEAD commit:1007, 17 commits, R22 140/140 (6x). Fleet 80.3% instr; distinct-code 3,815,023
(+1,511 from the behemoth, the only distinct-code movement of the session). func_8017F510
added to the banked table.
2026-07-25 14:41:26 -06:00
Drew T 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.
2026-07-25 14:41:08 -06:00
Drew T a3582209fc docs(phase-29): record the running behemoth agent in the checkpoint
An Opus 5 agent (xHigh) is cracking behemoth #3 func_8017F510 (1,511 ins, ov_SC03_006,
reach x1 = pure distinct-code). Checkpoint now names its deliverables (.run/giants/
s19_func_8017F510_b4.c + s19_f510_report.md), its sandbox constraints (no src/config/docs,
no commit, no make), the re-measured baseline (1511/1511, 97 mismatched, ADDRESSING/cse,
99.5% structural), the A/B/C residual breakdown, and the byte-proven fact that the permuter
is spent on it. Also records Drew's effort experiment: behemoths #1-3 ran at High, this is
the first at xHigh.
2026-07-25 13:53:43 -06:00
Drew T 216b53b9bc docs(phase-29): reconcile the SESSION-19 checkpoint to the final state
func_80174CB0 sweep complete (×135), R22 140/140 (5× this session), tree clean, no background
job running. HEAD commit:1004, 12 commits. Fleet 80.3% instr / 67.7% distinct / 89.18% fn-count.
+46,433 ins banked this session with zero function drafting. Open action 1 closed; the ranked
list now opens on FRESH CRACKS (the only distinct-code lever, needs /effort ultracode).
2026-07-25 13:44:55 -06:00
Drew T 6e9cbda926 feat(phase-29): func_80174CB0 ×3 -> ×135 (§75c pair); the census predicted the residual exactly
- dedup_extend banked 132 / 179 planned across 135 binaries: func_80174CB0 VERIFIED in 132,
  FAILED in exactly 3. 123 ins × 132 = 16,236 ins.
- THE PREDICTION HELD TO THE OVERLAY. The blocker breakdown across the original 134-binary sweep
  was 131 class-B (func_8012F14C arity split) / 3 class-A (func_80012ABC, census 73 s32 vs 7
  s16). Fixing class B alone banked 132 and left 3 -- precisely the class-A set. A diagnosis that
  predicts WHICH members will still fail, and is right, is much stronger evidence than one that
  explains failures after the fact; same shape as §75b predicting that the 3 stuck members would
  be exactly the 3 files carrying the __volatile__ spelling of SHB.
- FLEET: instr-weighted 80.2% -> 80.3% (10,539,723 -> 10,555,959); fn-count 89.14% -> 89.18%;
  distinct-code 67.7% UNCHANGED (propagation moves coverage, not distinct-RE -- fresh cracks are
  the only lever there). dedup 1886 validated / 0 failed, C1 coverage 239,604/239,604.
  0 NON_MATCHING (G4).
- R22 clean-fleet: make clean && extract-all && check-all -> 140 passed, 0 failed of 140.
- cookbook §75c committed with this batch. The 3 residual overlays need the 7 `s16` func_80012ABC
  decls normalized -- worth 3 overlays only, so do it only if trivially cheap.
2026-07-25 13:44:24 -06:00
Drew T a999f0badd docs(phase-29): REFRESH the SESSION-19 checkpoint (it had gone stale mid-session)
Drew caught that I paused with a stale checkpoint — the block still read HEAD commit:0996 /
80.1% / R22 3x and predated the ENGINE_SHB x135 result, the dedup_extend include-stripping
bug + fix, and §75a/§75b/§75c. Stale is worse than absent; per-task commits are not a
substitute. Refreshed with: the banked table (4 fns, +30,197 ins, zero drafting), the six
cookbook entries, the in-flight func_80174CB0 sweep + explicit recovery instructions if it
did not finish, the ranked open actions (fresh cracks = the only distinct-code lever), and
an explicit list of the five errors I made this session.
2026-07-25 13:37:53 -06:00
Drew T 3bbfe21596 feat(phase-29): func_80165CA0 ×3 -> ×135 via ENGINE_SHB; +22 fns ×1; §75b (the carried-#define gap)
- dedup_extend banked 157 / 478 planned across 135 binaries: func_80165CA0 (99 ins) ×135
  (~+0.10pp) + 22 other functions ×1 picked up in the 3 overlays the first sweep excluded.
- FLEET: instr-weighted 80.1% -> 80.2% (10,525,534 -> 10,539,723, +14,189 ins); fn-count
  89.09% -> 89.14%; distinct-code 67.7% (unchanged — propagation moves coverage, not distinct-RE).
  dedup 1886 validated / 0 failed, C1 coverage 239,472/239,472. 0 NON_MATCHING (G4).
- R22 clean-fleet: make clean && extract-all && check-all -> 140 passed, 0 failed of 140.
- §75b — extraction lifts `extern`s but NOT file-scope `#define`s, so a body matched with a macro
  in its preamble compiles only where that overlay's define is in scope ABOVE the splice point.
  Signature is a LINK error (`undefined reference`), never `conflicting types`: an unexpanded
  SHB(x) parses as a call to an undeclared function. The diagnosis PREDICTED the membership —
  the 3 stuck members are exactly the 3 files carrying the __volatile__ spelling of SHB, i.e. the
  function's own preamble still sitting above its own instantiation.
- R14/R35 IN ACTION: the full-sweep census REVERSED the ranking I had just committed. I put the
  class-A normalization first at "~+0.13pp if it reaches ×138"; measured across all 134 it is
  worth 3 overlays (func_80012ABC 3, func_8012F14C 131). The cheap win was the one I ranked
  third. §75a's "collect across the whole sweep before scoping" earned itself immediately.
- NEXT (specified, not guessed): func_80174CB0 is class B on func_8012F14C (1944 `(s32)` vs 968
  `(s32,s32,s32)`). The macro carries the 3-param prototype; the failing TU declares the 1-param
  one FIRST (ov_SC01_001: TU@328 vs instantiation@2616) -> two prototypes, different arity ->
  reject. Per cdecl.compatible's MEASURED rule a K&R `extern void func_8012F14C();` is accepted
  BOTH ways round here (prototype-first + `()`-second always; `()`-first + prototype-second when
  no param default-promotes, and s32 does not) -> it should satisfy both populations in either
  order. One-line probe on the carried decl, byte-gate the 3 members, then extend.
2026-07-25 13:18:36 -06:00
Drew T 1f9289f790 docs(phase-29): SESSION-19 CLOSING CHECKPOINT — supersedes the SESSION-18 block
Fleet 80.1% instr / 67.7% distinct / 89.09% fn-count; R22 140/140 (3x this session);
dedup 1886/0; 0 NON_MATCHING. Banked func_8014D4C0 + func_8014F3E8, both x138.
Carries forward the ranked open actions (func_80174CB0 class-A-on-the-target-side,
func_8012F14C class-B arity probe, func_80165CA0 class C, the 7 ov_SC01_077 capped fns,
func_8014D820 = the Fable5 case, fresh cracks = the only distinct-code lever), the
behemoth table (now noting func_8017D960's pins are §74-audited safe), and the hazards
(+ the new one: dedup_extend refuses a dirty tree, H4).
2026-07-25 13:01:05 -06:00
Drew T 39127535da feat(phase-29): func_8014F3E8 ×4 -> ×138 via dedup_extend; §75a enumerates the exclusion classes
- THE NORMALIZATION PAID: one `dedup_extend --binaries <the 134 excluded>` banked 134/400
  planned -- func_8014F3E8 VERIFIED in ALL 134 -> ×138 total (+4,288 ins), no drafting at all.
  A 4-overlay island became full fleet reach because the carried extern finally agreed.
- FLEET: instr-weighted 80.0% -> 80.1% (10,509,526 -> 10,525,534 = +16,008 ins, exactly the
  projected 84×138 + 32×138); fn-count 89.02% -> 89.09%; distinct-code 67.7% (unchanged, as
  expected -- propagation moves coverage, not distinct-RE). dedup 1884 -> 1886 validated / 0
  failed, C1 coverage 239,315/239,315. 0 NON_MATCHING (G4).
- R22 clean-fleet: make clean && extract-all && check-all -> 140 passed, 0 failed of 140.
- §75a — "PROPAGATION-CAPPED" IS AT LEAST THREE CLASSES, and the classifier names which:
    A minority spelling   `conflicting types` + a lopsided census (1710 vs 4) -> normalize, cheap
    B genuine arity split same message, TWO real populations (func_8012F14C: 1944 `(s32)` vs
                          968 `(s32,s32,s32)`) -> the §29 loose-typing wall; a K&R `()` MAY satisfy
                          both but is order-dependent -> PROBE, do not normalize on a guess
    C missing extern      `undefined reference to 'SHB'` -- a LINK error, unrelated to types
  The discriminator is one grep (census the symbol cc1 named) and it decides the remedy.
- R14 self-correction recorded: I predicted func_80174CB0 was "the identical class". It is class
  A in KIND but on DIFFERENT symbols, and different ones per overlay (func_80012ABC at
  ov_SC01_000 where the minority is on the TARGET side; func_8012F14C at ov_SC01_001 = class B).
  One member's error names one blocker, not the blocker set -- collect the classifier's line
  across the whole sweep before scoping a fix.
- func_80174CB0 (×3) and func_80165CA0 stay capped, each now with a named cause and a named next
  probe -- not a wall verdict.
2026-07-25 13:00:00 -06:00
Drew T 6f9860c46a docs(phase-29): §74 — pin-safety audit; the 5-pin behemoth draft is SAFE (open action #3)
- AUDITED .run/giants/s18_func_8017D960_b2.c (pins $25 $17 $19 $20 $21) WITHOUT recompiling:
  the SESSION-18 match_one object survives and cmp proves its t.c is this draft.
- VERDICT SAFE. The corrupting form of the §72 hazard is a CALLER-SAVED pin ($25=$t9) whose
  live range spans a jal — gcc-2.7.2 does not save/restore an explicit-register variable
  across a call. Byte-checked: exactly 3 jal, all at 0x2c-0x50; first pin write at 0x58 =>
  NO call after the pins are established. Corroborated by a token census of the C (every
  call-shaped token after line 270 is a file-local macro: gte_*, BOXTEST, ATTEN, CLAMP80).
- The observed excess writes (2/3/3/5/5 vs 2 assignments each + 1 epilogue lw) are the BENIGN
  §72 mode: gcc using the pinned reg as scratch before the pinned value lands (lui/lw/addiu on
  $20, with addu t9,s4,zero routing r1's value out through it). Nothing live was clobbered.
- cookbook §74: the reusable audit (objdump the surviving object; compare jal addresses against
  the first pin write; expect writes == assignments + 1 epilogue restore) + the standing rule —
  prefer a callee-saved register for any pin outliving a call; a caller-saved pin across a jal
  is a real wall verdict, not a drafting slip.
2026-07-25 12:28:14 -06:00
Drew T 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).
2026-07-25 12:24:30 -06:00
Drew T 5d19a48236 docs(phase-29): SESSION-18 CLOSING CHECKPOINT — supersedes the stale mid-session block 2026-07-25 12:00:36 -06:00
Drew T ceff685a8c docs(phase-29): the carry fix banks x3 not x138 — carried externs must be reconciled per-target-TU 2026-07-25 00:13:53 -06:00
Drew T f109b55441 docs(phase-29): func_8014F3E8 MATCH + the §30#2 widen recipe (15 header + 3349 src decls, all-spellings trap) 2026-07-25 00:10:25 -06:00
Drew T 00b6448f4e fix(phase-29): dedup_propagate — the "overlay-local TYPE (the real cap)" skip was a MISLABEL
compiles_standalone() returned a bare False and the caller attributed EVERY failure to the
overlay-local type cap. The dominant real cause is undeclared FILE-SCOPE EXTERNS: the body
references extern decls living outside the extracted def block (func_80174CB0: 22 of them;
carrying them makes it compile cc1 rc=0).

- compiles_standalone now returns (ok, stderr); the skip is classified by actual cause:
  "missing file-scope extern (CARRY-FIXABLE): <names>" vs "overlay-local TYPE (the real cap)".
- FLEET SIZING (--auto-from ov_SC01_077 --check-only): 7 skipped, ALL 7 carry-fixable, 0 genuine
  type-cap. Three of them (0x80142B2C/0x801535F4/0x80155800) are on the Phase-21 backlog list whose
  note ALREADY said "macro-extern-injection frees them x134 (~+0.3%)" -- never built, because the
  mislabel told every later session they were the type wall. A wrong label cost ~4 phases.
- also: func_80174CB0's local Mtx_/Svec_ typedefs swapped for the canonical shared MATRIX/SVECTOR
  (byte-identical layouts); ov_SC07_006 still BYTE-IDENTICAL 7ca772be.
- value behind the real fix: the 7 (~+0.3pp) + func_80174CB0 x138 (16,974 ins, ~+0.13pp), ~0 tokens.
- _carry_externs itself is SPEC'd but NOT built here: it writes 138 overlay files (§63 class) and
  wants a fresh session with an R22 budget. func_80174CB0 (banked x1) is the test case.
2026-07-24 23:50:38 -06:00
Drew T ab67b6980e docs(phase-29): func_80174CB0 banked — the §65g verdict was a wrong signature, not a missing transform 2026-07-24 23:42:08 -06:00
Drew T 16089c7659 docs(phase-29): wave batch 1 — sig-targeted drafting works (MATCH in 55s/32k); blocker walked to the §30#2 macro-widen 2026-07-24 23:38:41 -06:00
Drew T dcab9c68b0 docs(phase-29): fix the recorded waiter recipe — pgrep -f self-matches, use a captured PID 2026-07-24 22:07:44 -06:00
Drew T d9a602e49e docs(phase-29): correct the SESSION-18 checkpoint's round-robin claim in place 2026-07-24 22:07:15 -06:00
Drew T c937f494c6 docs(phase-29): qualify §66d-4 — profile diversity is a lottery ticket (0-for-1 on func_80140958) 2026-07-24 22:06:56 -06:00
Drew T 2bf82c5708 docs(phase-29): note the ILS-watcher anti-pattern (tail -f monitors stay armed after the result) 2026-07-24 22:06:11 -06:00
Drew T fe53cfba82 docs(phase-29): func_80176218 — hoist closed (indexed-global idiom); residual now -2 ins 2026-07-24 21:53:28 -06:00
Drew T 83c96f6c6c docs(phase-29): func_80176734 — dual-width idiom is necessary but not sufficient (+2 ins, frame cascade) 2026-07-24 21:51:46 -06:00
Drew T 8399599dba docs(phase-29): func_8014D820 close=9 is a 3-profile MEASURED floor; backlog updated 25->9 2026-07-24 21:50:30 -06:00
Drew T a3ef424b9f docs(phase-29): func_80176734 — confirm the dual-width load diagnosis, name the C idiom 2026-07-24 21:48:21 -06:00
Drew T b7107d7bcc docs(phase-29): the structural-bucket mis-route + an honestly-sized backlog re-check for P30 2026-07-24 21:47:37 -06:00
Drew T 3ca322402f docs(phase-29): the 84-98 block is provably search-only (11 attempts); round-robin measured both ways 2026-07-24 21:42:43 -06:00
Drew T d67a6cd492 docs(phase-29): SESSION-18 checkpoint — func_8014D820 25->9, §67 + the profile round-robin finding 2026-07-24 21:40:34 -06:00
Drew T aa7ec67496 docs(phase-29): func_8014D820 12->10 (cse) ->9 (reader fix of a permuter regression) 2026-07-24 21:38:12 -06:00
Drew T 4e0bc0ab92 docs(phase-29): pre-clear func_8014D820's banking path (blocker_probe before the match) 2026-07-24 21:35:23 -06:00
Drew T 3f0c31a1c2 docs(phase-29): func_8014D820 16->14->12 (weight-varied ILS); the block-reorder dead end recorded 2026-07-24 21:32:38 -06:00
Drew T 34417179df docs(phase-29): func_8014D820 25->14 by reading — the §67 arg-copy PLACEMENT lever
- PROBE ANSWERED (the SESSION-17 open item): a0's first use is body-line 41, a1's is 28
  -> use order ALREADY matched the target's birth order while birth order was inverted.
  The §31 RC-1/RC-2/RC-3 first-use-order hypothesis is REFUTED for this class; decl order
  is inert too. Both retired, do not re-buy.
- ROOT CAUSE (byte-read): gcc schedules the arg->pseudo entry copies as ordinary in-block
  insns and hoists an unconstrained one to the earliest slot. Mine raced `move $s4,$a0` to
  idx 2, which freed $a0 to become the early load temp (target: $v1) and left the target's
  idx-12 load-delay slot unfilled. The "wrong temp reg", the mirrored `sw $sN`/`move $sN`
  prologue and the +1 instruction were ONE defect in three costumes.
- THE LEVER (cookbook §67, written in-session per R30): an UNPINNED launder
  `__asm__ __volatile__("" : "=r"(pv) : "0"(p));` placed at the statement where the target's
  copy lands, later uses rewritten to pv. Zero instructions. Prerequisite: collapse redundant
  pointer aliases first (the two-pseudo split made gcc serve the first use from the incoming
  arg reg). Placement is the knob and is NOT linear -- sweep 3-4 anchors (3-statement plateau).
- 25 -> 16 by reading; permuter_ils (REGALLOC, 10x180s) 16 -> 14 in cycle 1 then x9 unchanged
  (§66d-3: a repeat means stop). Its edit is semantics-preserving (hoists desc.y+0x10) and
  cleared the idx 271/272 cluster. Seeds tracked: s18_func_8014D820_close{16,14}.c.
- MEASURED NEGATIVES recorded so they are never re-bought: pinning the laundered var to $s4
  (pre-stages via $t0, 305 ins); pinning the reused temp t to $3 (287/303); an artificial
  "r"(t) dependency (inert -- gcc still hoists); laundering after the beqz (305); dropping the
  a2 pin (29); wholesale pos/desc reorder or sinking z0=ent->z (+1 ins).
- NOT banked (G3) -- residual 14 in 2 clusters: idx 21/22 scratch $v1 vs $a0, idx 84-98 the
  desc.y/currentLocationId schedule. SCHEDULE-weighted ILS running from the close=14 seed.
- Also measured: func_80140958 260/260 54 - func_80176734 371/371 56 - func_80176218 328 vs
  327, whose +1 is NOT §67 (it hoists a global address into an extra callee-saved $s6 that the
  target rematerializes -> the §17 array-decay lever).
2026-07-24 21:27:14 -06:00
Drew T 76d5d5437d docs(phase-29): SESSION-17 closing checkpoint — next session starts on the giants (full handoff) 2026-07-24 20:55:30 -06:00
Drew T 11e6895e52 docs(phase-29): the Ghidra-C prefetch is measurably spent — 0.51pp ceiling across 87 overlays
- Measured locally (no MCP): per-overlay stubs that are substantial AND uncached AND undrafted = what
  an import would unlock. Best single overlay 6,062 ins (0.05pp); fleet total 67,116 ins (0.51pp).
- Task 5's greedy cover (+1.59pp for ov_SC06_018) was a snapshot of a CONSUMABLE and has been consumed
  by the s14/s15 waves + permuter runs. What remains is overlay-unique tail across 87 overlays, each
  needing a server restart + a human /mcp for ~0.01pp.
- Ranked: giants ~+1.3pp (seeds ready) > func_801463A0 ~+0.11pp > the ENTIRE prefetch ~+0.51pp at 87
  human-gated imports. The prefetch is now the worst lever on the board.
- R14 on myself: a 3-line ls of two dirs made func_8014032C look never-attempted; the full glob found
  6 drafts. The fleet figure (0 cached+never-drafted at live>=100) stands. Same failure as §66c, twice
  in one session — prefer the glob over a hand-listed pair.
2026-07-24 20:47:48 -06:00
Drew T 75f56b16b8 docs(phase-29): func_801463A0 — both §H antidotes inert (2 byte-recorded negatives)
- Balanced-if diamond and a zero-ins memory barrier both leave it at exactly 100/36, unchanged.
  Why: §H kills a fold ACROSS A JOIN; here both uses are adjacent statements in the same basic
  block, so there is nowhere for a fresh cse table to start.
- State: a standalone MATCH (101 ins) exists with direct-symbol u16 decls, blocked ONLY by the
  canonical "extern u8 D_80126BE0[]" living inside a DEFINE_func_* macro body (engine_core.h:19813).
  Exits: (a) demacroize = x1 trap (+101 ins, forfeits x138), (b) change the shared decl = T2 /
  §63 disaster class, (c) a C form that keeps u8[] and defeats the address CSE = the open question.
  +13,938 ins if (c) lands. Do not re-buy (a) or the two antidotes.
2026-07-24 20:41:27 -06:00
Drew T 3d26cef9ad docs(phase-29): func_801463A0 driven to standalone MATCH; one named blocker left (§H antidote)
- 3 falsified hypotheses, then MATCH (101 ins) with direct-symbol scalar decls. The length gap was
  the target re-materializing "lui $at,%hi(sym)" per scalar store while array/struct forms let gcc
  CSE the address into a register (1-ins stores) -> mine was exactly one instruction short.
- Remaining blocker NAMED: the TU's canonical decl is "extern u8 D_80126BE0[]" INSIDE a DEFINE_func_*
  macro body (engine_core.h:19813), so the matching u16 form gives conflicting types in the real TU
  (real cc1, via rtu_match --stderr-out).
- demacroize would clear it but banks x1 (+101 ins) and forfeits x138 — a trap, not a win. The right
  exit is the §H CSE address-fold antidote (balanced if/else diamond, zero asm) so the canonical u8[]
  decl stays and the bank propagates x138 (+13,938 ins). Both draft forms preserved.
2026-07-24 20:39:57 -06:00
Drew T 8940347855 docs(phase-29): func_801463A0 — the §65c root cause found and fixed (invented _s symbol aliases)
- rtu MATCH (101 ins) vs gate reject, baseline intact -> divergence had to be in a relocation.
  All 9 jal targets agreed; of 15 data symbols the target uses, the draft referenced 14 — missing
  exactly D_80126BE8.
- CAUSE: the draft declared D_80126BE0_s / D_80126BE8_s — `_s`-suffixed aliases NO symbol table
  defines, invented because D_80126BE0 was already declared at a different type in the same draft.
- MECHANISM CORRECTED (§65c refinement): rtu over-claims not merely because it is relocation-masked
  but because it COMPILES WITHOUT LINKING — an unresolvable extern is invisible to it by construction.
  Cheap general guard: diff the draft's symbol set against the target .s's %hi/%lo/jal set before
  gating (one comm over two greps; found this in seconds).
- FIXED: real symbols referenced, duplicate u8[] decl dropped, store re-expressed via &. Residual is
  now an ORDINARY near-miss (100 vs 101 ins, 36 mismatched, regalloc/fold) -> permuter fuel.
  Draft preserved at .run/giants/s17_func_801463A0_symfix.c.
2026-07-24 20:32:52 -06:00
Drew T 04450d75a0 docs(phase-29): the 2 typedef-blocked drafts are §65g-class — 0/2, blockers stack 3 deep
- Did it properly: per-TU provided set via cdecl.typedef_names(tu_path) (217/215 names; it takes a
  PATH), strip_provided_typedefs dropped 2/2 typedef lines from each draft, then the DRIVER's ladder.
  pass 1 banked 0/2; src/ restored exactly.
- The stack: func_80156670 S8 -> B8 -> conflicting types for D_801270A8 (a DATA extern);
  func_80174CB0 MATRIX/SVECTOR -> conflicting types for func_80012ABC (a callee conflict
  cast_call_sites did not clear). cc1 reveals only the first layer each time (§65).
- NEW STATIC-ORACLE BLIND SPOT (R34 earning its keep): func_80156670's data conflict is CC1-ONLY —
  the static oracle says `none` while real cc1 fails. First cc1-only case measured (SESSION-16 was
  36/36 agreement). A `static: none` verdict is not evidence a draft is clean.
- Stripped drafts kept at .run/perm_s17j/ so the next attempt starts 3 layers in. ~+0.4pp if solved.
2026-07-24 20:25:50 -06:00
Drew T f8534a6dbb docs(phase-29): SESSION-17 final checkpoint — 3 banks ×138, driver verified, spine refreshed 2026-07-24 20:02:02 -06:00
Drew T 25a02d6940 feat(phase-29): propagate 2 integration banks ×138 — fleet 79.7 -> 79.9% instr, R22 140/140
- func_8012B4B8 (84) + func_80169228 (105) propagated via targeted --addr (--check-only first,
  never --auto-from): 138 overlays byte-identical, 2 new dedup groups, ~+26,082 ins.
- R22 clean-fleet: check-all 140 passed, 0 failed of 140. Fleet fn-count 88.90 -> 88.98%.
- The 3 non-banks are diagnosed, not guessed (blocker_probe, both oracles agree): func_801463A0 is
  a real-cc1 MATCH in its own TU that the gate still rejects (§65c rtu-vs-gate divergence, link-level);
  func_80156670/func_80174CB0 carry "drop when banking" typedefs textually identical to the canonical
  ones. Blockers STACK — stripping the cc1-named typedef exposed the next (S8->B8; MATRIX->a callee
  conflict). Remedy named: strip ALL shared-provided typedefs, then run the DRIVER's ladder.
2026-07-24 20:01:31 -06:00
Drew T a34acfd91f docs(phase-29): func_80176218 271->110 (converged) — giant queue complete; the refreshed spine points at integration next 2026-07-24 19:39:27 -06:00
Drew T 5c4325f9cc docs(phase-29): SESSION-17 closing checkpoint — every giant driven to its permuter floor; 3 seeds preserved
- func_80176734: 76 -> 57 in cycle 1, then flat x9 (converged). Completes the queue.
- Seeds TRACKED at .run/giants/s17_*.c — the allowlist covers .run/giants/*.c but NOT subdirectories,
  so they go at the top level (the R20 trap: a subdir would have left them untracked and one
  git clean from gone).
- Queue state: 80177940 BANKED x138 | 8014D820 25 (toolkit exhausted -> Fable5) | 80140958 56 |
  80176734 57 | 80176218 271 (never run). ~+1.3pp instr if the four crack.
2026-07-24 19:32:26 -06:00