Files
BFM-decomp/docs/progress.fleet.md
T
Drew T b6bb04ecff feat(phase-29): CRACK THE PLUMBING FAILURE — the derived-offset remap bug (cookbook §84); func_8013D53C banked
Drew: "if it fails, see why and try again with new knowledge." It failed twice, then banked.

ROOT CAUSE, byte-proven: a family_remap member reached match_one MATCH (240 ins) and failed the
whole-binary gate by ONE BYTE. The exemplar carries a deliberate matching idiom — reach a symbol via
a DIFFERENT symbol plus a literal offset, so gcc cannot CSE the two %hi/%lo pairs:
    (*(S9*)&D_801DAA78) = *(S9*)(&D_801DA998 + 0x20);  /* same addr as &D_801DA9B8 */
family_remap substitutes the symbol NAMES correctly and leaves the literal 0x20 — but 0x20 is not a
constant of the algorithm, it is the DISTANCE BETWEEN TWO PER-OVERLAY SYMBOLS:
    exemplar 0x801DA998 + 0x20 = 0x801DA9B8  OK
    member   0x801A5778 + 0x20 = 0x801A5798  WRONG (real symbol 0x801A5790)
    member   0x801A5778 + 0x18 = 0x801A5790  correct
match_one MASKS HI16/LO16 so it is STRUCTURALLY BLIND to this — the §81 blindness in its DATA form.

TWO FIXES WERE EACH INDIVIDUALLY INSUFFICIENT: the byte fix alone re-failed as PLUMBING; the ladder
alone re-failed as DIFF. Together -> BANKED, R22 clean-fleet 140/140.

TWO LADDER CORRECTIONS (my own T0.2 error): bare harvest_verify is the LAST RUNG, not the ladder —
gate_stage runs canon_resident_calls -> cast_call_sites -> reconcile_tu -> ARITY -> sig_unify ->
harvest_verify, so T0.2's "8/8 PLUMBING" measured the UN-RECOVERED rate. And reconcile_decls.py is
RETIRED (R33, superseded by reconcile_tu): asking "what does the FLEET call this symbol?" is wrong by
construction in a loosely-typed engine (548 of its answers conflicted, rewriting 60 of 196 drafts) —
so Drew's suggested tool would have made it worse.

SCOPE, MEASURED (not over-generalised, §80): the idiom appears at only 5 sites corpus-wide — BUT one
gates a 123-member family (133 staged drafts all carry the un-recomputed +0x20 with different
per-overlay bases), so the mechanical fix is worth ~240 ins x 123 ~= 29,520 ins. It does NOT explain
the pool generally: func_80144090 / func_8012CC88 / func_8014D12C have ZERO derived-offset sites and
fail for a different, still-undiagnosed cause.

THE FIX IS MECHANICAL: correct_literal = mapped(aliased_sym) - mapped(base_sym). The remap already
holds both mappings, and the exemplar's own comment names the aliased symbol.

Also observed: the ARITY pre-pass left 40 TUs of caller-decl edits after a 0-bank run (same hygiene
bug as --normalize-self-decls, twice in one session) — reverted, both binaries byte-identical.
2026-07-26 13:47:06 -06:00

161 lines
9.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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: 315468 / 353719 = 89.19% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay)
FLEET instr-weighted : 10589305 / 13141652 = 80.6% (shipped .text across main + resident + 138 overlays; the decomp.dev-DISPLAY number)
FLEET distinct-code(uniq): 3846656 / 5634875 = 68.3% (64912/87459 unique fns; the DISTINCT-RE number)
MAIN game-code weighted : 436 / 60201 = 0.7% (INCLUDED in the fleet numbers above since 2026-07-22 — roadmap §1 metrics contract; LINKED-excluding Ghidra sig dated 2026-06-14; caveat is R34: no independent second oracle for a PS-X EXE, NOT drift)
(fleet EXCLUDING main, for continuity with pre-2026-07-22 readings: 10588869 / 13081451 = 80.9%)
FLEET REAL substantive : 313613 (of which dedup-shared 239530 via 1886 groups / 239604 instances)
FLEET LINKED PsyQ objs : 959
FLEET NON_MATCHING : 7 (0 in any default build — G4)
FLEET INCLUDE_ASM stubs : 38244
FLEET matchable : 353719
| 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 | 2251 | 1742 | 0 | 2251 | 2403 | 93.7% |
| ov_SC01_001 | 2253 | 1743 | 0 | 2255 | 2466 | 91.4% |
| ov_SC01_004 | 2242 | 1734 | 0 | 2243 | 2414 | 92.9% |
| ov_SC01_005 | 2272 | 1757 | 0 | 2272 | 2503 | 90.8% |
| ov_SC01_006 | 2272 | 1757 | 0 | 2272 | 2503 | 90.8% |
| ov_SC01_008 | 2242 | 1734 | 0 | 2244 | 2426 | 92.5% |
| ov_SC01_009 | 2268 | 1735 | 0 | 2269 | 2507 | 90.5% |
| ov_SC01_074 | 2246 | 1735 | 0 | 2248 | 2425 | 92.7% |
| ov_SC01_077 | 2428 | 1702 | 0 | 2430 | 2585 | 94.0% |
| ov_SC01_080 | 2284 | 1738 | 0 | 2284 | 2512 | 90.9% |
| ov_SC01_084 | 2291 | 1738 | 0 | 2296 | 2579 | 89.0% |
| ov_SC02_000 | 2344 | 1773 | 0 | 2344 | 2683 | 87.4% |
| ov_SC02_003 | 2344 | 1773 | 0 | 2344 | 2683 | 87.4% |
| ov_SC02_004 | 2250 | 1738 | 0 | 2250 | 2401 | 93.7% |
| ov_SC02_005 | 2358 | 1734 | 0 | 2368 | 2927 | 80.9% |
| ov_SC02_011 | 2370 | 1741 | 0 | 2381 | 2893 | 82.3% |
| ov_SC02_015 | 2251 | 1740 | 0 | 2251 | 2414 | 93.2% |
| ov_SC02_016 | 2285 | 1740 | 0 | 2288 | 2545 | 89.9% |
| ov_SC02_017 | 2328 | 1740 | 0 | 2336 | 2732 | 85.5% |
| ov_SC02_021 | 2257 | 1740 | 0 | 2257 | 2437 | 92.6% |
| ov_SC02_026 | 2273 | 1738 | 0 | 2279 | 2572 | 88.6% |
| ov_SC02_027 | 2296 | 1738 | 0 | 2305 | 2692 | 85.6% |
| ov_SC02_028 | 2298 | 1738 | 0 | 2308 | 2701 | 85.4% |
| ov_SC02_031 | 2284 | 1739 | 0 | 2289 | 2562 | 89.3% |
| ov_SC02_035 | 2259 | 1738 | 0 | 2262 | 2520 | 89.8% |
| ov_SC02_039 | 2243 | 1738 | 0 | 2243 | 2416 | 92.8% |
| ov_SC02_041 | 2281 | 1738 | 0 | 2284 | 2561 | 89.2% |
| ov_SC03_001 | 2379 | 1739 | 0 | 2396 | 2869 | 83.5% |
| ov_SC03_002 | 2305 | 1743 | 0 | 2320 | 2631 | 88.2% |
| ov_SC03_003 | 2253 | 1738 | 0 | 2254 | 2423 | 93.0% |
| ov_SC03_006 | 2319 | 1744 | 0 | 2328 | 2767 | 84.1% |
| ov_SC03_007 | 2298 | 1738 | 0 | 2302 | 2623 | 87.8% |
| ov_SC03_010 | 2261 | 1738 | 0 | 2261 | 2471 | 91.5% |
| ov_SC03_011 | 2267 | 1738 | 0 | 2273 | 2527 | 89.9% |
| ov_SC03_012 | 2245 | 1738 | 0 | 2246 | 2406 | 93.3% |
| ov_SC03_013 | 2266 | 1738 | 0 | 2266 | 2493 | 90.9% |
| ov_SC03_014 | 2324 | 1763 | 0 | 2324 | 2685 | 86.6% |
| ov_SC03_015 | 2324 | 1763 | 0 | 2324 | 2685 | 86.6% |
| ov_SC03_023 | 2252 | 1738 | 0 | 2253 | 2435 | 92.5% |
| ov_SC03_024 | 2312 | 1743 | 0 | 2319 | 2641 | 87.8% |
| ov_SC03_028 | 2292 | 1738 | 0 | 2296 | 2664 | 86.2% |
| ov_SC03_029 | 2293 | 1740 | 0 | 2303 | 2644 | 87.1% |
| ov_SC03_030 | 2266 | 1743 | 0 | 2268 | 2495 | 90.9% |
| ov_SC03_031 | 2263 | 1738 | 0 | 2266 | 2514 | 90.1% |
| ov_SC03_089 | 2280 | 1738 | 0 | 2287 | 2581 | 88.6% |
| ov_SC03_090 | 2281 | 1738 | 0 | 2289 | 2625 | 87.2% |
| ov_SC03_091 | 2284 | 1738 | 0 | 2292 | 2640 | 86.8% |
| ov_SC03_092 | 2294 | 1738 | 0 | 2306 | 2587 | 89.1% |
| ov_SC03_093 | 2270 | 1738 | 0 | 2274 | 2563 | 88.7% |
| ov_SC03_094 | 2265 | 1738 | 0 | 2271 | 2577 | 88.1% |
| ov_SC03_095 | 2255 | 1738 | 0 | 2258 | 2474 | 91.3% |
| ov_SC03_096 | 2255 | 1738 | 0 | 2258 | 2465 | 91.6% |
| ov_SC03_097 | 2285 | 1738 | 0 | 2292 | 2603 | 88.1% |
| ov_SC03_098 | 2263 | 1738 | 0 | 2266 | 2541 | 89.2% |
| ov_SC03_099 | 2256 | 1738 | 0 | 2259 | 2504 | 90.2% |
| ov_SC03_100 | 2266 | 1738 | 0 | 2270 | 2539 | 89.4% |
| ov_SC03_101 | 2266 | 1738 | 0 | 2270 | 2528 | 89.8% |
| ov_SC03_102 | 2259 | 1738 | 0 | 2262 | 2492 | 90.8% |
| ov_SC03_103 | 2261 | 1740 | 0 | 2264 | 2510 | 90.2% |
| ov_SC03_104 | 2288 | 1738 | 0 | 2295 | 2616 | 87.7% |
| ov_SC03_105 | 2280 | 1738 | 0 | 2287 | 2597 | 88.1% |
| ov_SC03_108 | 2247 | 1738 | 0 | 2247 | 2443 | 92.0% |
| ov_SC03_109 | 2250 | 1738 | 0 | 2252 | 2424 | 92.9% |
| ov_SC03_110 | 2254 | 1738 | 0 | 2254 | 2468 | 91.3% |
| ov_SC03_111 | 2265 | 1738 | 0 | 2268 | 2510 | 90.4% |
| ov_SC03_112 | 2259 | 1740 | 0 | 2261 | 2526 | 89.5% |
| ov_SC03_113 | 2252 | 1740 | 0 | 2255 | 2468 | 91.4% |
| ov_SC03_114 | 2242 | 1738 | 0 | 2244 | 2415 | 92.9% |
| ov_SC03_115 | 2259 | 1738 | 0 | 2261 | 2472 | 91.5% |
| ov_SC03_116 | 2250 | 1738 | 0 | 2253 | 2438 | 92.4% |
| ov_SC03_117 | 2277 | 1738 | 0 | 2283 | 2557 | 89.3% |
| ov_SC03_118 | 2323 | 1762 | 0 | 2324 | 2685 | 86.6% |
| ov_SC03_119 | 2322 | 1762 | 0 | 2323 | 2685 | 86.5% |
| ov_SC03_121 | 2257 | 1738 | 0 | 2260 | 2459 | 91.9% |
| ov_SC03_124 | 2336 | 1734 | 0 | 2356 | 2741 | 86.0% |
| ov_SC03_125 | 2292 | 1738 | 0 | 2304 | 2588 | 89.0% |
| ov_SC03_126 | 2254 | 1740 | 0 | 2254 | 2423 | 93.0% |
| ov_SC04_000 | 2270 | 1742 | 0 | 2279 | 2546 | 89.5% |
| ov_SC04_002 | 2289 | 1738 | 0 | 2293 | 2636 | 87.0% |
| ov_SC04_003 | 2265 | 1738 | 0 | 2269 | 2502 | 90.7% |
| ov_SC04_004 | 2274 | 1738 | 0 | 2276 | 2558 | 89.0% |
| ov_SC04_005 | 2284 | 1738 | 0 | 2290 | 2612 | 87.7% |
| ov_SC04_006 | 2254 | 1738 | 0 | 2256 | 2454 | 91.9% |
| ov_SC04_007 | 2278 | 1738 | 0 | 2282 | 2569 | 88.8% |
| ov_SC04_008 | 2246 | 1738 | 0 | 2246 | 2415 | 93.0% |
| ov_SC04_009 | 2261 | 1738 | 0 | 2264 | 2441 | 92.7% |
| ov_SC04_010 | 2251 | 1738 | 0 | 2252 | 2419 | 93.1% |
| ov_SC04_011 | 2309 | 1738 | 0 | 2315 | 2803 | 82.6% |
| ov_SC04_012 | 2248 | 1738 | 0 | 2249 | 2420 | 92.9% |
| ov_SC04_015 | 2314 | 1739 | 0 | 2325 | 2611 | 89.0% |
| ov_SC04_016 | 2251 | 1738 | 0 | 2253 | 2440 | 92.3% |
| ov_SC04_018 | 2362 | 1773 | 0 | 2362 | 2857 | 82.7% |
| ov_SC04_019 | 2368 | 1773 | 0 | 2368 | 2857 | 82.9% |
| ov_SC04_020 | 2279 | 1738 | 0 | 2291 | 2567 | 89.2% |
| ov_SC04_021 | 2255 | 1740 | 0 | 2255 | 2423 | 93.1% |
| ov_SC05_000 | 2252 | 1742 | 0 | 2255 | 2422 | 93.1% |
| ov_SC05_001 | 2274 | 1738 | 0 | 2279 | 2574 | 88.5% |
| ov_SC05_002 | 2257 | 1738 | 0 | 2260 | 2442 | 92.5% |
| ov_SC05_003 | 2254 | 1738 | 0 | 2255 | 2481 | 90.9% |
| ov_SC05_004 | 2250 | 1738 | 0 | 2252 | 2464 | 91.4% |
| ov_SC05_005 | 2255 | 1738 | 0 | 2256 | 2491 | 90.6% |
| ov_SC05_006 | 2248 | 1738 | 0 | 2248 | 2430 | 92.5% |
| ov_SC05_007 | 2258 | 1738 | 0 | 2263 | 2482 | 91.2% |
| ov_SC05_008 | 2275 | 1738 | 0 | 2277 | 2543 | 89.5% |
| ov_SC05_009 | 2254 | 1738 | 0 | 2258 | 2438 | 92.6% |
| ov_SC05_010 | 2281 | 1738 | 0 | 2285 | 2588 | 88.3% |
| ov_SC05_011 | 2250 | 1738 | 0 | 2251 | 2409 | 93.4% |
| ov_SC05_017 | 2358 | 1735 | 0 | 2369 | 2842 | 83.4% |
| ov_SC05_018 | 2305 | 1738 | 0 | 2318 | 2673 | 86.7% |
| ov_SC05_019 | 2255 | 1740 | 0 | 2255 | 2423 | 93.1% |
| ov_SC06_000 | 2319 | 1747 | 0 | 2322 | 2691 | 86.3% |
| ov_SC06_006 | 2271 | 1738 | 0 | 2272 | 2511 | 90.5% |
| ov_SC06_008 | 2290 | 1740 | 0 | 2296 | 2542 | 90.3% |
| ov_SC06_010 | 2271 | 1738 | 0 | 2276 | 2517 | 90.4% |
| ov_SC06_011 | 2260 | 1738 | 0 | 2264 | 2468 | 91.7% |
| ov_SC06_013 | 2253 | 1738 | 0 | 2254 | 2425 | 92.9% |
| ov_SC06_014 | 2259 | 1738 | 0 | 2261 | 2453 | 92.2% |
| ov_SC06_015 | 2256 | 1738 | 0 | 2256 | 2421 | 93.2% |
| ov_SC06_016 | 2274 | 1738 | 0 | 2276 | 2549 | 89.3% |
| ov_SC06_018 | 2286 | 1740 | 0 | 2293 | 2665 | 86.0% |
| ov_SC06_020 | 2263 | 1740 | 0 | 2264 | 2518 | 89.9% |
| ov_SC06_022 | 2282 | 1738 | 0 | 2290 | 2642 | 86.7% |
| ov_SC06_024 | 2292 | 1738 | 0 | 2298 | 2667 | 86.2% |
| ov_SC06_025 | 2276 | 1738 | 0 | 2281 | 2572 | 88.7% |
| ov_SC06_027 | 2241 | 1738 | 0 | 2242 | 2408 | 93.1% |
| ov_SC06_029 | 2302 | 1738 | 0 | 2314 | 2662 | 86.9% |
| ov_SC06_030 | 2255 | 1738 | 0 | 2255 | 2456 | 91.8% |
| ov_SC06_032 | 2277 | 1739 | 0 | 2284 | 2658 | 85.9% |
| ov_SC06_033 | 2279 | 1739 | 0 | 2286 | 2631 | 86.9% |
| ov_SC07_000 | 2271 | 1742 | 0 | 2273 | 2521 | 90.2% |
| ov_SC07_001 | 2254 | 1738 | 0 | 2256 | 2454 | 91.9% |
| ov_SC07_002 | 2282 | 1738 | 0 | 2286 | 2579 | 88.6% |
| ov_SC07_006 | 2051 | 1555 | 0 | 2131 | 2455 | 86.8% |
| ov_SC07_007 | 2043 | 1586 | 0 | 2127 | 2613 | 81.4% |
| ov_SC07_008 | 2239 | 1738 | 0 | 2239 | 2386 | 93.8% |
| ov_SC07_009 | 2248 | 1738 | 0 | 2250 | 2430 | 92.6% |
| ov_SC07_010 | 2074 | 1608 | 0 | 2157 | 2524 | 85.5% |
| ov_SC07_011 | 2042 | 1585 | 0 | 2122 | 2449 | 86.6% |