Files
BFM-decomp/docs
Drew T fcd83f705e fix(phase-29): the undo was EATING the tree — snapshot src too; kill the §58 label; giant func_8018F694 banked
THE DEFECT (byte-witnessed, and it is the §61c mechanism). `jr_isolate_all`
repartitions a code object by writing region 0 back over the ORIGINAL
src/<ov>/<nm>.c — TRUNCATED to just that region — and emitting the rest as new
_jr_<lo>.c files. `_jtbl_restore` undid only config/ + the new region files, so
every gate-REJECTED draft left the original TU permanently truncated and its
stubs gone. Nothing regenerates them (splat does not rewrite a committed overlay
.c). Measured across an 11-draft re-probe: live stubs 419 -> 414 -> 406 -> 395,
ending in `undefined reference to func_80191C50`.

It is INVISIBLE to the gate that causes it: the incremental build keeps linking
stale objects (§42b) so `make build` stays green while a CLEAN rebuild fails.
That is exactly the "139/140, twice" signature that became the §61c blocker —
the tree was being eaten by the undo meant to protect it. The §61c attribution
(batch _jtbl_prep residue) is now a demonstrated defect, not an inference.

FIXES (both negative-control-validated on a draft that fails):
- _jtbl_snapshot captures every src/<binary>/*.c; _jtbl_restore restores them and
  removes exactly the files the attempt created (derived from the snapshot's file
  set, not re-guessed from the _jr_* name shape, R33). Undo by SNAPSHOT-RESTORE,
  never an inverse transform — §61's law one level deeper. Same failing draft that
  previously broke the tree now leaves it byte-identical, git status clean.
- classify_fail ignores `warning:` lines. The benign `conflicting types for
  built-in function 'memcpy'` warning was winning the match on 8 of 8 failures
  across four different real causes — a label identical for every input, which the
  cookbook had to work around by hand ("the gate label is useless here, splice
  individually and read real cc1 stderr"). Now reports the real error, and falls
  through to CC1-FAIL:<last error line> rather than guessing.

THE RE-PROBE THIS ENABLED (11 preserved t5wave cracks, one invocation each):
- BANKED: func_8018F694 (478 ins) — one of the wave's three giants, previously
  recorded as part of "the gate banked ZERO".
- The other 10 now carry TEN DISTINCT diagnoses: 4 data-decl conflicts (D_80193B64
  x2, D_8011D030, D_80126B5C), 3 callee-decl (func_80135480 x2, func_8012F14C),
  3 self-decl/own-sig (§57). ZERO jtbl-drift, ZERO local-type redefinition, ZERO
  codegen DIFF.
- So §61a's "§8e-2 jtbl table-count drift blocks 10 of 12" does NOT survive the
  carve-follows-splice prep: the carve now succeeds and what is left is ordinary
  decl plumbing the existing ladder already handles (cast_call_sites / reconcile_tu
  / normalize_self_decls / fix_arity_callers) = Task 14 stages 2-3, no new tooling.

- ov_SC06_018 BYTE-IDENTICAL cbbc4f44 with the giant banked; nothing committed broken
  at any point (tree was restored from HEAD and re-verified before these fixes)
- cookbook: the `git add -u` complementary hole (an isolation's NEW region file is
  untracked, so a carve/isolation bank needs `git add -A src/ config/`)
2026-07-22 01:30:30 -06:00
..