Commit Graph

6 Commits

Author SHA1 Message Date
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 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 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 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