Commit Graph

839 Commits

Author SHA1 Message Date
Drew T 9696f8fb14 docs(phase-31): S59 FINAL checkpoint — six harness defects, six lanes, and the rules they earned
1,342 banked, 140 commits, open stubs 6,575 (main 1,493 / overlay-md 5,082).

The session's one lesson, measured six times: every lane that looked like the models
underperforming was a harness defect — an -O0 oracle nothing ever passed, a lane
retired on a card-size verdict, carve machinery nothing fed, a poisoned main baseline
that made 737 drafts read as bad, a soft 429 killing 44-72% of shards at turn 1, and a
stager consuming one bit of one verdict.

Records what landed (jtbl island split + gate automation, the -O0 census and unlock,
the new main and distill lanes, two RED binaries fixed, the throughput settings with
their probe evidence, the portable-workflow doc), seven rule candidates for PhaseEnd
approval, the ranked open threads with the A-prop residual named and sized, and a
resume procedure that starts from campaign_status.py and verifies from the process
rather than the file.
2026-08-25 00:25:46 -06:00
Drew T a0dc0d9b09 docs(phase-31): S59 second checkpoint — agents returned, every fix landed and verified
Records the per-type answer to 'can the waves draw and bank this now', the four
commits that landed after the agents returned, three rule candidates for PhaseEnd
(a card may not name a lever the knowledge base lacks; draw-time bankability; a
budget is part of the harness), and the ranked open work from the agents' docs.
2026-08-24 12:50:29 -06:00
Drew T a664636ce2 docs(phase-31): S59 checkpoint — the three S58 tooling lanes, each worked to a verdict
jtbl: the 154-A island split is byte-proven (one config line + jr_isolate_all --only),
with the object-level sh_size control a green SHA cannot give; four md_*/main tool
blindnesses fixed; one delay-slot instruction short of the first bank, logged.
o0: the census (167 real -O0 of 14,400; 116/14,148 ins stranded), the handoff's
md_MAIN_003/011 refutation shown to be itself wrong, the never-wired -O0 oracle fixed,
and 79 unbankable card-draws across 19 waves stopped at the source.
tells: restored and pinned to band 5-80 — the lane gap was a card-size gap, and 235
is refuted as the cause by the recorded pre-gate verdicts.
Three Fable agents in flight; their briefs and every fact they were given are recorded
here so a crash costs a re-spawn, not the knowledge.
2026-08-24 11:52:58 -06:00
Drew T 52b9e84208 docs(phase-31): S58 handoff — the three open tooling lanes in working detail
jtbl (36,685 ins, but 150 of 177 groups are singletons): Fable's review says the fix is SMALLER
than proposed — ONE inserted .rodata carve line plus jr_isolate_all --only. No _pre piece (it
cannot build), no ld_interleave change (the native script is already rodata-first). Harden
parse_config FIRST: it corrupts md_*/main configs on disk before erroring, which is why
jtbl_carve now hard-refuses them. The ox study's negative control is misattributed — build a
fresh one.

o0/cc1 (6,564 + 6,511 ins): the study is half refuted, and the doc header says which half.
md_MAIN_003/011 do NOT carry the -O0 fingerprint; the 311 files that contain $fp are the real
population. The unanswered load-bearing question for both is whether the EXISTING gate can bank
them unchanged — a lane that drafts what the gate cannot accept has already cost two sessions.

tells (86,602 ins): removed from drafting on four waves of evidence. aprop_autodraft is NOT the
destination (4.2% overlap, checked after I asserted it three times). The live hypothesis is
cookbook §235, the phantom symbol — one wave with it in the brief tests it cheaply.
2026-08-24 10:29:18 -06:00
Drew T e05dc116be chore(phase-31): S58 crash-recovery checkpoint + autonomous lane architecture
CURRENT_PHASE.md gains a CRASH-RECOVERY checkpoint (not a fresh-session handoff): what is
running, restart order, the measured fleet/scaling facts, the fixes that must not regress,
and the ordered work queue.

Lanes: drafter (never stop it), gater (restartable), maintenance (free A-prop sibling lane),
stallguard (60s auto-repair). Drafting holds no lock; one narrow draw-vs-gate lock exists
because build_wave_atlas reads corpus.stubs and misreads substituted drafts mid-gate.

main is off the wave critical path — 157 drafts parked to .run/main_queue/ rather than
stalling the gater for another hour on a bisecting whole-EXE rebuild.

api_agent: 5xx retried like 429 (a 502 was abandoning functions at near-19), HTTP_TIMEOUT
420s not 1800 (a hung request parked an agent 30 min), EXTRA_READABLE for tooling briefs,
and bare-directory paths no longer refused against their own granted root.
2026-08-24 00:24:11 -06:00
Drew T e7ebb1cd45 docs+rules(S58): R42 commit-banked-work-immediately, R43 refuse-unsupported-input
R42: gate_main reverted 61 byte-proven overlay banks it could not distinguish from its own
substitution (sweep_parallel gates commit=False by design). Fixed by committing overlay banks
before the main batch, chunking main at 8 to bound bisect cost, and replacing every blind
'git checkout -- src/ config/' with commit-or-refuse in ox_campaign and idiom_serial.

R43: sweep_parallel had an explicit branch admitting main, which cannot be gated incrementally
— wave ab banked 0/105 main cards while its non-main cards banked 94/115 (82%), and the wave
read as a drafting failure. sweep_parallel now refuses main and names gate_main.py.

Also: validate_targets now prefers the card's own addr field (named symbols like SYS_OBJ_F00
were MALFORMED and discarded whole 220-card waves); ox_campaign deals model lanes by
smallest-ratio scheduling (a 73-card wave had put 73 shards on ox and 0 on deepseek);
docs/accelerators.md gains the four vacuous-check defects.
2026-08-23 12:59:59 -06:00
Drew T d97f1c28c5 chore(phase-31): R40 + R41 ACCEPTED by Drew — binding from 2026-08-23 2026-08-23 00:15:52 -06:00
Drew T 73b253240b chore(phase-31): stamp S57 checkpoint HEAD 2026-08-23 00:12:16 -06:00
Drew T cb65a62cad feat(phase-31): S57 external-model bake-off — 4 tool fixes, §205/§206, api_agent harness
An external-model bake-off, not a banking session. Nothing was banked; that is
the next session's first task.

FINDINGS
  - CARD FUEL is the biggest lever, bigger than model choice: the same 10 cards
    went 4/10 -> 9/10 when seed_ref/tu_ref/decl_prior were injected. The
    "60-instruction ceiling" was an artifact of withholding fuel.
  - Sub-50 is near-free: 19/19 verified MATCH at $0.007/function, blind.
    7,724 sub-50 open functions = 73.5% of the remaining set.
  - A free model (stealth/ox-alpha) cracked a 611-ins function and a jtbl
    exemplar, and distilled §206 — whose two negative results were
    independently byte-confirmed before banking.
  - §206 transfers WITHIN a family (40 turns -> 11) but NOT across (56 turns,
    0 compiles). jtbl costs ~40 turns of learning per family, not per class.

TOOL FIXES (all negative-controlled)
  - family_remap.gather_externs: took the first ALPHABETICAL extern across the
    overlay's TUs, carrying two types swapped (sh/lh vs lbu/sb). Now prefers
    the extracted unit's own file. Blocked a 4-member/2,444-ins family.
  - atlas.member_lever: aprop_card was loaded and never read while a bare
    ledger DIFF forced needs-autopsy. PURE now outranks it — rescues 32
    members / 11 families / 3,810 ins.
  - decl_prior._ASM_SYM: the %hi/%lo arm had never fired (0 of 1,210 over four
    waves). jal 306->306 zero regressions, data 0->299.
  - api_agent.py (new): --cards, --brief, --max-cost, nudge loop, 429
    attribution + backoff, transport retry, non-fatal tool faults, and a
    repeated-call guard.

RULES PROPOSED: R40 (exonerate the instrument before attributing a failure to
its subject — seven instances this session) and R41 (a cost/rate/yield number
ships with its denominator — I quoted $0.30 against a $6.31 bill).
2026-08-23 00:12:07 -06:00
Drew T 2c4637450b chore(phase-31): S56 checkpoint — 127 banked, wave AA built and staged (not launched)
Wave AA: 69 cards / 6,539 ins / 8 gate groups, 33 siblings, snapshotted 69/69.
All 69 passed the S46 validity gate pre-draft — the first wave drawn through it
since it was wired into build_wave_atlas, and the honest population negative
control for that gate (zero false refusals; a poisoned card is refused
OUT-OF-RANGE).

decl_prior now contributes 165 DATA rows to the cards (0 on every prior wave,
the §204-E fix). The 49 uncopyable pointer-to-function spellings are marked
`fleet_note` rather than dropped: the consensus is real information, the
rendering is not valid C. NOT fixed at the source — gate_main.typesig is the
banking driver's conflict oracle, so the safe fix is a display-only
pretty-printer in decl_prior, and no index rebuild is needed since the tuple is
what the index stores.
2026-08-18 15:44:55 -06:00
Drew T e9ac4db9ba fix(phase-31): wire the S56 findings into the tools, SETUP.md and memory
Audit after "did you update tooling for those findings" found three gaps
beyond the four committed fixes:

  - R21: docs/SETUP.md had no record of any of it. Adds the "four flow traps"
    table — each trap, its measured cost, and where it is now caught.
  - family_sweep --only had no coverage assertion, so the 3-vs-50 mis-scope
    could recur silently. It now resolves member addrs to their family, always
    prints the coverage line, and refuses when it resolves to zero families.
  - pregate_check modelled the banking driver's typedef strip but never checked
    the consequence. Adds [DROP-RISK] §203 USE-BEFORE-TYPEDEF. R39 NC: flags
    the known-bad splice, 0 false positives on the post-hoist file and all 7
    other wave-Z TUs (first draft read a typedef named in its own comment).

Also corrects §203 and the phase log: the text that banked was the RENAMED
variant, because gate_stage's backlog.save_draft() overwrote the original on
the failed attempt. Bytes are correct (R22 213/213); the claim "draft
byte-unchanged" was not.
2026-08-18 15:32:32 -06:00
Drew T 34b8f772b4 feat(phase-31): wave Z closed — 127 banked, R22 213/213, fleet 96.1/91.8/97.11
Wave Z: 74/75 MATCH, 72 banked first gate, 2 recovered for zero agent tokens
(§203 address-order typedef hoist; §202 alias on a DEFINITION for the §183.3
DEF-side return wall). Sibling sweep re-scoped after --only was keyed on the
atlas gid rather than family_hseq's exemplar: 3 -> 50 banked.

Harvest: 82 gap reports -> 5 laws, 16 rejected, 30 already-covered; the
adversarial verifier killed 7 of 12 claims. §204 written (510 lines).

Tooling, all negative-controlled:
  - the S46 validity gate was off the path for waves T-Z; wired into
    build_wave_atlas where cards are born, with the PRE-DRAFT-ONLY constraint
    documented (it condemns banked work if run later)
  - wave_snapshot honors the card's `sub` (9/9 legacy byte-identical, 66/66
    split-TU recovered)
  - §204-E: decl_prior's %hi/%lo arm had never fired (jal 306->306 zero
    regressions, data 0->299)
2026-08-18 15:25:49 -06:00
Drew T 87a2ed3ad6 chore(phase-31): S54/S55 fresh-session checkpoint — 547 banked, fleet 96.0/91.7/97.07, wave Z staged
Refreshed rather than appended: the previous checkpoint (commit:2542) was outrun by the §201-A fix,
wave Z's redraw and wave Y's harvest, and a checkpoint the tree has moved past is worse than none
because it is believed. Written for a session that has none of this context: what banked, the seven
results that outlive the count, every tool shipped, the eight-step wave-closing sequence, the exact
invocation that fires the staged wave Z, the four known-open near-misses with their attributions,
and the transient-failure recovery that worked five times tonight.

Wave-metrics gains a single six-wave table: 405 drafted, 405 banked or recovered.
2026-08-18 12:41:37 -06:00
Drew T 490fbfba9a chore(phase-31): wave Y checkpoint + wave Z staged (not launched); harvest outstanding on API 529s
547 banked this session, fleet 96.0% instr-weighted / 91.7% distinct / 97.07% fn-count, R22 213/213
twice for wave Y. Wave Z drawn and staged at .run/wave_p31z_workflow.js + .run/wave_z_args.json
(75 cards / 6,517 ins / 8 gate groups) per Drew's instruction not to launch it. Wave Y's harvest is
the one outstanding step of the seven-step closing sequence -- three launches lost every agent to
529 Overloaded at zero tokens; gap reports and target snapshots are on disk and the checkpoint
carries the exact resume invocation.
2026-08-18 11:03:58 -06:00
Drew T b01a61f0ee chore(phase-31): checkpoint refresh after wave X (475 banked, fleet crosses 96.0% instr-weighted) 2026-08-18 09:04:50 -06:00
Drew T f2cc730ae8 chore(phase-31): S54 checkpoint refresh + wave-metrics row for wave W (412 banked, fleet 95.9/91.5/97.04) 2026-08-18 02:20:59 -06:00
Drew T c845e0dcfa chore(phase-31): S54 session checkpoint + wave-metrics rows for U and V
344 functions banked (235 gated heads + 108 mechanical siblings + 1 main), fleet 95.9%
instr-weighted / 91.4% distinct / 97.02% fn-count, R22 213/213 from a clean tree after each wave.
The checkpoint records the five results that outlive the count (Reconcile-inside-the-wave, §192's
main-only pre-gate ladder, §193-A/§194-E's dead card pointer, §195-D's invisible internal j, and the
already-covered majority in every harvest) and the next-session order of operations.
2026-08-17 22:34:42 -06:00
Drew T 7928e7940f docs(phase-31): S54 log — wave T 70/70 banked, 24 leftovers, 49 mechanical siblings, §192/§193, R22 213/213 2026-08-17 12:58:45 -06:00
Drew T 85671bc1f7 feat(phase-31): S54 — wave T selector (--one-per-gid, --rank total) + the pre-gate ladder learns to see overlays (§192)
build_wave_atlas: --one-per-gid collapses same-skeleton siblings to one card and defers
them to <out>.siblings.json for the post-bank family_sweep remap (R32 accounting asserted);
--rank total ranks gate groups by DELIVERED mass (card + deferred siblings). Measured on the
wave-T draw: 6,557 drafted ins carrying 12,709 sibling ins behind 69 of 71 gids = 19,266
instructions of potential for 71 agents, vs 9,985 behind 57 under --rank mass. R39 NC: the
flag is byte-inert on a pool whose gids are unique.

gate_main/pregate_check (§192): three defects that made the pre-gate ladder main-only while
reporting "clean" on overlay slates — (1) resolve_conflicts/substitute hardcoded
corpus.stubs('main') -> per-binary _stubs_for(); (2) sym_of returned the keyword `void` for
every `extern void (*D_x[])(...)`, manufacturing 192 phantom CONFLICTING-EXTERNs (NC over
5,526,100 declarations: 189,301 changed verdicts, 0 regressions); (3) `void f()` and
`void f(void)` were normalized together, costing 40 more phantoms — C89's unspecified-
parameter rule is now gate_main.sig_conflict. §192b: the tool refuses when it substituted 0
files, and prints the per-draft [DROP] reasons it used to compute and discard.

Same overlay slate now reports 2 failures, both real (duplicate typedef; memcpy declared two
ways). Cookbook §192/§192b + index regenerated (585 sections).
2026-08-17 11:00:14 -06:00
Drew T 034c46bc28 chore(phase-31): S53 checkpoint rewritten as a clean fresh-session handoff (161 banked, main 20.4%, §188 correction, 5-step next-session plan) 2026-08-17 10:14:41 -06:00
Drew T c973d0e803 chore(phase-31): S53 checkpoint — record the journal harvest (10 confirmed / 4 weak / 4 rejected) and the §177 correction 2026-08-17 09:56:25 -06:00
Drew T 23985e6b51 chore(phase-31): S53 FINAL checkpoint — 161 banked, fleet 213/213, libgs link refuted (§187), 15 cookbook sections 2026-08-17 01:15:28 -06:00
Drew T 35803ece9a chore(phase-31): S53 log — recovery backlog banked 15, four tool defects fixed, three TU retypes proven 2026-08-16 22:55:19 -06:00
Drew T af7ae913d3 chore(phase-31): S53 checkpoint — 75 banked / 7,400 ins, fleet 213/213, wave S prepared (not started) 2026-08-16 21:07:53 -06:00
Drew T bc669d5407 chore(phase-31): S53 preflight — atlas regen, leftover-draft harvest (34 free MATCHes found), wave R launched 2026-08-16 18:08:46 -06:00
Drew T 9202c5f54e chore(phase-31): S52 final checkpoint — 131 banked, main 293 matched, 5 new tools, cookbook 543->564 2026-08-16 17:46:01 -06:00
Drew T c70f6d4e34 chore(phase-31): S52 closed — 91 banked, wave Q drafted-but-unbanked with a $0 resume path 2026-08-16 10:08:25 -06:00
Drew T 8534c95321 chore(phase-31): S52 final checkpoint — 91 banked, R22 213/213, the UNKNOWN unlock + the 6k doctrine + reconcile-before-gating 2026-08-15 22:12:32 -06:00
Drew T ad2aa6173f feat(phase-31): wave P — 32 main functions banked, main byte-identical (S52)
Wave P was the first full run of the 6k-ins doctrine: 60 cards / 6,589 ins in 2 gate groups,
59/60 claimed and 58/60 independently re-verified MATCH (6,372 ins), reloc_identity 58/58 AGREE
with ZERO symbol errors -- the second consecutive clean wave on symbol identity.

Banking cost a dozen rebuilds and exposed four more gate_main defects plus three regressions of
my own. The tool fixes, all NC'd:
- resolve_conflicts never read a draft's OWN DEFINITION, so the DEF-side wall (a draft defining
  s32 func_X against a TU prototyping void func_X) reached the compiler. Now definition-aware:
  it caught 13 conflicts up front where the build had been finding them one rebuild at a time.
- DECL and both typedef patterns anchored on end-of-line, so a TRAILING COMMENT hid a declaration
  or typedef entirely -- and agents comment nearly everything they declare. Seventh instance of
  one root cause: a scanner that looks green while reading less than it claims (R32).
- typedef handling is now BODY-AWARE and POSITION-AWARE, in a single pass:
    * identical definition visible ABOVE the insertion point -> strip and reuse;
    * same name, different shape -> rename (private to the draft);
    * definition below the insertion point -> never reuse (it is not in scope there).
  Three wrong strategies preceded this, each costing a rebuild: blanket strip (the file's copy can
  sit BELOW the draft -> implicit-int, then a collision), blanket rename (breaks drafts that share
  an IDENTICAL typedef, because their externs stop agreeing -- my regression, three drafts at
  once), and a rescan loop that found the definition it had just renamed and stripped it as a
  self-duplicate -> 'parse error before *'.

KNOWN LIMIT, recorded not fixed: the conflict check compares spelled type NAMES, so three drafts
each defining their own Slot54 with different layouts all declared func_80032A74(Slot54*) and
looked compatible. Comparing struct LAYOUTS for locally-defined types is the real fix.

13 + 4 verified-correct drafts are parked in two named buckets (competing local type models;
immovable TU declarations that gate_main reverts before every build).
2026-08-15 21:55:38 -06:00
Drew T 0753641d4b feat(phase-31): adopt the 6k-instruction wave doctrine + --target-ins (Drew, 2026-08-15)
A wave is now sized by INSTRUCTION MASS, not card count. The metric is instruction-weighted, so a
wave is worth what its instructions are worth: the 12-42-ins card lanes carried ~1,400 ins/wave
(~0.011pp, ~440 waves to finish) while wave O carried 6,266 ins at the same gate cost and the same
draft rate.

build_wave_atlas --target-ins draws cards until the instruction budget is met (still capped by n)
and refuses to under-fill silently. Standard recipe: --target-ins 6500 --min-ins 60 --max-ins 200
--max-bins 4, levers now including UNKNOWN.

THE MEASUREMENT BEHIND IT: draft rate barely decays with size -- wave M 98% at avg 51 ins, wave N
92% at avg 65, wave O 96% at avg 128. Mass is nearly free.

THE UNKNOWN UNLOCK: UNKNOWN is not a difficulty label, it means the atlas could not name a lever,
and it had been routed as needing its own bespoke lane. Wave O's 22-card R37 probe drafted it like
any other lane -- reclassifying ~138k ins (a quarter of everything open) as ordinary wave fuel.
With UNKNOWN in, 9,224 fns / 417,325 ins = 70% of all open instructions are agent-draftable; the
60-200-ins mass band alone is 164,357 ins ~= 27 waves, and is the band to work first.

Also banks the five-step PRE-GATE PROTOCOL (independent re-verify -> reloc_identity -> dry-run to
0-dropped -> reconcile declarations toward the form the match needs -> gate), cookbook §176g.
2026-08-15 14:05:15 -06:00
Drew T 965ae3902e measure(phase-31): the AGREE re-gate lane is a 5% null — symbol verification does not rescue stored drafts (S52-12)
R37 probe: 20 shape-verified AND symbol-verified stored drafts, 5 gate groups -> 1 banked (5%),
statistically the same as the project's A10 stored-verdict law (~0-8%; T1 measured 0/23 on the same
kind of pile earlier this phase). The null is the finding: a stored draft's rejection is almost
never symbol identity, it is TU plumbing (§176d) or staleness. reloc_identity's real home is a
PRE-GATE check on FRESH drafts, not a backlog resurrection tool. The remaining 30 groups are not
worth 30 rebuilds -- lane closed rather than pursued because the tooling was new and interesting.

Also names the SYMBOL-COLLAPSE class in the fixer's refusal (one draft extern standing in for N
distinct globals; a textual rename moves every occurrence together, so it needs one extern per
site) and records the R38 self-note: the 0/23 prior was already in the phase log.
2026-08-15 09:50:48 -06:00
Drew T 0487c0c627 docs(phase-31): cookbook §176e — symbol identity is COMPUTABLE offline, plus reloc_identity --fix (S52)
§174 law 1c recorded match_one's relocation blindness as a caution to the reader ('check every
symbol by hand after MATCH'). It is a computation, not a human's job. Banks the arithmetic, the two
failure shapes it separates (uniform-delta stale seed symbols vs wrong field offset), the four
traps that bit me building it (splat-derived names absent from the symbol files; MIPS o32 REL keeps
the addend in the instruction; index alignment is a precondition; a nearest-symbol label needs a
tight window), and the honest limit measured the same session: symbol-verified + shape-verified is
still NOT sufficient for a bank -- the first re-gate group of five such drafts banked 0/5, because
what remains is TU plumbing (§176d), not identity.

--fix rewrites only unambiguously-wrong symbols (every mismatch naming a symbol must imply the SAME
corrected base) and refuses otherwise: 10 of 12 repaired, 2 correctly refused.
2026-08-15 09:46:10 -06:00
Drew T fb4c1f03a1 fix(phase-31): wave-selector coverage + gate_lane crash-vs-empty (S52-1, S52-8)
build_wave_atlas.py:
- taken-set was a hardcoded 'abcdefghijkl' wave-letter literal -> glob('.run/wave_*_cards.json')
  (R33 derive, don't re-derive). NC: 634 -> 726 taken, strict superset, +92 cards from waves m/n
  that the literal would have silently re-issued.
- --exclude-bins defaulted to 'main' on the REFUTED link-defect rationale; default now empty and
  the help states the real reason (main cannot be gated incrementally; use tools/gate_main.py).
- new --only-bins allow-list: main waves need it, since gate_main rebuilds once per SLATE.

gate_lane.py: an unhandled gate_stage exception produced no JSON line -> v={} -> '0 banked',
indistinguishable from an honest empty gate (cost 2 cycles in P31). Now a non-zero rc or a missing
JSON line is labelled CRASH with the stderr tail, recorded in the results JSON, listed in the
summary as NEVER GATED, and exits non-zero. R39 NC both directions.
2026-08-15 09:31:10 -06:00
Drew T 1a36531eff chore(phase-31): checkpoint records the banked idioms (§174-176) — nothing left only in commit text 2026-08-15 09:09:32 -06:00
Drew T 6c12790719 chore(phase-31): SESSION CHECKPOINT — overnight campaign closed; cron cancelled; full handoff
- waves C-N: ~448 banked, stubs 12,059 -> 11,549, fleet 95.4% instr, 213/213 after every
  batch, main 0 -> 175 matched.
- records the three campaign-changing findings (main is open and was never hard; gate-group
  packing is the throughput lever; match_one verifies SHAPE not SYMBOL IDENTITY), the tools
  built/fixed, the prioritized open work, and the methodological lesson.
- cron be8fb48c cancelled; nothing in flight at handoff.
2026-08-15 07:30:48 -06:00
Drew T db8deb3558 chore(phase-31): velocity ledger — waves L and M rows (band test + law 1c) 2026-08-15 07:09:04 -06:00
Drew T 00e018ee41 chore(phase-31): checkpoint — overnight result (~408 banked, main 0->175) + the main-lane runbook
- records the night's totals and, more importantly, HOW to run the main lane: gate_main.py
  batch clean-rebuild, never gate_lane/gate_stage (incremental + .ld rewrite = false diff).
- notes the one mechanical improvement left (strip duplicate typedefs on substitution) and
  that the ~10 conflict-dropped main drafts are verified-correct and recoverable.
2026-08-15 06:10:09 -06:00
Drew T e05f3e3e83 fix(phase-31): gate_main typesig kept only the prefix — u8 D_x and u8 D_x[] compared EQUAL
- gate_main reported wave K BYTE-IDENTICAL; the clean fleet R22 then failed [FAIL] main.
  Three drafts declared D_80078D98 inconsistently (1 scalar, 2 array) and my conflict checker
  could not see the difference: typesig() split on the symbol and kept only the prefix.
- fixed to retain the declarator suffix ('' vs '[]'); NC'd both directions — the wave-K
  conflict is now caught, wave J's known answer (34/5) is unchanged.
- BOTH failure modes now documented in the tool: v1 too STRICT (compared parameter names,
  discarded 2 good drafts), v2 too COARSE (ignored [], passed a real conflict). R22 caught
  what the tool missed, which is exactly why the clean-rebuild rule exists.
- phase log: recorded the night's methodological lesson — every serious stall was an
  instrument trusted without a control, never the compiler.
2026-08-15 04:32:23 -06:00
Drew T b8dbf6f6a7 feat(phase-31): wave J — 34 MAIN functions banked (main 4 -> 38), R22 213/213
- first full wave against the main EXE: 40 atlas mass cards -> 39/40 standalone (98%), ALL haiku.
  main drafts exactly like an overlay; the only special handling is the gate path.
- gated via the clean-rebuild batch path: substitute -> make extract BINARY=main -> make build
  BINARY=main -> 143dbb89 BYTE-IDENTICAL; then full-fleet R22 213/213. main stubs 1030 -> 996.
- NEW CLASS: in-TU cross-draft declaration conflicts. Batching N drafts into ONE .c means their
  externs must agree with EACH OTHER (D_800A4ED4 s16-vs-u16; func_8001C9D0 void/void*/s32).
  Resolved greedily (keep-in-order, drop incompatible) at a cost of 5 recoverable drafts.
- the recovery lever, proven on func_80037368: adopt the shared header's decl VERBATIM
  (extern u8 D_80076251;) and adapt at the USE site ((&D_80076251)[i]) instead of redeclaring.
- NOTE on my own tooling: my first conflict detector compared parameter NAMES and wrongly
  dropped 2 good drafts ((s32 *_) vs (s32 *)); comparing type signatures only recovered them.
  Second time tonight a refusal check of mine discarded good work (R39).
2026-08-15 03:57:50 -06:00
Drew T 61806c8a31 chore(phase-31): checkpoint — main open (4 banked), wave I 44/44, tooling debt logged; wave J (main) in flight 2026-08-15 03:33:16 -06:00
Drew T b5101909f4 CORRECTION(phase-31): main is NOT link-blocked — it was a stale-.ld gate path (R22 corollary)
- I reported 'main is blocked on a link-resolution defect' with confidence. REFUTED by the
  control I should have run first: with src/ fully reverted and NO draft, make build BINARY=main
  still produced the same c4546248 and the identical 2-byte jal diff. A defect that reproduces
  with zero drafts is not caused by drafts.
- byte-proven both ways: 'make extract BINARY=main && make build BINARY=main' -> 143dbb89
  BYTE-IDENTICAL (twice); 'make build' alone -> c4546248 + the 2-byte diff, deterministically.
- cause: main's extract runs the EXE-only psyq_integrate + ld_interleave steps that REWRITE the
  linker script; gate_stage/harvest_verify build without re-extracting, so main gates against a
  stale .ld. Overlays have no such step and are unaffected (all overlay banks are R22-clean).
- implication: main's 79,510 ins @ 0.5% are behind a TOOLING gap, not a wall. Fix the main gate
  path to re-extract, then re-gate the 4 preserved drafts in .run/wave_p31e/main/.
- the earlier 'archive-member selection' evidence is a downstream symptom of the stale .ld.
2026-08-15 02:59:13 -06:00
Drew T 6d09d35b6d feat(phase-31): wave H — 34 banked (1 gate group); cookbook §175 caller-saved pin hazard
- wave H: 40 atlas mass cards on ov_SC02_005 -> 38/40 standalone (95%), 34 banked, ONE gate
  group. R22 213/213. stubs 11,788 -> 11,751. fleet 95.4%.
- §175 (NEW): a register pin to a CALLER-SAVED reg is not a scheduling hint, it changes program
  meaning. func_80182EB0: value written before a jal and read after it; the $2 pin let gcc treat
  the pre-call store as dead across the call and SILENTLY DELETE addiu v0,zero,-1 (49 vs 50 ins),
  post-call read = garbage. Fix was to DROP the pin and kill the cross-call live range in C.
  Rule: never pin a caller-saved reg to a value whose live range crosses a jal — use a
  callee-saved $s0-$s7 (safe by ABI, the §17 lever) or restructure. A one-instruction count
  mismatch on a caller-saved-pinned draft is this bug until proven otherwise.
- 2 NEARs enqueued with full diagnoses (prologue $ra-save scheduling; S3 chain-priority).
2026-08-15 02:50:57 -06:00
Drew T b398a9d908 docs(phase-31): narrow main's link defect — retarget delta == sizeof(.text 800c2.o) == 0x2A0
- call site is libmcrd1/func_80060D9C.s +0xD8, referencing the callee BY NAME (jal func_80061FA8)
- our build resolves that name 0x2A0 later, which is EXACTLY the .text size of build/src/800c2.o,
  the object starting at 0x80061FA8 -> the name binds to the END of the object (the next
  section's first symbol, firstfile in psyq/apicard/A66.o) instead of its start
- 3 ordered hypotheses recorded (duplicate func_80061FA8/.NON_MATCHING pair; object dropped or
  reordered when src/800.o gains an undefined ref; an absolute symbol shadowing the object's)
- everything to test it is in the map + the 4 preserved main drafts
2026-08-15 02:33:02 -06:00
Drew T cb30f26799 fix(phase-31): recover 3 falsely-withheld wave-G drafts (3/3 banked); symfix flags are ADVISORY
- I withheld 3 drafts on symfix STALE/AMBIGUOUS flags; all 3 already used the CORRECT PsyQ
  names (RotMatrixY, RotTransSV). What symfix called 'draft-only symbols' were LOCAL
  identifiers: a typedef, two inline-asm macro names, two local struct typedefs.
- gated unchanged -> 3/3 banked. wave G closes 35/36.
- two symfix defects behind it: (a) local typedef/macro names counted as symbol references;
  (b) draft-symbol extraction misses some extern forms, so a name the draft DOES declare
  still reports as asm-only.
- OPERATING RULE: symfix is advisory, the whole-binary gate is the arbiter. Never withhold a
  standalone-MATCH draft on a symfix flag alone (R39 applied to my own judgement).
2026-08-15 02:10:46 -06:00
Drew T efd0dd4ee1 feat(phase-31): wave G — 36/36 drafted, 32 banked, fleet 95.4%; §174 law 1b (PsyQ symbol names)
- wave G: 36 atlas mass cards on ov_SC03_006 -> 36/36 standalone (100%, independently
  re-verified), 32 banked of 33 gated, ONE gate group. R22 213/213. stubs -> 11,788.
- two TU-packed waves now confirm the shape: ~1 rebuild per wave instead of 23.
- law 1b added to the wave prompt: agents reconstruct CODE at 91-100% but INVENT PsyQ symbol
  names (S80131E00->Square0, Blk20_...->RotMatrixY, SRM_...->RotTransSV). Dangerous because
  match_one MASKS relocations -> a wrong callee name still reports MATCH; only the
  whole-binary gate + symbol audit catch it, after a wasted rebuild.
- 3 wave-G drafts held by that audit (would previously have crashed it pre-commit:2330).
2026-08-15 01:54:31 -06:00
Drew T ab649794ca feat(phase-31): wave F — 50 banked from ONE gate group; the TU-packed mass lane is the campaign shape
- wave F: 60 atlas 'mass' cards (fresh crack, NO seed body) -> 55/60 standalone pre-repair
  (59/60 post-repair), 50 BANKED of 53 gated, in a SINGLE gate group. R22 213/213.
- the throughput thesis is confirmed: wave D banked 45 across 23 whole-binary rebuilds;
  wave F banked 50 across 1. gate cost scales with (binary,TU) groups, not drafts.
- the fresh-crack lane converts like the seeded lanes (~91%) => the atlas's ~7k draftable
  candidates are all reachable, not just those resembling a prior match.
- grinder: 0 banked across 8 seeds / 11 ILS cycles (band exhausted); re-exposed the Phase-22
  split-file blindness (no .s under md_MAIN_027).
- KNOWN DEFECT logged: aprop_symfix crashes on non-hex symbols (int('Square0',16)) — one
  PsyQ-named callee aborts the whole audit; needs 1:1-rename handling + per-pair isolation.
- stubs 11,876 -> 11,826
2026-08-15 01:23:33 -06:00
Drew T 1a23d90b31 chore(phase-31): R22 213/213 after wave D; wave F launched (first TU-packed wave, 60 drafts/1 gate group) 2026-08-15 00:35:03 -06:00
Drew T dde7a35ca3 feat(phase-31): wave D banked 45/48 + main link-blocker diagnosed; selector packs by gate group
- wave D (48 adapt cards): 47/48 standalone, 45 BANKED across two gates (40 + 5 late-repair).
  Operational lesson: build the gate slate AFTER the repair stage lands — the first slate was
  built early and 5 rescued drafts needed a second gate.
- wave C (35: 11 tell + 24 weak): 32 banked, 91% gate. Weak lane proven 24/24 on haiku.
- MAIN BLOCKER DIAGNOSED (the night's most valuable finding): main drafts are byte-correct yet
  gate 0/4. Byte-diff of the built EXE = exactly 2 bytes in 413,696, NOT in the drafted fn: a
  jal at 0x80060E74 retargets func_80061FA8 (game code, 800c2.o) -> firstfile (PsyQ libapi
  A66.o). Adding one C fn perturbs symbol resolution between game code and the LINKED PsyQ
  archives. main is an INTEGRATION wall, not a matching wall -> its own lane; excluded from
  build_wave_atlas by default.
- build_wave_atlas.py now packs by (binary, TU) — the REAL gate-group key, since each group is
  one whole-binary rebuild (wave D: 42 drafts / 23 groups = the throughput ceiling).
- 3 NEARs enqueued as grinder fuel incl. func_80183578 at close=1 DELAY-SLOT (§60a precedent).
2026-08-15 00:32:03 -06:00
Drew T 540d2cefaa feat(phase-31): wave C banked 32 (R22 213/213) + tools/build_wave.py; 3 instrument defects fixed
- wave C: 35 cards (11 tell + 24 weak) -> 35/35 standalone (re-verified independently, R14)
  -> 32 banked / 3 near, 91% gate, 0 symbol failures (Law 4 prevention worked)
- weak lane proven for the first time: 24/24 on haiku; 890 candidates remain
- reach measured: 32 exemplars, 8 with sharers, x2 each => ~1.25x effective (the x134
  era ended in P25/29/30) -> throughput, not leverage, is now the lever
- tools/build_wave.py (pool=adapt|weak, corpus-derived open-stub filter, R35 gate guard)
- 3 self-inflicted instrument defects found+fixed+NC'd (P9, recorded not buried):
  pgrep self-match via shell=True; corpus.stubs() is addr->Stub not names (nearly
  declared both card pools spent); a wave fired on hand-typed placeholder cards (stopped)
- STRATEGIC: card lanes are ~0.23% of open ins/wave; the Atlas's head-crack bucket is
  1,276 groups / 186k ins with high-reach groups up to 265 instances -> retarget waves
  at atlas groups next
2026-08-14 23:44:03 -06:00
Drew T 9d1e8e8c38 chore(phase-31): resume — owed R22 banked (213/213) + atlas regen at HEAD (11,994 open); wave-C fuel verified 2026-08-14 22:26:33 -06:00