Files
BFM-decomp/docs
Drew T 6fad5d19c8 feat(phase-29): T43 — func_80140D68 banked + swept 137/137; the §94 extract_unit CARRY GAP characterized
The §99 conform_decls pass REFUSED this one (§85: 414 callers consume the return), so it was solved
from the DRAFT side. Three blockers, each measured:

1. §94 type-carry, and the draft's own header asserted something FALSE — it claimed both typedefs
   already exist in engine_types.h. Measured: Hw4 1 hit, Prim4 1 hit, Env_800D29F8 ZERO. So in the
   real TU the #ifndef guard is DEFINED and the typedef vanished -> "parse error before D_800AE7BC".
2. Signature axis: conformed the DRAFT to the fleet's declared `s32 *` return, then param 2
   (s16 * -> Prim4 *). Byte-neutral because `src` is used EXACTLY once, as (s32)src. The error
   ("argument `src' doesn't match prototype") is again printed with NO "error:" prefix.
3. The family sweep went 0/137 TWICE before 137/137.

THE REUSABLE FINDING — a 0/N sweep whose exemplar banks cleanly is the signature of an extract_unit
carry gap. Measured on the staged member drafts:
  file-scope extern      -> CARRIED
  file-scope #define     -> CARRIED, but only while its expansion's deps stay file-scope
  file-scope typedef     -> NOT carried (silently dropped)
  #define whose expansion references a BODY-LOCAL extern -> NOT carried
RECIPE: make the draft SELF-CONTAINED — body-local typedefs survive (PTag_80140D68 in this same
draft was the proof all along), and if that pushes a macro's dependency body-local, inline the macro
at its use sites. 0/137 -> 0/137 -> 137/137, 0 failed, each step byte-measured.

R22 clean-fleet 140 passed / 0 failed of 140; dedup-check 1886/0.
Fleet 85.5% instr, 76.1% distinct, 90.57 -> 90.61% fn-count.
§99 arc total (T41-T43): 133 + 1 + 137 = 271 functions. Both blockers Drew green-lit are CLOSED.
2026-07-28 14:17:50 -06:00
..