Files
BFM-decomp/docs/progress.fleet.md
T
Drew T 1074f2f202 feat(phase-29 Task-14 stage 1): the ARITY pre-pass — and the shared-state constraint it cost
DIAGNOSED, not assumed. The 12-draft integration probe banked 1/12 and reported the SAME
label for 10 of the 11 failures: `conflicting types for built-in function 'memcpy'` — the
§58 red-herring (a WARNING, from an unrelated TU position). Splicing three top-reach
failures individually and reading real cc1 stderr gave the actual causes:
  conflicting types for `func_XXXX'     3/3   <- loose-typing ARITY conflict
  redefinition of `struct V8'                 <- a SECOND class (type-lift), stage 2

A banked shared caller macro in engine_core.h declares the function with FEWER params than
its byte-true definition takes (the original calls K&R-style with fewer args than the callee
reads); a C89 prototype makes that a hard error. tools/fix_arity_callers.py --any-proto
already fixes it and was simply NEVER WIRED into gate_stage's ladder (only family_sweep
carried §57). Now wired as a TU-side pre-pass.

MEASURED: 2 of 7 top integration candidates banked (func_8016EFC8, func_80164418, both
reach-138) vs the 1/12 old-ladder baseline. R22 140/140; tools-health OK (dedup 1848/0).

INCIDENT — this stage BROKE 138/140 AND R22 CAUGHT IT (nothing was ever committed):
pairing `--apply --any-proto` with `--revert` for the unbanked drafts corrupted declarations
fleet-wide. `--revert` rewrites ()->(void), which inverts a PLAIN apply but NOT --any-proto,
so an unbanked fn whose real decl was `extern void func_801708B0(void *a0)` came back as
`(void)` — in engine_core.h (included by all 138 overlays) and 6 sites in ov_SC01_077's own
sources. harvest_verify --binary ov_SC01_077 reported BYTE-IDENTICAL and was RIGHT about that
binary; the other 137 were structurally invisible to it. Repaired to the exact lines.

ROOT CAUSE FIXED: the ladder now snapshots every file the pre-pass touches and undoes by
RESTORE + re-apply-for-the-banked-set-only — exact by construction, cannot invent a signature.

NEW HARD CONSTRAINT (cookbook §61): any ladder stage mutating SHARED state must be undone by
snapshot restore, never an inverse transform, and validated FLEET-WIDE (R22) rather than by
the per-binary gate that authorised it. §55b's propagation law, one level down. The planned
type-lift stage edits engine_types.h and inherits it by default.

ALSO FIXED: the first wiring passed only --drafts (the narrow-param FILTER) without the
required --funcs, so the stage exited `no funcs given` as a SILENT NO-OP and the gate reported
0/6 as though diagnosed. sh() does not raise on non-zero exit -> explicit rc check added.
2026-07-21 18:19:04 -06:00

9.0 KiB
Raw Blame History

BFM FLEET matching progress (generated by tools/progress.py --fleet — authoritative)

140 binaries: main + resident + 138 location overlays. DETERMINISTIC,

source-derived (committed src/*.c + config/dedup.us.yaml). Live byte gate: make check-all;

cross-binary collapsible-byte leverage: docs/duplicates.cross.md.

THREE progress metrics (all matter — see the labels):

FLEET fn-count byte-ident: 311081 / 353722 = 87.95% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay) FLEET instr-weighted : 10207793 / 13081451 = 78.0% (shipped .text across resident+138 overlays; the decomp.dev-DISPLAY number) FLEET distinct-code(uniq): 3709091 / 5574674 = 66.5% (64107/87459 unique fns; the DISTINCT-RE number) MAIN game-code weighted : 436 / 60201 = 0.7% (Phase-27 T10; SEPARATE — LINKED-excluding Ghidra sig dated 2026-06-14, PROVISIONAL until a fresh/complete main sig; NOT folded into the fleet number)

FLEET REAL substantive : 309226 (of which dedup-shared 234437 via 1848 groups / 234481 instances) FLEET LINKED PsyQ objs : 959 FLEET NON_MATCHING : 7 (0 in any default build — G4) FLEET INCLUDE_ASM stubs : 42634 FLEET matchable : 353722

binary REAL shared LINKED byte-ident matchable byte-ident %
main 54 2 959 1055 2096 50.3%
resident 129 0 0 131 145 90.3%
ov_SC01_000 2220 1706 0 2220 2403 92.4%
ov_SC01_001 2220 1706 0 2222 2466 90.1%
ov_SC01_004 2212 1697 0 2213 2414 91.7%
ov_SC01_005 2241 1719 0 2241 2503 89.5%
ov_SC01_006 2241 1719 0 2241 2503 89.5%
ov_SC01_008 2212 1697 0 2214 2426 91.3%
ov_SC01_009 2237 1698 0 2238 2507 89.3%
ov_SC01_074 2215 1698 0 2217 2425 91.4%
ov_SC01_077 2407 1666 0 2409 2585 93.2%
ov_SC01_080 2254 1701 0 2254 2512 89.7%
ov_SC01_084 2261 1701 0 2266 2579 87.9%
ov_SC02_000 2314 1736 0 2314 2683 86.2%
ov_SC02_003 2314 1736 0 2314 2683 86.2%
ov_SC02_004 2220 1701 0 2220 2401 92.5%
ov_SC02_005 2327 1697 0 2337 2927 79.8%
ov_SC02_011 2338 1704 0 2349 2893 81.2%
ov_SC02_015 2221 1703 0 2221 2414 92.0%
ov_SC02_016 2252 1703 0 2255 2545 88.6%
ov_SC02_017 2298 1703 0 2306 2732 84.4%
ov_SC02_021 2227 1703 0 2227 2437 91.4%
ov_SC02_026 2242 1701 0 2248 2572 87.4%
ov_SC02_027 2265 1701 0 2274 2692 84.5%
ov_SC02_028 2266 1701 0 2276 2701 84.3%
ov_SC02_031 2252 1702 0 2257 2562 88.1%
ov_SC02_035 2228 1701 0 2231 2520 88.5%
ov_SC02_039 2213 1701 0 2213 2416 91.6%
ov_SC02_041 2248 1701 0 2251 2561 87.9%
ov_SC03_001 2349 1702 0 2366 2869 82.5%
ov_SC03_002 2275 1706 0 2290 2631 87.0%
ov_SC03_003 2223 1701 0 2224 2423 91.8%
ov_SC03_006 2288 1707 0 2297 2767 83.0%
ov_SC03_007 2268 1701 0 2272 2623 86.6%
ov_SC03_010 2229 1701 0 2229 2470 90.2%
ov_SC03_011 2237 1701 0 2243 2527 88.8%
ov_SC03_012 2215 1701 0 2216 2406 92.1%
ov_SC03_013 2234 1701 0 2234 2492 89.6%
ov_SC03_014 2293 1726 0 2293 2685 85.4%
ov_SC03_015 2293 1726 0 2293 2685 85.4%
ov_SC03_023 2221 1701 0 2222 2435 91.3%
ov_SC03_024 2280 1706 0 2287 2641 86.6%
ov_SC03_028 2261 1701 0 2265 2664 85.0%
ov_SC03_029 2263 1703 0 2273 2644 86.0%
ov_SC03_030 2236 1706 0 2238 2495 89.7%
ov_SC03_031 2233 1701 0 2236 2514 88.9%
ov_SC03_089 2247 1701 0 2254 2581 87.3%
ov_SC03_090 2249 1701 0 2257 2625 86.0%
ov_SC03_091 2252 1701 0 2260 2640 85.6%
ov_SC03_092 2263 1701 0 2275 2587 87.9%
ov_SC03_093 2239 1701 0 2243 2563 87.5%
ov_SC03_094 2234 1701 0 2240 2577 86.9%
ov_SC03_095 2224 1701 0 2227 2474 90.0%
ov_SC03_096 2224 1701 0 2227 2465 90.3%
ov_SC03_097 2253 1701 0 2260 2603 86.8%
ov_SC03_098 2232 1701 0 2235 2541 88.0%
ov_SC03_099 2225 1701 0 2228 2504 89.0%
ov_SC03_100 2235 1701 0 2239 2539 88.2%
ov_SC03_101 2235 1701 0 2239 2528 88.6%
ov_SC03_102 2227 1701 0 2230 2492 89.5%
ov_SC03_103 2230 1703 0 2233 2510 89.0%
ov_SC03_104 2255 1701 0 2262 2616 86.5%
ov_SC03_105 2249 1701 0 2256 2597 86.9%
ov_SC03_108 2217 1701 0 2217 2443 90.7%
ov_SC03_109 2218 1701 0 2220 2424 91.6%
ov_SC03_110 2223 1701 0 2223 2468 90.1%
ov_SC03_111 2235 1701 0 2238 2510 89.2%
ov_SC03_112 2228 1703 0 2230 2526 88.3%
ov_SC03_113 2221 1703 0 2224 2468 90.1%
ov_SC03_114 2211 1701 0 2213 2415 91.6%
ov_SC03_115 2228 1701 0 2230 2472 90.2%
ov_SC03_116 2218 1701 0 2221 2438 91.1%
ov_SC03_117 2246 1701 0 2252 2557 88.1%
ov_SC03_118 2293 1725 0 2294 2685 85.4%
ov_SC03_119 2292 1725 0 2293 2685 85.4%
ov_SC03_121 2225 1701 0 2228 2459 90.6%
ov_SC03_124 2305 1697 0 2325 2741 84.8%
ov_SC03_125 2262 1701 0 2274 2588 87.9%
ov_SC03_126 2224 1703 0 2224 2423 91.8%
ov_SC04_000 2240 1705 0 2249 2546 88.3%
ov_SC04_002 2256 1701 0 2260 2636 85.7%
ov_SC04_003 2234 1701 0 2238 2502 89.4%
ov_SC04_004 2243 1701 0 2245 2558 87.8%
ov_SC04_005 2251 1701 0 2257 2612 86.4%
ov_SC04_006 2224 1701 0 2226 2454 90.7%
ov_SC04_007 2244 1701 0 2248 2569 87.5%
ov_SC04_008 2214 1701 0 2214 2415 91.7%
ov_SC04_009 2230 1701 0 2233 2441 91.5%
ov_SC04_010 2221 1701 0 2222 2419 91.9%
ov_SC04_011 2277 1701 0 2283 2803 81.4%
ov_SC04_012 2217 1701 0 2218 2420 91.7%
ov_SC04_015 2282 1702 0 2293 2611 87.8%
ov_SC04_016 2220 1701 0 2222 2440 91.1%
ov_SC04_018 2332 1736 0 2332 2857 81.6%
ov_SC04_019 2338 1736 0 2338 2857 81.8%
ov_SC04_020 2249 1701 0 2261 2567 88.1%
ov_SC04_021 2225 1703 0 2225 2423 91.8%
ov_SC05_000 2221 1705 0 2224 2422 91.8%
ov_SC05_001 2244 1701 0 2249 2574 87.4%
ov_SC05_002 2226 1701 0 2229 2442 91.3%
ov_SC05_003 2223 1701 0 2224 2481 89.6%
ov_SC05_004 2218 1701 0 2220 2464 90.1%
ov_SC05_005 2225 1701 0 2226 2491 89.4%
ov_SC05_006 2217 1701 0 2217 2430 91.2%
ov_SC05_007 2227 1701 0 2232 2482 89.9%
ov_SC05_008 2244 1701 0 2246 2543 88.3%
ov_SC05_009 2222 1701 0 2226 2438 91.3%
ov_SC05_010 2248 1701 0 2252 2588 87.0%
ov_SC05_011 2220 1701 0 2221 2409 92.2%
ov_SC05_017 2328 1698 0 2339 2842 82.3%
ov_SC05_018 2275 1701 0 2288 2673 85.6%
ov_SC05_019 2225 1703 0 2225 2423 91.8%
ov_SC06_000 2287 1710 0 2290 2691 85.1%
ov_SC06_006 2240 1701 0 2241 2511 89.2%
ov_SC06_008 2250 1703 0 2256 2542 88.7%
ov_SC06_010 2233 1701 0 2238 2517 88.9%
ov_SC06_011 2229 1701 0 2233 2468 90.5%
ov_SC06_013 2222 1701 0 2223 2425 91.7%
ov_SC06_014 2228 1701 0 2230 2453 90.9%
ov_SC06_015 2225 1701 0 2225 2421 91.9%
ov_SC06_016 2243 1701 0 2245 2549 88.1%
ov_SC06_018 2239 1704 0 2246 2665 84.3%
ov_SC06_020 2232 1703 0 2233 2518 88.7%
ov_SC06_022 2246 1701 0 2254 2642 85.3%
ov_SC06_024 2252 1701 0 2258 2667 84.7%
ov_SC06_025 2243 1701 0 2248 2572 87.4%
ov_SC06_027 2211 1701 0 2212 2408 91.9%
ov_SC06_029 2269 1701 0 2281 2662 85.7%
ov_SC06_030 2224 1701 0 2224 2456 90.6%
ov_SC06_032 2236 1702 0 2243 2658 84.4%
ov_SC06_033 2239 1702 0 2246 2631 85.4%
ov_SC07_000 2239 1705 0 2241 2521 88.9%
ov_SC07_001 2224 1701 0 2226 2454 90.7%
ov_SC07_002 2251 1701 0 2255 2579 87.4%
ov_SC07_006 1993 1549 0 2073 2456 84.4%
ov_SC07_007 2010 1550 0 2094 2614 80.1%
ov_SC07_008 2208 1701 0 2208 2386 92.5%
ov_SC07_009 2218 1701 0 2220 2430 91.4%
ov_SC07_010 2021 1550 0 2104 2526 83.3%
ov_SC07_011 2009 1549 0 2089 2450 85.3%