Commit Graph

36 Commits

Author SHA1 Message Date
Drew T 501d112758 docs(phase-21): session handoff + queued 10h run (fleet 60.93%) — crash-recovery for fresh session
- CURRENT_PHASE ★ CURRENT STATE: overnight loop summary (59.05->60.93%, ~55 fns, 12 waves), the 3
  gate-safe tooling upgrades + 6 idioms, the tractable-pool-depleting finding, exact resume cycle
- ▶ QUEUED 10-HOUR RUN: fuel verified (80 tractable+28 giants+9 o0 cached, grinder 21 eligible),
  staged first batch, paste-ready fresh-session start (grinder + worker loop, auto-rotate to giants)
- T6 marked done (the loop ran); T7 (close) pending Drew's gate-2. NOT STARTED (STOP present).
2026-06-22 07:47:14 -06:00
Drew T 0b77956d54 docs(phase-21): drafter-distilled idioms (non-volatile reload-clobber, phantom-frame induce) + backlog/progress regen
func_801758FC's drafter added two byte-verified idioms to cookbook §21 (additive, H5-safe).
2026-06-22 03:31:30 -06:00
Drew T 4927f38c46 feat(phase-21): option C — grinder blacklist + sig_unify DEF-side arity-extend recovery
- grinder.py: persistent blacklist for permuter-won/gate-rejected (plumbing-bound) fns;
  stops the tried.clear()-after-idle churn (was 0 banks in 8h on func_8014F3E8/func_8014FE60)
- sig_unify.py rewrite_def: adopt the canonical param list on arity mismatch (DEF-side
  loose-typing wall) — unused extras sit in $a0-$a3, free at -O2; banked func_8016EDEC/EE40
- cookbook §22 (DEF-side recovery + grinder blacklist); CURRENT_PHASE option-C log
- compounds: sig_unify is in the gate pipeline -> every future wave + the grinder auto-recover
2026-06-21 22:55:40 -06:00
Drew T aa010db9d4 feat(phase-21): R1 — gate pre-reboot wave2 drafts (+2 fns x134)
- gate_stage on the 15 worker drafts saved before the reboot: banked 2 byte-matches,
  propagated x134 (dedup 1508->1510); the gate process was killed pre-commit (empty log),
  banks recovered from the working tree (dedup_propagate fail-closed per-overlay = verified).
  Remaining 13 -> backlog near-misses.
2026-06-21 13:50:53 -06:00
Drew T 8de18e617d feat(phase-21): T4/T5/T6 — worker validated (func_80164530 x134), grinder, orchestrator
- T4 worker Workflow validated: 3-target wave, all self-MATCH; whole-binary gate banked
  func_80164530 x134 (5 register-pins + offset-fold + scheduling). fleet 58.90->58.98%.
  §20 holds (1/3 survived the whole-binary gate); the 2 near/failed -> backlog.
- T5 grinder: token-free permuter of backlog near-misses -> gate_stage; gate correctly
  rejected a permuter over-prediction (integrity intact). auto_supervisor DRIVER-param.
- T6 orchestrator.py: ROI pool rotation (prep/finish/status); gate_stage flock serializes
  grinder+orchestrator builds. Sandbox: detached daemons build fine, foreground needs override.
2026-06-21 13:06:34 -06:00
Drew T c2e93e50cd feat(phase-21): T3 — backlog ledger + shared gate stage (validated, +0.08%)
- tools/backlog.py: near-miss ledger (.run/backlog.jsonl + docs/backlog.md ranked by
  reach->closeness->size; drop-now-matched filter, P9). tools/gate_stage.py: the shared
  deterministic spine both worker+grinder call (canon_resident_calls -> cast_call_sites ->
  sig_unify -> harvest_verify --chunk 1 -> dedup_propagate --auto-from -> backlog -> summary).
- validated end-to-end on a real 30-draft m2c sample: banked func_801710DC + propagated x134
  (dedup 1506->1508), 29 near-misses logged+ranked. make check-all 136/136 byte-identical
  (R22); fleet 58.82%->58.90%; dedup-check 1508 validated/0 failed (G3/P9).
- capped-fns reframe (R14): they're matched-inline (propagation-blocked), not draftable ->
  deferred to the worker; not claiming the unbanked +0.3% (P9).
2026-06-21 12:32:21 -06:00
Drew T e803651f0c feat(phase-20): close — cap tool + T3a %lo crack + 3 byte-proven findings; fleet 58.00%->58.82% (v1.19.0)
- THE CAP TOOL tools/cast_call_sites.py (§17a-1 callee-cast): per draft, callee whose canonical
  TU sig != draft's intended sig -> decl->canonical + call-site cast ((ret(*)(args))func_X)(args)
  (codegen-neutral; gcc folds the cast of a known symbol -> direct jal). Recovered 6 of T6 batch-1's
  33 gate-fails byte-identical (5 x134 + 1 local). Pipeline canon_resident_calls -> cast_call_sites
  -> sig_unify -> harvest_verify --chunk 1.
- T3a CRACKED (not cited): the %lo-folding indexed-global -O0 residual falls to the array-of-STRUCT
  idiom (extern Struct base[], sizeof==stride, base[i].field; NOT *(T*)(&sym+i*stride) which
  materializes &sym). func_8013B7AC banked. Reusable idiom fleet-wide. cookbook §18/§20.
- THREE byte-proven findings (R14): (1) the wave cap is the DEF-side loose-typing wall, not
  callee-conflicts (the §20 "~33" projection was wrong); (2) the -O0 cluster is OVERLAY-LOCAL,
  not reach-134 -> the ×134 rollout is INVALID; (3) data-cast is MOOT (0 real data conflicts).
- T1 typedef type-lift (+0.35%, 9 fns x134); T2 exemplar_miner router; T4 codegen map (cookbook §20);
  T6 batch-1 (+0.28%, 8). dedup 1485->1513/0 failed. check-all 136/136 BYTE-IDENTICAL (R22);
  0 NON_MATCHING (G4). fleet 58.00% -> 58.82%.
- rule R30 (capture context-dependent knowledge before a fresh session). worklog -> logs/Phase20.md.
- bumps 1.18.0 -> 1.19.0
2026-06-21 10:26:34 -06:00
Drew T 6c5bd1c4a9 feat(phase-20): cast_call_sites.py — the §17a-1 callee-cast cap tool; 6 recovered, fleet 58.63%->58.82%
- tools/cast_call_sites.py: per draft, callee whose canonical TU sig != draft's
  intended sig -> decl->canonical (kills in-TU conflicting types, keeps symbol in
  scope) + call-site cast ((ret(*)(args))func_X)(args) (codegen-neutral: gcc folds
  the cast of a known symbol -> direct jal). Pure --in/--out; whole-binary gate is
  the arbiter (G3/P9). Pipeline: canon_resident_calls -> cast_call_sites ->
  sig_unify -> harvest_verify --chunk 1
- recovered 6 of T6 batch-1's 33 gate-fails byte-identical (func_80153C44/8015CF58/
  801711FC/80161BE0/801683D8/8015F948); 5 propagated x134 + 1 local; check-all 136/136
- R14 CORRECTION of cookbook §20's '~33' projection (byte-proven): the batch is NOT
  mostly callee-conflicts — ~6 callee (cast-recovered), ~18 DEF-side loose-typing wall
  (def's matchable sig conflicts with the unchangeable caller-canonical; caller-side
  fix BLOCKED because INCLUDE_ASM declares no symbol -> a shared macro's internal
  extern is load-bearing in the 133 stub overlays), + a small DATA tail. The def-side
  needs re-drafting under the caller-canonical sig (future wave), not a text transform
- cookbook §20 RESOLUTION + SETUP tool inventory (R16/R21/R30); CURRENT_PHASE log (R28)
- fleet 58.63% -> 58.82%, dedup 1501 -> 1508, 0 NON_MATCHING (G4)
2026-06-21 02:04:39 -06:00
Drew T 9991e4d6be feat(phase-20): T6 batch-1 — harvest wave 41/48 match_one, 8 banked (7 x134), fleet 58.35->58.63%
- Ultracode wave on 48 cached reach-134 <=90-ins targets: 41/48 match_one MATCH (85%)
- whole-binary byte-gate: 8/41 banked (canon 3 + sig_unify 5); 7 propagated x134 + 1 local;
  dedup 1494->1501, check-all 136/136, +0.28%
- FINDING (R14/P9): match_one->gate gap ~80% this batch = EXTERN-CODEGEN-COUPLING (a callee's
  declared sig changes the call codegen; match_one uses the draft externs, the gate uses the
  overlay decls). The 33 lost are byte-correct vs the wrong externs -> need a callee-extern-
  canonicalize pass (NOT sig_unify, which rewrites the def-sig and regresses byte-correct drafts)
- the 7 DIFFs = gcc-class diagnoses: T3c store-vs-load (8014F2E0/80150528) CONFIRMED unsteerable
  (sched.c); SS10 hoist-vs-remat (80149374/801493D0); IV-combine (80177AD4); hoisted-invariant
  order (80177F84); 80161A90 = -O1 (build-infra)
2026-06-21 00:57:04 -06:00
Drew T 4f5f73c480 feat(phase-20): T1 — typedef lift closes the type-blocked propagation cap (9 fns ×134)
- build_engine_types.py: add find_typedefs() (brace-aware) + typedef_name() (anon-struct,
  fn-ptr, alias) + same-name/overlap collision guards; lift 14 typedefs to engine_types.h
  in source order after the named structs (A801593E4 -> S801593E4 dep preserved)
- engine_types.h: 48 named types + 14 typedefs; ov_SC01_077 byte-neutral (still d19c9580)
- dedup_propagate --auto-from: 9 reach-134 fns propagated x134 (8013E4B4 80148C9C 8014A238
  8014C118 80153978 801593E4 80168664 8016B964 8017AD0C); engine_core.h +9 DEFINE macros
- FINDING (R14/P9): cap was 16; only 9 were TYPE-blocked (all freed). The other 7 fail on
  undeclared callees/data (80142B2C 801535F4 80155E30 80157580 801576A8 80168F40 80170B48)
  -> the SS19 declaration-plumbing class, a recovery-tooling lever, NOT the type-lift
- check-all 136/136 byte-identical; fleet 58.00%% -> 58.35%%; dedup 1485 -> 1494 / 0 failed; 0 NON_MATCHING (G4)
2026-06-20 23:49:58 -06:00
Drew T c43b6d0830 feat(phase-19): T3 struct-lift + propagation top-up — fleet 57.93%->58.00%
- build_engine_types.py --strip: lifted 48 named types -> src/shared/engine_types.h
  (byte-neutral, ov_SC01_077 d19c9580); unblocked +4 struct-using matches -> propagated ×134
  (incl. func_80147514, a T2 match freed by the lift)
- check-all 136/136 BYTE-IDENTICAL (R22); fleet 57.93% -> 58.00%; phase total 56.64% -> 58.00%
- KEY FINDING: propagation (not matching) now caps the fleet-% yield — ~16 banked matches stay
  ov_SC01_077-local because their bodies use typedef'd/anonymous/sibling local types that the
  named-struct-only build_engine_types can't lift (dedup_propagate compiles_standalone rejects).
  Phase-20 lever: extend the type-lift to typedefs -> recovers those ×134 for ~0 agent tokens
2026-06-20 19:57:34 -06:00
Drew T 3e99d2836d feat(phase-19): T3 batch-2 wave — 25 matched, 8 propagated ×134, fleet 57.62%->57.93%
- Ultracode wave (38 targets, clean hints after the gen_harvest_targets fix): 35/38 match_one
  MATCH (92%, up from 88%); 2 of 3 garble-retries now match; 3 DIFF = genuine (delay-slot
  schedule, call-crossing hoist-vs-remat, narrow-param STOP)
- gen_harvest_targets.py: fixed INLINE_DEF_RE (was matching indented `if(func_X(...)){`
  call-exprs as defs -> garbled callee hints agents pasted as externs); 0 garbled of 749
- whole-binary gate: 25 banked. ALL 18 stage failures were the shared-caller ARITY class ->
  NEW tools/fix_arity_callers.py automates the no-proto caller-extern recovery (+8); 10 remain
  = genuine loose-typing conflicts (caller sig != def sig), Phase-16 documented wall
- pipeline finding folded in: gate canon-only FIRST, sig_unify FALLBACK (.run/t3_gate2.sh)
- propagated 8 ×134 (17 stayed ov_SC01_077-local: inline named structs need engine_types lifting)
- check-all 136/136 BYTE-IDENTICAL (R22); dedup 1475->1483 validated/0 failed; 0 NON_MATCHING (G4)
- fleet byte-identical 57.62% -> 57.93% (+0.31%)
2026-06-20 19:51:50 -06:00
Drew T 2f9b0d9906 feat(phase-19): T3 batch-1 wave — 30 matched, 25 propagated ×134, fleet 56.64%->57.62%
- Ultracode wave (50 agents, §17 toolkit): 44/50 match_one MATCH (88%); 6 DIFF = genuine
  gcc-quirk tail (fold-const constant-last, GCSE/reload, loop-IV combine, reg time-sharing,
  narrow-param), correctly stubbed (no false matches)
- whole-binary gate (the sole arbiter, G3/P9): 30 banked. Two pipeline findings (R14):
  - sig_unify REGRESSES already-canonical agent drafts -> gate canon-only FIRST, sig_unify
    FALLBACK (.run/t3_gate2.sh) recovered +5 vs unconditional sig_unify
  - 2 arity conflicts recovered via the T2 no-proto caller-extern fix (func_8014AB7C/AC10)
- propagated 25 ×134 (dedup_propagate --auto-from; incl. the T2-deferred func_8017209C);
  ~5 stayed ov_SC01_077-local (inline named structs, need engine_types lifting)
- check-all 136/136 BYTE-IDENTICAL (R22); dedup 1450->1475 validated/0 failed;
  fleet byte-identical 56.64% -> 57.62% (+0.98%); 0 NON_MATCHING (G4)
- 14 still-failing (3 agent-garble from a gen_harvest_targets garbled-sig bug, 1 struct,
  10 genuine codegen near-miss) -> batch-2 retry candidates
2026-06-20 19:27:53 -06:00
Drew T 85afa0dc81 feat(phase-19): T2 recovery tooling — canon_resident_calls + no-proto caller fix (3 matches)
- R14 finding: the 3 Phase-18 "implicit-int / propagate-first" near-misses are NOT
  implicit-int (reproduced each through the byte-gate). Real classes:
  (a) resident-callee LINK-miss: draft calls func_<ADDR> but the addr has a curated
      name (0x8004CFEC = ratan2) -> "undefined reference to func_8004CFEC". NEW
      tools/canon_resident_calls.py rewrites func_<ADDR> -> curated name (pure draft
      text, body bytes unchanged) -> run FIRST in the recovery pipeline.
  (b) shared-caller ARITY conflict: an engine_core.h caller macro declares the callee
      file-scope `extern void func_X(void)` then calls func_X(); the real def takes an
      arg -> "conflicting types". FIX = caller extern -> no-proto `extern void func_X();`
      (byte-neutral for the caller; compatible with promotion-safe params int/long/ptr).
- 3 matches banked in ov_SC01_077: func_8017209C (ratan2 rewrite), func_80147514 (s32),
  func_80168F40 (void*); 2 no-proto lines in src/shared/engine_core.h
- recovery pipeline: draft -> canon_resident_calls -> sig_unify -> harvest_verify --chunk 1
- make check-all 136/136 BYTE-IDENTICAL (full extract, R22); dedup 1450 validated/0 failed;
  0 NON_MATCHING in any default build (G4); fleet 56.64% (the 3 are ov_SC01_077-local,
  x134 propagation rides T3/Phase-20)
- cookbook §17a-3 corrected (R14/R16); SETUP tool inventory (R21); CURRENT_PHASE T2 done
2026-06-20 17:12:00 -06:00
Drew T 6d9cd213a2 feat(phase-18): Step-1 recovery — +2 matches (func_8012F68C parse-fix x134, func_8012A418 sibling-decl reconcile)
- func_8012F68C: agent left a malformed 'extern if(...)' line -> fixed to a proper extern; gated x134.
- func_8012A418: reconciled a stale 'M2C_UNK func_8012A418()' sibling forward-decl to the real
  'void func_8012A418(void)' sig; byte-gated, banked REAL in ov_SC01_077 (local-type body, not shared-macro).
- Step-1 total: 22 reach-134 matches (18 propagated x134 + 4 local REAL); deferred to Phase 19:
  3 TU-integration cases (func_80147514/8017209C/80168F40, standalone-MATCH) + 3 codegen DIFFs
  (func_80131CA8/80150528/8014E5B4) + the per-file -O0 class (func_8013C360 +17 siblings) + 2 genuine
  residuals (func_8014F2E0 §10 sched, func_8012C2D0 loop-guard order).
- make check-all 136/136 byte-identical (R22); 0 NON_MATCHING (G4).
2026-06-20 14:39:51 -06:00
Drew T fa0d4a3f62 feat(phase-18): Step-1 wave banks 20 reach-134 matches (55.94->56.60%)
- bounded Step-1 wave (.run/harvest_wave_p18s1.js): 31 tractable reach-134 targets, agents
  taught §17 toolkit + embedded canonical callee sigs + call-site-cast/re-validate fix.
- match_one MATCH 28/31 (90%, vs calibration 12/16); whole-binary gate 20 verified:
  7 pins, 5 barrier, 1 array-decay, 2 call-site-cast, 12 reconstruct, 1 other. 17 propagated
  x134 (3 have h_exact membership <134 -> banked REAL in ov_SC01_077 only).
- fleet 55.94 -> 56.60%; make check-all 136/136 byte-identical (R22); 0 NON_MATCHING (G4).
- 3 DIFFs well-characterized: func_8013C360 = per-FILE -O0 class (18 scattered -O0 fns;
  agent's C byte-exact at -O0, needs an -O0 split file like src/boot.c -> Phase 19);
  func_8014F2E0 = §10 store-vs-load scheduler tie-break; func_8012C2D0 = NEW gcc loop-guard
  operand-order class (irreducible). 8 gate-fails are recoverable sibling-decl/parse cases.
2026-06-20 14:30:36 -06:00
Drew T d593ee20fe feat(phase-18): Step-3b calibration — §17-toolkit wave banks 9 reach-134 matches (55.58->55.94%)
- upgraded harvest wave (.run/harvest_wave_3b.js) teaches the §17 TOOLKIT: triage the
  match_one diff -> reconstruct / array-decay / register-pins+barrier (instead of stubbing
  the regalloc tail). Calibration: 16 fresh tractable reach-134 targets.
- whole-binary close-rate 9/16 = 56% (vs Phase-17 baseline 33%): 2 via register pins
  (func_8012CB64, func_801468C8), 2 via array-decay (func_80149544, func_80149584),
  5 via clean reconstruction. Each reach-134 -> propagated x134 (config/dedup.us.yaml +9).
- FINDING (R16 flywheel): the match_one->gate gap (12->6 then ->9) is the §3a call-site
  CASTS the agents skipped + sig_unify narrowing the extern to canonical -> conflict.
  Recovered 3 by call-site arity-cast / void-return cast (codegen-neutral). Step-1 prompt
  must teach call-site casts + re-validate after sig_unify.
- make check-all 136/136 byte-identical (R22); dedup-check 1432 validated, 0 failed;
  0 NON_MATCHING in any default build (G4).
2026-06-20 13:40:11 -06:00
Drew T f1bbcd241f feat(phase-18): VERDICT REVERSED — func_8012B8E4 hand-matched via register pinning
The 'unsteerable' regalloc-order class is NOT unsteerable. Drew's directive (hand-match
everything) exposed the lever I'd skipped: explicit register pinning.

- func_8012B8E4 (the flagship circular reach-134 'unsteerable' fn): 21 -> MATCH via
  * register pins: register s32 d __asm__("$16"); register s32 s1ang __asm__("$17")
    -> FORCES the $s0/$s1 global allocation gcc otherwise density-orders the other way
  * branch-polarity invert (§3-T4): 24->21
  * explicit clamp temps (t=u6+0x1000; iVar4=u5-t): fixes the reassociation, 7->3
  * scheduling barrier __asm__ __volatile__("" : : "r"(u5)): anchors the last sll, 3->MATCH
- byte-gated (harvest_verify, G3/P9) + propagated x134 (per-overlay gate); 134 byte-identical
- recipe = §10-family hand technique (pins + barriers); labor-intensive (per-fn register map
  from the asm) but it WORKS -> the circular tail IS hand-matchable, not asm-only
- supersedes the T1-T5 'unsteerable' verdict; cookbook §17 + PhaseEnd to be revised accordingly
2026-06-20 12:17:54 -06:00
Drew T 52cfc22972 feat(phase-18): T6 — func_801399A8 matched + propagated x134 (fleet 55.51->55.55%)
- reach-134 STRUCTURAL_MISS target closed by the research idioms:
  * for-loop structure (vs do-while) -> correct beqz delay-slot scheduling
  * statement-order in the for-update (cookbook §2-T2) -> final 2 increments
  * sig_unify canonical retype (s32 return + s32 data, integer address arithmetic)
    -> resolves the TU-level conflicting-types gate failure that match_one masked
- byte-gated (harvest_verify, G3/P9): ov_SC01_077 stays d19c9580 BYTE-IDENTICAL
- propagated to all 134 overlays via dedup_propagate (per-overlay gate, fail-closed)
- make check-all: 136 passed / 0 failed; fleet 190,949 -> 191,083 / 344,010 = 55.55%
- KEY reframe: the STRUCTURAL_MISS bucket IS matchable (idioms work); distinct from
  the PERMUTER_CLASS/circular regalloc-order tail which is unsteerable (T1-T3 verdict)
2026-06-20 11:48:12 -06:00
Drew T 0dd9bf6bac feat(phase-17): calibration harvest wave — fleet 55.04%->55.51% (+0.47%)
- Ultracode wave: 30 high-reach tractable residuals, parallel guided-hand-matching
  agents (m2c + Ghidra-C cache + asm + actor-struct + S1/S2/S3a playbook), self-
  validate match_one. 18/30 match_one MATCH (60%); 10/30 whole-binary verified (33%)
  after sig_unify recovered 2 -> all 10 propagated x134; 2 demo fns caught up
- 136/136 byte-identical (R22 clean check-all); REAL +1,610; 1421 dedup groups
- KEY FINDING: the match_one->whole-binary gap (60%->33%) is 100% SIG CONFLICTS
  (shared callees like func_80131CA8 declared inconsistently across parallel agents),
  NOT codegen. The canonical-sig layer (deferred as low-value) is the ESSENTIAL
  enabler -> would lift 33% toward 60%. 12/30 are the genuine gcc-quirk tail (DIFF).
- Ghidra pre-pass: tools/ghidra_scripts/DecompileFunctions.java (headless batch
  decompile -> .run/ghidra_c cache; no /mcp needed); 300 tractable targets sized
- harness: .run/harvest_wave_s3.js (embedded-targets Workflow; args channel doesn't
  transit arrays). cost ~1.89M tokens / 30 fns
2026-06-19 20:54:45 -06:00
Drew T 070cf375c9 feat(phase-17): T3 — bank 42 sig_unify matches + propagate x134 (fleet 54.48%->55.00%); fix taxonomy classifier
- banked 42 gate-proven SIG_FIXABLE_KR matches in ov_SC01_077 (of 48 predicted; 6 honestly
  reverted by the whole-binary byte-gate, P9) + propagated 13 h_exact-shared x134 via
  dedup_propagate (one body -> 134 overlays, each byte-gated, fail-closed)
- fleet byte-identical-from-source 54.48% -> 55.00% (+0.52%); REAL +1,778; dedup groups
  1395 -> 1408; make check-all 136/136 byte-identical (R22); dedup-check 1408 validated/0 failed
- wall probe (R14): raw drafts 0/99 + sig_unify fails -> the K&R/sig_unify avenue is exhausted;
  the residual conflict-class is ARITY_WALL (the §14e param-count dead-end) or structural (T4/T5)
- FIX a T1 classifier bug surfaced by verifying the wall vs the bytes: tu_compile_error captured
  the baseline's pre-existing byte-NEUTRAL warnings ("makes integer from pointer", cc1 rc=0) and
  mislabeled 99 fns LOOSE_TYPING_WALL; now keeps only non-warning errors -> there is NO loose-typing
  wall, the real residual wall is ARITY_WALL=74. docs/wall-taxonomy.md amended with the correction.
- 134 overlay .c files carry the propagated DEFINE_func instantiations; a one-time full-fleet
  make extract was required for the per-overlay propagation gate + check-all
2026-06-19 12:13:38 -06:00
Drew T ab8b857cd3 feat(phase-15): engine_types follow-up — +1 struct-using shared fn; fleet 54.44% -> 54.48%
- additive engine_types.h: +1 named type (43 total); 12 local-type skips remain
  (anonymous/typedef'd types the extractor can't lift)
- propagated 1 more struct-using shared fn fleet-wide; dedup-check 1395/0
- R22 clean fleet rebuild 136/136 byte-identical
2026-06-18 20:23:21 -06:00
Drew T a10f7f8a1a feat(phase-15): sig-unify recovery + find_site brace-fix — fleet 52.08% -> 54.44%
- tools/sig_unify.py (NEW): unifies a draft's FULL signature set to the banked-canonical
  decls — both callee externs AND the draft's OWN definition signature (return + param
  types, body param-names preserved). Recovery for the standalone-MATCH residual: a probe
  found 30/30 sampled failures were type conflicts, 0 false-positives. Gated 191 -> 32 verified.
- tools/dedup_propagate.py find_site FIX: the inline-def detector required the opening brace
  ON THE SAME LINE as the signature, silently dropping every next-line-brace def from
  propagation (sig_unify/permuter outputs + ~stragglers all session). Now accepts brace on
  the same OR next line -> unlocked a 61-function propagation backlog.
- propagated 61 fns fleet-wide (incl. 32 sig-unify + the permuter win func_801508F8 +
  earlier-dropped next-line-brace matches), all 134 byte-identical; dedup-check 1394/0
- R22 CLEAN fleet rebuild: 136/136 byte-identical. REAL 177501 -> 185646. Zero agent tokens.
2026-06-18 20:00:50 -06:00
Drew T 4b0f4d1003 feat(phase-15): #3 types-header propagation — +8 struct-using shared fns; fleet 51.77% -> 52.08%
- fix tools/build_engine_types.py to be ADDITIVE: merge new source types with the
  types already in engine_types.h (a re-run after a prior --strip was destructive —
  it dropped the ~34 already-migrated types and broke the build; caught + reverted)
- engine_types.h 34 -> 42 named types (the 8 from wave-1's struct-using matches);
  inline defs stripped from ov_SC01_077.c (byte-neutral)
- dedup_propagate --auto-from: 8 of 15 struct-blocked matches now self-contained ->
  propagated across all 134 overlays (byte-gated); 7 remain (anonymous/typedef'd types)
- R22 CLEAN fleet rebuild: 136/136 byte-identical; dedup-check 1333/0
- zero agent tokens (deterministic)
2026-06-18 18:03:44 -06:00
Drew T be0ceae55d feat(phase-15): T6 wave-1 (50-agent) harvest — 27 shared fns matched, 9 propagated fleet-wide; fleet 51.41% -> 51.77%
- 50-agent Ultracode callee-sig-aware harvest of 300 reach-134 shared stubs in
  ov_SC01_077; whole-binary byte-gate verified 27 (26 + 1 canon-recovery), 273
  genuine compiler-internal residual (recovery recovered only 1 -> confirmed permuter-class)
- dedup_propagate --auto-from: 9 self-contained matches propagated across all 134
  overlays (byte-gated); 15 verified use overlay-local types -> pending engine_types.h
- R22 CLEAN fleet rebuild: 136/136 byte-identical, 0 extract fails; dedup-check 1325/0
- NOTE: blind-draft shared-core harvest has hit diminishing returns (~9% gate yield);
  next work pivots to giants (match_one) + permuter + deterministic types-header propagation
2026-06-18 17:21:54 -06:00
Drew T 85b3599e5b feat(phase-15): T6 groups-of-10 missing harvest — fleet 48.02% -> 51.41% (over half)
- Drew's "groups of 10 instead of 100+": rebuilt the harvest workflow to process the 375
  never-drafted shared stubs (leaf-first) in SEQUENTIAL WAVES of <=10 agents (intra-wave
  retry). Result: 0 dead batches (vs 33 from a 48-batch burst), ~42 drafts/60s (vs ~1/45s)
  under the sustained server-side throttle; 374/375 drafted (+1 gap-fill found).
- gate: 85 verified -> 79 propagated fleet-wide (7 struct/local skipped), 134 overlays
  byte-identical; dedup 1237 -> 1316 groups, dedup_integrate --check 1316 validated / 0 failed.
- fleet REAL substantive ~164k -> 175,212; byte-identical 48.02% -> 51.41% (OVER HALF the
  matchable code across all 136 binaries rebuilds byte-identical from source).
- R22 clean rebuild: 136/136 byte-identical, 0 extract failures.
- cookbook §12: the rate-limit-gentle sequential-waves-of-10 pattern + leaf-first ordering.
2026-06-17 18:38:03 -06:00
Drew T 5c5e9fb973 feat(phase-15): T6 struct follow-up — shared engine_types.h unblocks 37 struct-using fns; fleet 46.27% -> 47.70%
- tools/build_engine_types.py -> src/shared/engine_types.h: extract the 34 named struct/union
  types from ov_SC01_077.c (forward decls + defs in source order; consumes trailing
  __attribute__((packed)) + aliases through the ';'). 0 same-name-different-layout collisions.
- engine_core.h includes engine_types.h; the 34 inline defs stripped from ov_SC01_077.c
  (byte-neutral — type defs emit no code; verified byte-identical).
- dedup_propagate.py: relax the struct guard to skip only inline named-struct/typedef
  DEFINITIONS (header-type USAGES + anonymous local structs now propagate); add engine_types.h
  to the compile pre-filter so struct-using bodies resolve.
- 37 struct-using shared fns propagated fleet-wide (skip 41 -> 4 overlay-local typedef'd types),
  134 overlays byte-identical; dedup 1183 -> 1220 groups, 1220 validated / 0 failed.
- fleet REAL substantive 157,541 -> 162,462; byte-identical 46.27% -> 47.70%.
- R22 clean rebuild: 136/136 byte-identical, 0 extract failures.
2026-06-17 15:25:44 -06:00
Drew T 57a0a88f37 feat(phase-15): T6 tail — quarantine decl-recovery propagates 42 more; fleet 44.64% -> 46.27%
- canon_draft_decls recovery on the combined 505 quarantined drafts (285 small + 220 medium),
  now canonicalizing against the much-larger banked symbol set: 47 verified (no API), 42
  propagated fleet-wide (struct/local-type skipped), 134 overlays byte-identical; dedup
  1141 -> 1183 groups, dedup_integrate --check 1183 validated / 0 failed.
- fleet REAL substantive 151,908 -> 157,541; byte-identical 44.64% -> 46.27%.
- R22 clean rebuild: 136/136 byte-identical, 0 extract failures.
- scoped the struct-using-shared-fn lever (read-only): 34 named struct/union types in 077,
  ZERO same-name-different-layout collisions -> a shared-types-header is a clean path to
  propagate the ~100 struct-using fns (next).
2026-06-17 15:06:29 -06:00
Drew T db4fddc44e feat(phase-15): T6g medium band — harvest+propagate 65 shared fns; fleet 42.14% -> 44.64%
- medium harvest (callee+data-sig-aware) on the 293 still-stub call-heavy fns (nins 41-150):
  30-agent Workflow + a 3-target gap-fill (mandatory produced-vs-expected reconcile). Gate:
  73 verified (25% — these are the harder GTE/matrix/regalloc functions; 220 quarantined to
  .run/drafts-T6c-fail for a later recovery pass).
- dedup_propagate.py: broaden the struct/union guard to skip ANY struct/union-touching body
  (not just definitions) — agents used colliding generic struct names in params/casts/externs
  too. 37 skipped; 65 propagated fleet-wide, 134 overlays byte-identical; dedup 1076 -> 1141
  groups, dedup_integrate --check 1141 validated / 0 failed.
- fleet REAL substantive 143,322 -> 151,908; byte-identical 42.14% -> 44.64%.
- R22 clean rebuild: 136/136 byte-identical, 0 extract failures.
- open tail (paused here): 285+220 quarantined drafts (regalloc/struct/§10 residuals), the
  struct-using shared fns (shared-types-header follow-up), 077-unique remainder, T7 giants.
2026-06-17 13:21:36 -06:00
Drew T bdfb86dc4f feat(phase-15): T6 v2 — data-sig-aware harvest + struct-guarded propagate; fleet 31.22% -> 42.14%
- gen_harvest_targets.py: now also resolves canonical DATA-symbol declarations per target
  (scan the .s for D_XXXX refs -> `extern <type> D_XXXX;` from banked code) in addition to
  callee function sigs — the §14c(c) fix at the source, so agents declare both functions and
  data correctly and avoid the dominant remaining conflict class.
- v2 harvest (callee+data-sig-aware) on the 591 small still-stub call-heavy fns + a gap-fill
  agent for 6 targets dropped by a connection-closed-mid-response failure (the retry-wave
  misses truncated-non-null results). Gate: 306 verified (ov_SC01_077 1554 -> 1248 stubs).
- dedup_propagate.py: skip any struct/union-touching body — agents named structs with colliding
  generic names (`struct S`/`struct vec`) inline, so two macros' types redefine/conflict when
  instantiated in one overlay (ov_SC01_000 abort). 34 skip; struct-using shared fns stay banked
  in 077 (shared-types-header follow-up).
- 281 functions propagated fleet-wide (134 overlays each, every overlay byte-gated); dedup
  795 -> 1076 groups, dedup_integrate --check 1076 validated / 0 failed.
- fleet REAL substantive 105,764 -> 143,322; byte-identical 31.22% -> 42.14%.
- R22 clean rebuild: 136/136 byte-identical, 0 extract failures.
- cookbook §12: gap-fill is now a MANDATORY post-step for every multi-agent run (reconcile
  produced-vs-expected: missing + truncated drafts) before gating.
2026-06-17 11:59:33 -06:00
Drew T 1d94f9ec96 feat(phase-15): T6d — deterministic decl-canonicalization recovers 19 more shared fns; fleet -> 31.22%
- tools/canon_draft_decls.py: rewrites a quarantined harvest draft's extern/data
  declarations to the banked-consistent set (functions from engine_core.h DEFINE
  bodies / extern decls / inline defs; data from existing `extern <type> D_XXXX;`),
  so a draft whose BODY is byte-correct (passes match_one) but whose DECLARATION
  collided with already-banked code can re-gate cleanly. The whole-binary
  harvest_verify byte-gate stays the sole arbiter — a semantics-changing
  canonicalization just fails and reverts.
- recovered 19 of the 90 match_one-MATCH-but-conflicting quarantined failures
  (no API — immune to the rate limiting), propagated fleet-wide, all 134 overlays
  byte-identical; dedup 776 -> 795 groups, 0 failed.
- fleet byte-identical 30.48% -> 31.22%; ov_SC01_077 1574 -> 1535 stubs.
- R22 clean rebuild: 136/136 byte-identical, 0 extract failures.
- the remaining ~70 match_one-MATCH residual needs definition-widening (§14c(d),
  narrow-return) or true data-type resolution — queued for the next pass, with the
  un-started medium band (430) and the 54 genuine instruction-misses (permuter/§3a).
2026-06-17 00:30:45 -06:00
Drew T ef1cf9f05e feat(phase-15): T6 pass-1 — callee-sig-aware harvest of the call-heavy shared core; fleet 25.38% -> 30.48%
- tools/gen_harvest_targets.py: callee-signature-aware target manifest (the §14b
  extern-conflict wall-breaker). Pre-resolves each callee's EXACT signature from
  engine_core.h DEFINE bodies + extern declarations + inline defs, so drafts never
  emit a conflicting extern. Lifted call-heavy gate yield from the §14b-naive 16%
  to 60-67%.
- ov_SC01_077: 142 functions banked (1716 -> 1574 INCLUDE_ASM stubs) via the
  Ultracode parallel-draft + harvest_verify byte-gate loop (cookbook §12). The
  draft Workflow was throttled by server-side API rate limiting (stopped at
  ~246/616); the incremental gate -> dedup_propagate loop is deterministic and
  throttle-immune, so the wins banked steadily regardless.
- dedup_propagate --auto-from ov_SC01_077: ~132 functions propagated fleet-wide
  (134 overlays each), every round per-overlay byte-gated; dedup 644 -> 776 groups,
  dedup_integrate --check 776 validated / 0 failed.
- fleet REAL 85,651 -> 103,217; byte-identical 25.38% -> 30.48%.
- R22 clean rebuild: make clean + extract all 136 + check-all = 136/136 byte-
  identical, 0 extract failures.
- cookbook §14c: the wall-breaker + the 4 conflict flavors (defined / declared /
  DATA-symbol / narrow-return-widening) + the never-git-checkout-mid-harvest
  hazard + the rate-limit-resilient incremental loop. Residual = the data-symbol
  conflict class (structural canonical-decls fix queued for next pass) + the
  un-started medium band (430).
2026-06-17 00:12:23 -06:00
Drew T 9d5c087054 feat(phase-15): T5b pass-2 leaf-first harvest (+34 shared fns); fleet 25.38%
- leaf-first pass: 52 pure-LEAF unmatched-shared funcs (no jal/%hi/%lo -> match_one is an
  exact gate); 5-agent Ultracode Workflow -> 36/52 verified (69% yield, vs 16% mixed) ->
  34 propagated fleet-wide (644 groups, dedup-check 0 failed); R22 clean 136/136
- fleet REAL 81,093 -> 85,651; byte-identical 24.05% -> 25.38%
- pure leaves now ~exhausted; remaining shared core is call-heavy (extern-conflict wall)
- CURRENT_PHASE.md: RESUME HANDOFF for a fresh session (T6 callee-aware harvest, T7 giants
  + per-overlay unique, then T8 PhaseEnd) — no PhaseEnd this session (Drew)
- ghidra/ churn NOT staged (R23)
2026-06-16 22:18:06 -06:00
Drew T 2ac97878b2 feat(phase-15): T5b — Ultracode harvest pass 1 (+49 shared fns); fleet 24.05%
- 25-agent Workflow drafted + match_one-verified 300 small unmatched-shared functions;
  harvest_verify byte-gate in ov_SC01_077 verified 49 (byte-identical d19c9580);
  dedup_propagate spread them fleet-wide (610 groups, dedup-check 0 failed)
- fleet REAL 74,527 -> 81,093; byte-identical 22.14% -> 24.05%; R22 clean 136/136
- yield 16% = the call-heavy hard tail: match_one masks jal/HI16/LO16 (false MATCH on
  call-heavy fns); real misses are the extern-type-conflict wall (draft callee extern
  != the callee real macro signature). Leaf fns matched; call-heavy = open-ended tail.
- cookbook 14b documents the wall + the path forward (leaf-first, callee-signature-aware
  drafting, link-gated per-fn check)
- ghidra/ churn NOT staged (R23)
2026-06-16 21:16:46 -06:00
Drew T aefe2eac18 feat(phase-15): T5a — bulk-propagate 553 shared functions fleet-wide (3.82% -> 22.14%)
- dedup_propagate --auto-from ov_SC01_077: propagated 553 already-matched, self-contained
  shared engine functions across all 134 overlays, each byte-gated. 9 functions skipped
  (use 077-local struct types -> not mechanically liftable; honest, P9). One R22 CLEAN
  rebuild: 136/136 byte-identical.
- fleet REAL 947 -> 74,527; byte-identical 13,132 -> 76,174 / 344,010 = 22.14%; 561 dedup
  groups, dedup-check 561 validated / 0 failed
- tool hardening for fleet scale: registry SHORTHAND (vram + binaries; dedup.us.yaml ~4k
  lines vs ~77k verbose); per-overlay apply (one read/write per file); gate-only-changed;
  skip already-registered (additive/resumable); compile pre-filter (body must build with
  common.h alone); group_members() reader (both forms) in dedup_integrate + progress;
  progress _DEDUP_CACHE (fleet 6m -> 7s)
- the first bulk attempt fail-closed-reverted on a local-typed body (byte-gate working) ->
  added the compile filter; cookbook 14a documents the 5 fleet-bulk lessons
- ghidra/ churn NOT staged (R23)
2026-06-16 20:35:39 -06:00
Drew T c716eb15e1 feat(phase-15): T4 — fleet progress roll-up + fix cross-report double-count
- progress.py: refactor to report(binary) + set_binary() + a per-binary .s index
  (fleet run 6m38s -> 7s); add --fleet -> docs/progress.fleet.md (deterministic,
  source-derived per-binary table + fleet totals). Single-binary output byte-unchanged.
- fleet now: 947 REAL / 959 LINKED / 13132 byte-identical / 344010 matchable = 3.82%
  across 136 binaries (main + resident + 134 overlays)
- dup_report --cross: HONESTY FIX (R14) — an onboarded overlay is both a named BINARIES
  entry AND a .run/sig.ov_* glob hit; it was counted twice, inflating collapsible bytes
  to 58.7M once the fleet was onboarded. Dedupe by alias -> accurate 9366 h_exact groups
  / 28.6M collapsible (matches the Phase-11 figure)
- Makefile: wire progress.py --fleet into make report (main-only block)
- docs: progress.fleet.md (new), duplicates.cross.md regenerated, SETUP inventory
- make report green; dedup-check 8 validated / 0 failed
- ghidra/ churn NOT staged (R23)
2026-06-16 20:00:19 -06:00