Files
BFM-decomp/docs
Drew T cbb52ebce1 feat(phase-29): fix_header_decl.py — automate the fresh-138 def-side header reconcile (§63)
Builds + self-tests the tool that reconciles a shared-header forward-decl to a
function's byte-true signature — the integration half of the proven func_8014CD80
x138 pipeline.

- tools/fix_header_decl.py: --fn --draft [--check|--apply]. Parses the byte-true
  def sig, canon-compares (typedef-aware int==s32, unsigned short*==u16* -> skip
  ALREADY-OK), REFUSES ABI-changing rewrites (param-count / ptr<->scalar / scalar
  class), preserves the macro `\` continuation, snapshots + prints the git-restore
  (§61: undo = restore, validate fleet-wide by R22).
- 4 self-tests pass: (1) idempotent on the already-fixed func_8014CD80; (2) correct
  rewrite + `\` preserved; (3) REFUSE on a 2-vs-3-param ABI mismatch; (4) end-to-end
  --apply on func_8014D12C turned the `conflicting types` PLUMBING into a clean
  codegen DIFF (plumbing dissolved; its body is a near-miss so no bank), reverted
  clean. The self-test CAUGHT two fleet-corrupting bugs before any apply (a dropped
  macro `\`, and non-idempotent int/s32).
- cookbook §63 + CURRENT_PHASE. NEXT: fresh-family wave over the 38-family market
  -> fix_header_decl --apply -> harvest_verify -> dedup_propagate -> R22.
2026-07-23 12:15:49 -06:00
..