Commit Graph

176 Commits

Author SHA1 Message Date
Drew T d5ddbc587d docs(phase-20): log consolidated state — cached ≤90-ins tail byte-exhausted; T5 is the lever 2026-06-21 09:31:20 -06:00
Drew T a978081b2d docs(phase-20): data-cast is moot (R14) — 0 data-type conflicts on the tail
- byte-proven: 0 drafts declare an extern struct/union data conflict; the lone apparent
  DATA-conflict (func_8016A8FC/D_800AE620) was a typedef-REDEFINITION (Blk20 inline vs
  engine_types.h, same type) masking the def-sig loose-typing wall. Stripping the inline
  typedef compiles but still byte-mismatches. data-cast = code for 0 cases -> not built.
- cookbook §20 DATA-conflict note corrected; fleet unchanged 58.82%.
2026-06-21 09:30:22 -06:00
Drew T 7f2f314896 docs(phase-20): -O0 ×134 rollout is INVALID — cluster is overlay-local, not reach-134 (R14)
- byte-proven: only 1/134 overlays shares ov_SC01_077's -O0 cluster bytes; the 6 matched
  -O0 fns reference per-overlay data addresses (func_8013B568 -> D_80187270 in ov_SC01_077
  but 0x80182B04 in ov_SC01_005), so they're overlay-LOCAL, not ×134-shareable. The
  Phase-18/19 'reach-134' label conflated function-present with byte-identical (R14).
- the §18 split infra (rollout tool + Makefile %_o0.o pattern + PROVIDE .ld) was built and
  byte-validated to compile/link a 2nd overlay; the whole-binary gate then exposed the
  per-overlay-data wall -> reverted (the finding is the deliverable, P9).
- -O0 rollout = ×1 per-overlay-unique re-matching (~0.2-0.3%), NOT +0.6% free -> SKIP.
  cookbook §18 corrected; fleet unchanged 58.82%, 136/136 byte-identical.
2026-06-21 09:26:44 -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 ea3ef7fb80 docs(phase-20): record candidate R30 — capture context-dependent knowledge before a fresh session
- Drew (2026-06-21): cookbook entries / byte-verified findings / distillations / doc corrections
  must be written DURING the producing session (fresh sessions get only summaries, lose the detail).
  Defer only mechanical/continuable work. Extends R16. Memory: capture-knowledge-before-fresh-session.
2026-06-21 01:25:46 -06:00
Drew T 2070cdb000 docs(phase-20): T4 — distill the codegen map (cookbook §20) + R14 loop-guard correction
- cookbook §20: the wave-at-scale GATE CAP (match_one over-predicts; the in-TU loose-typing
  call-graph wall; all recovery levers fail; the only fix is automating §17a-1 call-site casts =
  Phase-21 cap lever) + the stale-.o diagnostic lesson
- CONFIRMED-irreducible classes w/ byte-evidence: §10 store-vs-load (8014F2E0/80150528), §10
  hoist-vs-remat (80149374/801493D0); NEW classes: IV-combine combine_givs (80177AD4),
  hoisted-invariant prologue order (80177F84), the -O1 build-infra class (80161A90)
- operational gotchas: Workflow args-as-array, harvest_verify --chunk 1
- R14 correction to §17a: loop-guard (8012C2D0) is STRENGTH-REDUCTION/IV-final-value addressing,
  NOT operand-order
- SETUP §tooling: exemplar_miner.py (T2) + build_engine_types.py typedef-lift (T1) (R21)
- T3c cited (written up), T4 done; CURRENT_PHASE handoff refreshed
2026-06-21 01:24:01 -06:00
Drew T 187f7200d4 docs(phase-20): multi-session handoff — resume point for T3a/T4/T5 + the cap-recovery (Drew: continue, don't close)
- phase NOT closing; CURRENT_PHASE.md is the fresh-session resume (plan approved -> resume autonomously)
- remaining prioritized: (1) the SS17a auto-call-site-cast recovery tool (the diagnosed cap;
  recovers T6 batch-1's 33 reach-134 ~+1% + lifts every wave), (2) T4 distill, (3) T3a %lo,
  (4) T5 Ghidra-C regen + more waves, (5) -O1/-O0 split-file build-infra
- drafts preserved under .run/drafts-t6-cn/; reusable wave recipe recorded (incl. the args-as-array
  + harvest_verify --chunk 1 gotchas)
2026-06-21 01:17:48 -06:00
Drew T dab6ccb96f docs(phase-20): T6 batch-1 recovery — diagnose the loose-typing call-graph wall (gate cap)
- byte-verified: the 33 wave drafts that match_one-MATCH but fail the whole-binary gate are the
  loose-typing wall in the CALL GRAPH (a callee declared with conflicting types across overlay
  sites -> draft extern hits in-TU 'conflicting types'); match_one over-predicts (standalone +
  masks jal/hi/lo). All recovery levers fail (sig_unify/canon_draft_decls/fix_arity/no-proto/
  strip-externs); the only fix is per-site fn-ptr casts (SS17a) = Phase-21 recovery tooling
- diagnostic lesson: a failed in-TU build leaves a STALE .o (trust the whole-binary SHA, not objdump)
2026-06-21 01:12:18 -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 ba6cb87d30 feat(phase-20): T2 — exemplar_miner routes 835 residuals (WAVE 472 / PINS 45 reach-134 / STUB 90)
- tools/exemplar_miner.py: consume wall_taxonomy.json + per-overlay reach (dedup_propagate's
  computation) -> route each residual to a lever (WAVE/STRUCT/PINS/STUB); emit
  docs/exemplar_curriculum.md + .run/exemplar_routing.json (wave-gen input)
- routing: WAVE 472 (218 reach-134, T6 fuel) / STRUCT 159 / PINS 114 (45 reach-134) / STUB 90
  (74 ARITY_WALL loose-typing + 16 NONFAITHFUL, honest P9)
- KEY T3 input: 17 reach-134 fns at m2c-mismatch=1 = cleanest regalloc/schedule isolates
  (likely SS17-pins wins + the genuine class residuals); 3 named exemplars confirmed reach-134
- note: census is the Jun-19 snapshot (pre-Phase-19 waves); T5/T6 regen = authoritative WAVE list
2026-06-20 23:55:51 -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 de35505a63 feat(phase-19): scale the toolkit — 2 waves (88%/92%), fleet 56.64%->58.00%, propagation is the cap (v1.18.0)
- T1 (prior session, commit:0158/commit:0159): per-file -O0 split infra + 6 -O0 matches; deferred the
  10 %lo-folding-quirk fns + the ×134 rollout (R14 corrected "free ×134")
- T2 (commit:0161): recovery tooling. R14: the 3 Phase-18 "implicit-int" near-misses are NOT
  implicit-int -> resident-callee link-miss (NEW canon_resident_calls.py) + shared-caller arity
  (no-proto caller-extern fix). 3 matches; cookbook §17a-3 corrected
- T3 (commit:0162/commit:0163/commit:0164): 2 Ultracode waves over reach-134 tractable residuals. batch-1
  44/50 match_one (30 banked, 25 propagated ×134); batch-2 35/38 (25 banked, 10 propagated).
  NEW fix_arity_callers.py (no-proto, ALL 18 batch-2 failures were the arity class); canon-first
  2-stage gate (sig_unify REGRESSES canonical drafts); gen_harvest_targets garbled-sig fix
  (0/749, 88%->92%); build_engine_types --strip lift (+4 propagated)
- FINDING: propagation (not matching) caps the fleet-% yield — typedef/local-type bodies can't
  auto-propagate (-> Phase-20 type-lift lever). decomp.dev-comparable byte-weighted est ~30%
- check-all 136/136 BYTE-IDENTICAL (R22); dedup 1450->1485/0 failed; 0 NON_MATCHING (G4);
  fleet 56.64% -> 58.00% (+1.36%). worklog -> phase-ends/logs/Phase19.md (R19)
- bumps 1.17.0 -> 1.18.0
2026-06-20 20:33:00 -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 dce768a269 docs(phase-19): CURRENT_PHASE — T2 scoping finding + session checkpoint/resume pointer 2026-06-20 16:37:27 -06:00
Drew T c8e9258426 docs(phase-19): cookbook §18 — per-file -O0 split mechanism + the %lo-folding residual (T1 flywheel) 2026-06-20 16:35:29 -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 a741d2b6b5 feat(phase-18): compiler-quirk research -> the matching TOOLKIT, taught to waves (v1.17.0)
- RESEARCH (T0-T7): read gcc-2.7.2 source (gcc-papermario) + mined Xenogears (our exact
  compiler) -> per-class byte-gated verdicts. VERDICT REVERSAL (Drew "hand-match everything"):
  the call-crossing register-ORDER class is STEERABLE via `register __asm__` pins + a scheduling
  barrier (func_8012B8E4, the flagship "unsteerable" fn, byte-gated) -- not unsteerable.
- TOOLKIT (cookbook §17): pins+barrier (register swap), array-decay (hoist-vs-remat),
  for-loop/statement-order (structural), sig_unify-mandatory; narrow-param = honest stub.
  §16 reconciled (§10-vs-§16).
- TAUGHT TO WAVES (§17a): calibration 9/16=56% whole-binary (vs 33%); Step-1 (embedded
  canonical callee sigs + call-site-cast/re-validate) 28/31=90% match_one, 22 verified.
  ~31 reach-134 matches banked, each propagated x134. fleet 55.51 -> 56.64% (+1.13%).
- FINDING: the match_one->gate gap is declaration plumbing (call-site casts not redeclaration;
  stale M2C_UNK sibling-decl reconcile; implicit-int caller class) -- recovered deterministically.
- NEW residual classes: per-file -O0 (~18 fns, needs an -O0 split file like src/boot.c -> high
  ROI) + gcc loop-guard operand-order (irreducible). W1: build-divergence ruled out by proxy.
- make check-all 136/136 byte-identical (R22); dedup 1450 validated/0 failed; 0 NON_MATCHING (G4).
- worklog -> phase-ends/logs/Phase18.md (R19); bumps 1.16.0 -> 1.17.0
2026-06-20 15:05:52 -06:00
Drew T 151da542ab docs(phase-18): cookbook §17a (toolkit at wave scale + pipeline-integration recovery) + CURRENT_PHASE Step-1 done
- §17a: measured wave close-rates (calibration 56%, Step-1 90% match_one); the match_one->gate gap
  is declaration plumbing (call-site casts not redeclaration + re-validate; stale sibling M2C_UNK decl
  reconcile; implicit-int caller class); two NEW residual classes (per-file -O0 + gcc loop-guard order)
- CURRENT_PHASE: Step 1 done, session arc 55.58->56.64%, Phase-19 deferrals listed
2026-06-20 14:41:46 -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 ab5ccf726a docs(phase-18): CURRENT_PHASE — Step 3b done (calibration 56% close-rate, fleet 55.94%); paused for Step-1 scale-up 2026-06-20 13:41:07 -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 f28a435815 docs(phase-18): CURRENT_PHASE — full Step-3b runbook + new-session banner
- 🚨 top banner: T0-T5 'unsteerable' framing SUPERSEDED; resume 3->1->2 at Step 3b
  with /effort ultracode ON; read cookbook §17 (the corrected TOOLKIT) first
- ▶ STEP-3b RUNBOOK: the §17 toolkit summary (reconstruct/array-decay/PINS/barrier +
  the MANDATORY canonical-retype gate gotcha + stub-only narrow-param), the exact gate
  pipeline + commands (match_one/harvest_verify/dedup_propagate, ov_SC01_077 good-sha
  d19c9580), the durable worked examples (engine_core.h DEFINE_func_8012B8E4/801399A8),
  the staged assets (harvest_wave_s4.js, probe_targets_s4.json, .run/ghidra_c/), fleet
  baseline 55.58%/136-of-136, and the Step 1->2 close path
- everything a fresh full-context session needs to author the upgraded wave + run it
2026-06-20 12:56:15 -06:00
Drew T 23666cb284 docs(phase-18): CURRENT_PHASE — verdict reversal + the 3->1->2 plan; step 3a done 2026-06-20 12:33:33 -06:00
Drew T 667504a4ba docs(phase-18): correct §17/§8e — register-order class is STEERABLE via pins (not unsteerable)
- §17 rewritten: the call-crossing register-ORDER class is MATCHABLE with register
  __asm__ pins + a scheduling barrier (byte-proven func_8012B8E4), not unsteerable.
  The wall was a missing lever (the pins), not an impossibility. Recipe documented as
  a TOOLKIT: triage with match_one -> reconstruct / array-decay / PINS / barrier.
- §16 cross-refs + hand-matching §8e corrected to match. The ONLY genuine stub-and-skip
  left is the narrow-param loose-typing conflict (func_80146A6C).
- self-correction (P9/R14): I concluded 'unsteerable' before trying the pins; Drew's
  hand-match-everything directive exposed the gap. Recorded honestly.
2026-06-20 12:33:08 -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 bd9ee97854 docs(phase-18): W1 — build-divergence ruled out by proxy (Wine install dropped)
- the build-divergence escape is closed without the heavy Wine/CC1PSX run:
  * gcc-2.7.2-psx byte-matches ~700 fns (incl. call-crossing callee-saved values)
    -> its global allocation IS faithful to the original compiler -> real CC1PSX
    would emit the SAME unsteerable swap
  * cdk cc1 tested directly: diverges but WORSE (32 vs 21) -> cc1-switch doesn't crack it
  * Xenogears (real-era toolchain) ships the class as asm
- Wine is a heavy install here (106 pkgs + i386 + wineprefix); low marginal value ->
  deferred per the plan escape clause; binaries staged at tools/psyq/psyq4.0/ if wanted
- R22: clean-rebuild of ov_SC01_077 with the match = d19c9580 BYTE-IDENTICAL
- all Phase-18 tasks complete; ready for gate-2 milestone confirmation
2026-06-20 11:56:30 -06:00
Drew T ceecaeb235 docs(phase-18): T5 — cookbook §17 (steerable-vs-not) + reconcile §10-vs-§16
- cookbook §17 (NEW): the compiler-quirk wall, gcc-2.7.2-source + Xenogears confirmed:
  * UNSTEERABLE: call-crossing $s0/$s1 allocation ORDER (global.c allocno_compare density;
    exhaustive C/flag/cc1 sweep + Xenogears ships-as-asm corroboration) -> stub it (G4)
  * STEERABLE idioms: array-decay-forces-remat (NEW), for-loop-vs-do-while delay-slot
    scheduling (NEW), statement-order (§2-T2 ext); + reconfirmed branch-polarity/mask-local
  * pipeline gotcha: match_one masks relocs -> sig_unify/canonical-retype is MANDATORY
    before harvest_verify (the conflicting-types gate failure)
  * loose-typing narrow-param wall is REAL (func_80146A6C lhu/s16 vs canonical s32/lw)
- §16 reconciled: the 'not source-steerable' line cross-refs §17; §10-vs-§16 tension
  resolved by naming the residual class precisely (both right about different residuals)
- hand-matching-process.md §8e: Phase-18 outcome re-scopes the Phase-19 wave
  (triage-and-stub the unsteerable; spend on non-walled STRUCTURAL_MISS)
2026-06-20 11:54:07 -06:00
Drew T 92a0ab4a9a docs(phase-18): T4+T6 record — idioms byte-validated; STRUCTURAL_MISS is mixed
- T6 2nd attempt (func_80146A6C): 18=18 ins, 8 mismatched, blocked by the Phase-16
  LOOSE-TYPING wall (target loads a4 as s16/lhu; canonical engine_core.h sig declares
  a4 s32/lw -> no consistent type). So STRUCTURAL_MISS is mixed: some close, some walled.
- T4: per-class idiom verdicts set (for-loop+statement-order+sig_unify byte-gated to a
  full match; branch-polarity + array-decay-remat = real codegen fixes via match_one;
  regalloc-order byte-proven unsteerable)
- CURRENT_PHASE updated (crash-recovery log)
2026-06-20 11:51:30 -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 eb90cacd72 feat(phase-18): T2+T3 — regalloc-order UNSTEERABLE (corroborated); array-decay-remat idiom
- T2 (Xenogears mine, 2 bg agents): independent decomp on IDENTICAL gcc-2.7.2-psx -O2
  has NO C lever for the call-crossing $s0/$s1 ORDER class; ships it as INCLUDE_ASM
  (1174 nonmatch). Their idioms: variable-split, width/cast, per-file compiler-switch.
- flag/cc1 sweep (func_8012B8E4): -funsigned-char/-fpcc-struct-return/-fpeephole/
  -fcaller-saves all 21 (no change); cdk worse (32); -fno-schedule-insns worse (71)
- T3 verdict: regalloc-ORDER class = UNSTEERABLE from C (global.c density ordering;
  exhaustive empirics + independent corroboration)
- NEW IDIOM found on func_8012B4B8 (remat class): array-decay forces rematerialization
  (s32 mtx[8] passed as decay -> remat not hoist; fixes 88->52 incl. the hard regalloc).
  &struct/.w/*(M8*) all hoist. Bankable; this fn has a struct-copy conflict so partial.
- synthesis: .run/p18/T2_T3_synthesis.md; reconciles §10-vs-§16 for T5
- strategic redirect: high-reach circular tail largely unmatchable from C -> match-%
  lever is the tractable-247 wave (Phase 19) + accept the tail as asm (Xenogears policy)
2026-06-20 11:35:33 -06:00
Drew T c5fc6789bf feat(phase-18): T1 gate — branch-polarity §10 win; regalloc residue is global.c ordering
- replayed §10 levers on func_8012B8E4 under match_one (the floor-free oracle):
  - §3-T4 branch-polarity invert: 24 -> 21 mismatched (a real §10-family win the
    permuter's floor-polluted score could not measure in Phase 17)
  - statement-order: no effect; coupling s1ang+u6: regressed to 71; -O3: identical alloc
- ROOT pinned via the cloned gcc-2.7.2 source: the residual $s0<->$s1 swap is two
  ratan2-call-crossing pseudos allocated by global.c:allocno_compare (density =
  log2(n_refs)*n_refs/live_length), NOT local-alloc; short-lived s1ang wins $s0
- GATE = NO branch (§10 helps but doesn't close) -> T3 sharply scoped + mechanism-pinned;
  func_8012B4B8 (hoist-remat+struct) baselined (88 mismatched), deferred to T3/T4
- CURRENT_PHASE updated; findings in .run/p18/ (gitignored scratch)
2026-06-20 11:21:40 -06:00
Drew T d20b20c64b feat(phase-18): T0 — setup + exemplar set; match_one validated as the §10 oracle
- clone gcc-papermario (a6afc2af) + xenogears-decomp (f27c0768) -> tools/reference/
  (gitignored research refs; SHAs pinned in docs/SETUP.md §5.6, R20/R21)
- apparatus byte-validated: match_one cleanly measures the §10 residual on both quirk
  exemplars (the floor-free oracle Phase 17 failed to use; permuter score was polluted):
  - func_8012B8E4: 75=75 ins, 24 mismatched -> $s0/$s1 regalloc swap + reassociation (§10 A)
  - func_8012B4B8: 94 vs 84 ins, 88 mismatched -> extra-reg spill + struct-copy/reload (§10 B)
- CURRENT_PHASE.md crash-recovery log; harness task list (R28); no build-affecting change
2026-06-20 11:08:21 -06:00
Drew T c4b0cef86a feat(phase-17): close — canonical-sig layer built; the wall is the compiler, not sigs; pivot to gcc research (v1.16.0)
- canonical-sig layer (session 4): tools/census_conflict_callees.py + derive_canonical_sigs.py
  -> a 20-extern byte-neutral block atop ov_SC01_077.c (LOCAL, not engine_core.h); census
  conflict callees 20->0, blocked targets 24->0; gate pipeline now draft -> sig_unify (MANDATORY)
  -> harvest_verify --chunk 1; fleet 136/136 byte-identical (R22), 55.51% (no regression)
- FINDING (R14/P9): the conflict wall is 7%-reach not ~2x; the 4 reach-134 circular targets are
  ALL gcc-quirk/regalloc/layout-bound (0 banked); the high-reach core IS the quirk tail; struct
  types are byte-neutral for matching (the wall is gcc codegen, not knowledge)
- leverage analysis: fleet % is function-count-weighted (size adds no %); "unblock many" = the
  layer (declaration, not matching); reach is the lever (already reach-sorted); 247 tractable
  reach-134 stubs ~ +3-4% projected
- GO/NO-GO: NO-GO on brute waves at the current ceiling; GO on a compiler-quirk research phase
  (read gcc-2.7.2 source + Xenogears + the §10/regalloc classes, R17) -> then resume the wave
- docs: cookbook §16 corrected + hand-matching-process.md §8 (the layer + the finding + handoff)
- worklog archived -> phase-ends/logs/Phase17.md (R19); bumps 1.15.0 -> 1.16.0
2026-06-20 09:35:18 -06:00
Drew T f0dd9351e4 docs(phase-17): flywheel + handoff up to date — canonical-sig wall is the scaling lever
- CURRENT_PHASE.md: new session-4 START HERE (build the canonical-sig layer, then
  scale the wave); old demo-protocol START HERE marked superseded
- hand-matching-process.md S7: the Ultracode harvest wave (pipeline, calibration
  result 60% match_one / 33% whole-binary / +0.47%) + THE CANONICAL-SIG WALL (the
  60->33 gap is 100% sig conflicts; surgical per-callee canonicalization = ~2x lever)
- matching-cookbook.md S16: guided-hand-matching breakthrough + new idioms (mask-local,
  shared-ret0 goto, v0/v1 coalescing) + the wave/canonical-sig finding (R16 flywheel)
- SETUP.md: DecompileFunctions.java (headless batch Ghidra-C pre-pass) in the inventory (R21)
2026-06-19 21:16:41 -06:00
Drew T d369da8162 docs(phase-17): CURRENT_PHASE log — session 3 (task 1 + calibration wave, +0.47%) 2026-06-19 20:56:16 -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 28c23f4be8 feat(phase-17): task-1 — bank func_8015F9A4 (fnptr close) + firm the rate
- func_8015F9A4 byte-matched + banked inline in ov_SC01_077 (whole-binary gate
  d19c9580, BYTE-IDENTICAL); a near-clone of the demo's func_8015F89C fnptr close
  -> fnptr-call class confirmed reliably closeable (2/2)
- firmed the rate: loop reconstructs CORRECT bodies 4/4, but byte-close is gcc-quirk
  bound. func_8014C308 (relocs=0, x134) structurally perfect, v0/v1 regalloc only
  (permuter stuck 455->140); func_80130AF0 (x134) body-100% but S10 delay-slot remat;
  func_8016B4F8 phantom -O2 frame. Drafts in .run/demo/ (gitignored)
- new reusable idioms (hand-matching-process.md S2): mask-local (defeats lh->lhu fold),
  shared-ret0 goto (cross-jump clustering + branch polarity)
- harvest sizing (S6): tractable easy classes are LOW-reach (fnptr 0.1%, void-widen
  0.3%); the x134 yield is locked in quirk-heavy STRUCTURAL_MISS (7.6%)/PERMUTER_CLASS
  (3.6%). Permuter route refuted (T6 callee-inlining + func_8014C308 slow). Lever =
  Ultracode guided-hand-matching wave on the high-reach tractable subset
- plan revised (Drew, A-only): harvest tractable first; giant func_80144B9C deferred
2026-06-19 20:06:33 -06:00
Drew T 19f005ea11 feat(phase-17): guided hand-matching demo — GO; 4/5 close-rate; loose-typing wall breakable
Pivot from the failed brute-force to the Ghidra-driven hand-match loop (Drew's steer).
DEMO sampled 5 residuals; 4 reached full whole-binary byte-matches:
- func_8012D3B4 (PERMUTER_CLASS) — closed + propagated x134 (DEFINE_func_8012D3B4)
- func_8012832C (STRUCTURAL_MISS switch) — closed
- func_8015F89C (fnptr-call, §15-S2) — closed
- func_80147B5C (pure struct) — closed (first try)
- func_8012A328 (STRUCTURAL_MISS) — 60/60 structure + correct regs, 1-instr gcc
  placement quirk (the §10 hard-tail minority; permuter floor-polluted)

KEY FINDING: the Phase-16 "loose-typing wall" is a signature-CONSISTENCY problem, not
fundamental — resolved by a 5-move playbook (return-widening void->s32; sign cast (u16);
arity cast — refines the §14e arity dead-end; param-canonical-matching; fn-ptr-table
typing), all byte-neutral.

- canonical-widenings (byte-neutral, fleet re-verified): engine_core.h RotTransPers +
  func_80029504 -> s32; ov_SC01_077.c func_801288B0/801289F0 -> s32
- docs/hand-matching-process.md (NEW): full replicable process + idioms + the §3a
  playbook + current banked state + automation roadmap (fresh-session-safe)
- fleet: make check-all 136/136 byte-identical (R22); 55.00% -> 55.04%; dedup-check 1409/0
- config/dedup.us.yaml: +1 group (func_8012D3B4, 134 members)
- CURRENT_PHASE.md progress log updated
2026-06-19 18:03:49 -06:00
Drew T fa925913e3 docs(phase-17): START HERE handoff — pivot to guided hand-matching + the demo protocol
Capture the strategic pivot (Drew, 2026-06-19) and everything the fresh session needs:
- NO-GO on the 5-day brute force; GO on guided hand-matching (whole-binary-gated, ×134/match)
- the demo protocol (prove the loop on a medium struct-using fn, then a giant)
- THE CRUX: gate whole-binary, not match_one (isolated masks relocations -> doesn't transfer)
- the actor struct (base 0x80078E00 + confirmed fields + files) as the hand-matching asset
- tooling map, candidate targets, fleet-extract note
- deferred & decided (CUDA/ML = research wildcard not the plan; emulator naming paused)
- effort=Max for hand-matching (re-set, session-only); /mcp after the SessionStart restart
After the demo + PhaseEnd: plan-mode a whole-binary-gated permuter driven by Ghidra-C.
2026-06-19 13:46:55 -06:00
Drew T 40f2bc8bdc docs(phase-17): T6 — permuter yields 0 whole-binary matches (isolated != whole-binary TU)
The permuter closes isolated near-misses (3-4/8 in <=75s; converted winners match_one
MATCH 17/53/54 ins) but 0/4 survive the whole-binary gate. Root cause (R17): the isolated
compile context differs from the whole-binary TU (callee inlining in the one-big-file
077.c), so match_one's "isolated == whole-binary" assumption is false for these and the
permuter optimizes the wrong target. This is the mechanism behind Phase 16's "42% mirage".
All 5 avenues tested: T2=0, T3=+0.52% (banked), T4/T5 byte-neutral, T6=0. The harness
ceiling did not rise to eureka. NEXT: T7 go/no-go (Tier-1/Max).
2026-06-19 13:20:23 -06:00
Drew T 1431b523a4 feat(phase-17): T4+T5 — actor struct recovered (comprehension) but byte-neutral for matching
- recovered the engine actor/player struct cold via PCSX-Redux (R10/R11): base 0x80078E00,
  ~154 fields over 0x24C bytes, 32 pointer fields; HP/BP/gold/day/hour/position/BP-drain all
  live-verified and anchored to the Phase-3 player state + the walk diff. -> docs/actor-struct.md
- tools/ram_probe.py: PCSX-Redux RAM capture/diff/read/ptr-scan workhorse for field-typing
- FINDING (the matching verdict): feeding the struct to m2c as --context is BYTE-NEUTRAL.
  m2c adopts it (arg0->f_X) but structural-miss sample scores 0 better / 10 same / 2 worse vs
  m2c-alone (full code+RAM pointer set). The misses are 50-98% mismatched = m2c decompiler
  limits, not missing types. T4 fn-ptr context unblocks compilation but functions stay structural.
- conclusion: rich context (struct/type recovery) is a comprehension / decomp.me win, NOT a
  byte-match lever -> Phase-16 wall re-confirmed from the type angle. struct-core-pivot.md updated.
- emulator field-naming pass deferred (comprehension, off the matching path); NEXT: T6 permuter
  validation on the 146 genuine near-misses, then T7 go/no-go.
2026-06-19 13:03:14 -06:00
Drew T 7380ed4b81 docs(phase-17): checkpoint — T4 investigation (m2c-context fnptr mechanism proven; T5 struct is the byte-lever)
T4 in progress: proved the m2c --context fn-ptr-table mechanism, mapped byte-safe
shared-header integration (163 ground-truth + 186 used tables), found the fn-ptr fix
unblocks compilation but the byte-lever is T5's actor struct -> build T4 generator +
T5 struct together. No code artifact yet (probes in .run scratch). Paused for Drew's
PCSX-Redux emulator field-typing (T5) scheduling. Tree clean; all binaries byte-identical.
2026-06-19 12:25:20 -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 edb0360d30 feat(phase-17): T1 wall taxonomy — census the 957 residuals, size every avenue (skip T2)
- tools/wall_taxonomy.py: full-census classifier (m2c --valid-syntax -> match_one ->
  sig_unify + full-overlay-TU cc1) labels every unmatched ov_SC01_077 stub by blocker
  class; reproducible (~22s, --jobs 16); read-only (throwaway _wt_*.c, auto-removed)
- docs/wall-taxonomy.md: ranked taxonomy + per-lever aggregation + sequencing recommendation
  (957 residuals, 99.2% carry an actionable label)
- findings (byte-gate-validated, R14: SIG_FIXABLE_KR = exactly the 4/4 gate-passing set):
  - T4+T5 rich context (struct/jump-table/fn-ptr-table types) = 67% reach, incl. all 30 jtbl giants
  - T6 permuter = 146 candidates (101 <=4-mismatch near-certain)
  - T3 sig_unify = 48 gate-proven immediate wins
  - loose-typing WALL = 99 (10%); non-faithful defer = 16
  - T2 DATA-symbol byte-array header = 0 functions -> SKIP (the cookbook §14c-c lever is empty)
- recommended resequence: T3 -> T4+T5 (built together) -> T6 ; drop T2 (pending Drew's P5d nod)
- struct-core-pivot.md: Phase-17 quantification note; CURRENT_PHASE.md: T1 done + resequence
- all binaries byte-identical (T1 read-only; ov_SC01_077 d19c9580 clean rebuild)
2026-06-19 11:31:41 -06:00
Drew T f3f15649f1 docs(phase-16): PhaseEnd — pivot from m2c+permuter to type-recovery (v1.15.0)
- PhaseEnd_Phase16.md: the loose-typing wall (byte-proven), the kept harness fixes, the unattended
  driver (built/not-deployed), and the new research directions (emulator -> Ghidra type propagation).
- CURRENT_PHASE.md archived -> logs/Phase16.md (R19).
- Negative-but-decisive result (Phase-3.5 precedent); bumps 1.14.0 -> 1.15.0.
2026-06-19 10:12:22 -06:00
Drew T 9062f0fcc0 docs(phase-16): PIVOT — m2c+permuter won't crack the loose-typed core; new plan + harness fixes
- docs/struct-core-pivot.md: findings + decision + new research directions. Root cause = the
  original engine is LOOSELY TYPED (K&R; same fn called with int/ptr, arg/no-arg across sites),
  so no single canonical signature exists -> m2c guesses inconsistently, permuter can't fix
  semantics, byte-gate (correctly) rejects. Yields ~3%, not the crack. New plan: emulator-recover
  the actor struct/types -> Ghidra global type propagation -> Ghidra-C -> permuter+gate.
- harness bug-fixes (REAL, kept): p16_permute output-0-only match (killed the false '42%'),
  base.c keeps callee externs, winner_to_draft line-strip; sig_unify canonicalizes m2c's
  no-extern prototypes; gen_engine_decls.py (documents why a global canonical header breaks
  loose-typed matches).
- a few byte-gated leaf matches banked in ov_SC01_077.c.
2026-06-19 10:05:58 -06:00