Commit Graph

114 Commits

Author SHA1 Message Date
Drew T 3074584982 feat(phase-21): grinder gate — +1 fns x1 propagated (fleet 62.23%) 2026-06-23 12:45:22 -06:00
Drew T c2bad12d6c feat(phase-21): worker gate — +13 fns x12 propagated (fleet 62.19%) 2026-06-23 12:39:39 -06:00
Drew T c9e7c26af4 feat(phase-21): grinder gate — +1 fns x0 propagated (fleet 61.73%) 2026-06-23 12:19:06 -06:00
Drew T 296d834467 feat(phase-21): worker gate — +13 fns x13 propagated (fleet 61.73%) 2026-06-23 12:18:12 -06:00
Drew T 50070aad94 feat(phase-21): grinder gate — +2 fns x0 propagated (fleet 61.22%) 2026-06-23 12:01:50 -06:00
Drew T 1e2d905b5c feat(phase-21): worker gate — +8 fns x0 propagated (fleet 61.22%) 2026-06-23 11:48:21 -06:00
Drew T 6420413571 feat(phase-21): worker gate — +13 fns x0 propagated (fleet 61.22%) 2026-06-23 11:09:23 -06:00
Drew T 80ba81ffa8 feat(phase-21): worker gate — +14 fns x0 propagated (fleet 61.21%) 2026-06-23 10:33:43 -06:00
Drew T 50bc85d72b feat(phase-21): worker gate — +11 fns x0 propagated (fleet 61.21%) 2026-06-23 03:36:16 -06:00
Drew T b58aef625c feat(phase-21): worker gate — +17 fns x0 propagated (fleet 61.21%) 2026-06-23 03:07:39 -06:00
Drew T cbdbe04229 feat(phase-21): worker gate — +17 fns x0 propagated (fleet 61.2%) 2026-06-23 02:43:01 -06:00
Drew T fea30940b3 feat(phase-21): worker gate — +16 fns x0 propagated (fleet 61.2%) 2026-06-23 02:20:05 -06:00
Drew T df88ca83ba feat(phase-21): worker gate — +16 fns x0 propagated (fleet 61.19%) 2026-06-23 02:02:54 -06:00
Drew T c20d87207e feat(phase-21): worker gate — +21 fns x0 propagated (fleet 61.19%) 2026-06-23 01:38:06 -06:00
Drew T 8484dfc6f1 feat(phase-21): worker gate — +18 fns x0 propagated (fleet 61.18%) 2026-06-23 01:25:51 -06:00
Drew T 9f028b8f68 feat(phase-21): worker gate — +17 fns x0 propagated (fleet 61.18%) 2026-06-23 01:06:05 -06:00
Drew T 7d4c1582eb feat(phase-21): worker gate — +21 fns x0 propagated (fleet 61.17%) 2026-06-23 00:46:48 -06:00
Drew T 8851053417 feat(phase-21): worker gate — +15 fns x0 propagated (fleet 61.16%) 2026-06-23 00:36:17 -06:00
Drew T 3299d7f1a2 feat(phase-21): worker gate — +1 fns x1 propagated (fleet 61.16%) 2026-06-22 10:51:47 -06:00
Drew T 382a559502 feat(phase-21): worker gate — +2 fns x2 propagated (fleet 61.12%) 2026-06-22 09:27:29 -06:00
Drew T 72e71811d3 feat(phase-21): grinder gate — +1 fns x1 propagated (fleet 61.04%) 2026-06-22 08:54:00 -06:00
Drew T b1272109c0 feat(phase-21): worker gate — +3 fns x2 propagated (fleet 61.0%) 2026-06-22 08:51:03 -06:00
Drew T 9e9278d4a8 feat(phase-21): grinder gate — +1 fns x1 propagated (fleet 60.93%) 2026-06-22 05:31:06 -06:00
Drew T c63a41b1a8 feat(phase-21): worker gate — +1 fns x1 propagated (fleet 60.89%) 2026-06-22 05:07:05 -06:00
Drew T 43a356b3fb feat(phase-21): worker gate — +6 fns x5 propagated (fleet 60.85%) 2026-06-22 04:25:30 -06:00
Drew T 06496b5238 feat(phase-21): worker gate — +4 fns x4 propagated (fleet 60.65%) 2026-06-22 03:30:16 -06:00
Drew T 33e21d3050 feat(phase-21): worker gate — +3 fns x3 propagated (fleet 60.5%) 2026-06-22 02:50:42 -06:00
Drew T 77644039b8 feat(phase-21): worker gate — +6 fns x6 propagated (fleet 60.38%) 2026-06-22 02:10:22 -06:00
Drew T 7d46a6056e feat(phase-21): worker gate — +4 fns x4 propagated (fleet 60.15%) 2026-06-22 01:34:03 -06:00
Drew T 8a6db99b85 feat(phase-21): worker gate — +3 fns x3 propagated (fleet 59.99%) 2026-06-22 00:53:33 -06:00
Drew T 1332f43d55 feat(phase-21): worker gate — +4 fns x4 propagated (fleet 59.87%) 2026-06-22 00:05:35 -06:00
Drew T 28767a6a07 feat(phase-21): worker gate — +1 fns x1 propagated (fleet 59.72%) 2026-06-21 23:26:10 -06:00
Drew T a1b29eac8a feat(phase-21): recovery gate — +2 fns x2 propagated (fleet 59.68%) 2026-06-21 22:51:51 -06:00
Drew T 125222d14e feat(phase-21): worker gate — +7 fns x6 propagated (fleet 59.6%) 2026-06-21 22:35:16 -06:00
Drew T 7f272eb6b8 feat(phase-21): worker gate — +5 fns x4 propagated (fleet 59.37%) 2026-06-21 22:02:17 -06:00
Drew T 1d7c31393c feat(phase-21): worker gate — +7 fns x4 propagated (fleet 59.21%) 2026-06-21 15:17:27 -06:00
Drew T 4d00a40609 feat(phase-21): worker gate — +4 fns x2 propagated (fleet 59.05%) 2026-06-21 13:50:39 -06:00
Drew T bee543722d feat(phase-21): worker gate — +1 fns x1 propagated (fleet 58.98%) 2026-06-21 13:04:40 -06:00
Drew T 76c5feb116 feat(phase-21): worker gate — +1 fns x1 propagated (fleet 58.94%) 2026-06-21 12:50:16 -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 f1a7e518f5 feat(phase-20): T3a CRACKED — %lo-folding -O0 falls to the array-of-struct idiom
- the %lo-folding indexed-global -O0 residual (§18, long "irreducible") is CRACKED: declare
  the global as "extern Struct base[]" (sizeof == stride) and access "base[i].field" -> gcc
  keeps sym a symbol_ref and folds %lo(sym+off) into the store, byte-matching. The failing
  forms "*(T*)(&sym + i*stride)" materialize &sym as a value first, blocking the fold.
- func_8013B7AC byte-gated + banked (x1 — the -O0 cluster is overlay-local, R14 finding above);
  the idiom is reusable fleet-wide for ANY indexed-global access (-O0 or -O2).
- cookbook §18 ("%lo-folding indexed global — CRACKED") + §20 placeholder closed.
- the other 9 -O0 stubs: idiom applies but need per-fn -O0 drafting (3 quick ones tried, failed
  on -O0 codegen detail; 4 are large) -> backlog/autonomy fuel. clean rebuild d19c9580 (R22).
2026-06-21 09:58:01 -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 be33b887fe feat(phase-19): T1 -O0 split lever — infra proven + 6 -O0 fns matched (ov_SC01_077)
- config/splat.ov_SC01_077.yaml: 3-object code split (ov_SC01_077_a before /
  ov_SC01_077_o0 -O0 cluster / ov_SC01_077 after). A single object's .text cannot be
  split around a middle object, so before/after are distinct objects; the after-region
  keeps the ov_SC01_077 name (bulk matched C + asm paths unchanged).
- Makefile: target-specific CC1FLAGS:=-O0 for ov_SC01_077_o0.o (src/boot.c precedent).
- src/ov_SC01_077/ov_SC01_077_a.c (new before-region) + ov_SC01_077.c (after-region) +
  ov_SC01_077_o0.c (new -O0 cluster): 6/16 -O0 fns matched byte-perfect
  (func_8013B568/B7F4/BD34/C360/C938/C964).
- DEFERRED to Phase 20 (Drew, on the discovered difficulty): the 10 remaining -O0 fns hit
  an indexed-global %lo-folding codegen quirk (gcc-source research, R17) + the x134
  per-overlay rollout (engine_core.h compiles -O2, cannot carry -O0 fns). Corrects the
  Phase-18 backlog premise (afternoon/free-x134) per R14. Documented in ov_SC01_077_o0.c.
- verified clean: main 143dbb89, resident 8e17e02f, ov_SC01_077 d19c9580 + 2 overlays.
2026-06-20 16:30:39 -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