Files
BFM-decomp/tools
Drew T 91e5c4c294 feat(phase-24): T6 — integration-recovery tool (gate-recovery proven; ×134 propagation deferred)
The integration-recovery tool for leaf-MATCH-but-whole-binary-gate-rejected fns ("declaration/TU
plumbing" — the dominant residual gate_stage's canon/cast/sig_unify pipeline doesn't reach).

- tools/recover_integration.py (NEW): batch recovery — gather leaf-MATCH candidates (--auto from
  the backlog, drift-checked R14; or --funcs/--from-file) → no-proto their conflicting caller decls
  → gate_stage (byte-gate + log). 2-PASS snapshot/restore: pass 1 finds the bankable set, pass 2
  re-banks ONLY winners from the clean snapshot (so non-banks are never corrupted).
- tools/fix_arity_callers.py: extended with --binary — scan+rewrite the overlay's OWN inline caller
  decls (src/<bin>/<bin>*.c), not just engine_core.h. That was THE gap: a conflicting caller extern
  is often inline in the overlay src (e.g. func_8016E778's `extern void f(void)` vs def `f(int)`),
  which fix_arity_callers never saw -> the fn stayed unbanked.
- VALIDATED: banked 13 leaf-MATCH fns (func_8014F74C/801542A4/8015BE94/8015F380/80160F00/801653B8/
  80166244/8016E778/801732C4/8017331C/80173374/80174554/801745AC), CLEAN-verified together
  (ov_SC01_077 d19c9580). The banks themselves are reverted here (they re-bank via the tool and
  will land ×134 once propagation-recovery lands — cleaner than committing ×1).
- R14 lesson (clean-verify caught it, R22): fix_arity_callers --revert is LOSSY for --any-proto
  (()->(void), not back to the original args) -> corrupted non-banks; fixed with the 2-pass snapshot.
- REMAINING T6 (×134 propagation-recovery, 3 diagnosed blockers): (1) dedup_propagate find_site
  misses INDENTED inline defs (Phase-15 class); (2) overlay-local-type lift; (3) auto-reconcile the
  straggler's conflicting caller externs (the flagship func_80132784 / ov_SC02_005 class, done by
  hand — needs automating). See CURRENT_PHASE.
2026-07-03 13:33:13 -06:00
..