Files
BFM-decomp/docs/progress.fleet.md
T
Drew T 9f61cd33c5 feat(phase-30 S6): BOTH GIANT WALLS CRACKED ×138 (+50,094 ins) — the verdicts were stale, not wrong
The two functions the roadmap has carried as PERMANENT WALLS since Phase 24 are matched in all 138
overlays. Neither needed a siege. Both matched from drafts ALREADY ON DISK.

  func_80178004  165 ins x 138 = 22,770   Phase 26: Fable5, ~477k tokens, "intrinsic 3-integer
                                          regalloc wall". THREE stored drafts report match_one
                                          MATCH today; one banked first try, no new work.
  func_801412A8  198 ins x 138 = 27,324   close=29/110 since Phase 24. Matched from 1 of 31 stored
                                          drafts + the §37/§124 alias.

WHY func_801412A8 LOOKED INTRINSIC (worth understanding — match_one is structurally blind to it):
the TU declares `extern int func_801412A8(int,int,int,int,int,int)` and its callers USE the return
(`param_1 = func_801412A8(...)`), while the byte-true definition is
`Prim_1412A8 *(Prim_1412A8 *, int, int, int, u16, u16)`. Narrow params cannot agree with an `int`
prototype and the no-prototype escape is illegal once a param promotes, so NEITHER side can move --
and the resulting byte difference is in the CALLERS, which match_one never compiles. The §37/§124
def-side asm-label alias decouples them: the TU decl keeps governing the call sites (codegen
untouched), the definition keeps its byte-true signature.

THEN PROPAGATION RETURNED 0/137 TWICE, both times a missing TYPE, not codegen:
  family_remap's `_carry_macros` carries file-scope #defines but (a) NOT typedefs, and (b) is NOT
  TRANSITIVE -- it brought addPrim_1412A8 and stopped, though that macro calls setaddr/getaddr and
  getaddr casts to PTag_1412A8. Lifted Env_1412A8 / PTag_1412A8 / Prim_1412A8 + OT/getaddr/setaddr
  into src/shared/engine_types.h (inside the include guard) -> 137/137, 0 failed.

MY ERROR, CAUGHT BY THE GATE: I lifted the typedefs but did not STRIP them from ov_SC01_077.c, so
they were declared twice and gcc-2.7.2 rejects a repeated typedef even when identical -- the lesson
already recorded at the foot of engine_types.h. R22 came back 139/140 with [FAIL] ov_SC01_077 (the
exemplar's own overlay). Stripped, re-verified, 140/140. A proper lift strips the source;
build_engine_types --strip does both and I did it by hand.

Also a measurement error worth recording: I checked whether the draft defined Prim_1412A8 with a
plain `grep -c` -- which matches inside `addPrim_1412A8` -- and briefly concluded the carry worked.
Substring false positive; the same shape as reading a `return` as a declaration.

VERIFIED: make clean && make extract-all && make check-all -> 140 passed, 0 failed of 140.
Fleet 12432941 -> 12483035 instr (+50,094 -- EXACTLY the two giants x138); fn-count +276;
instr-weighted 94.5% -> 94.8%. audit-digest OK. 0 NON_MATCHING (G4).

THE RULE THIS BUYS: re-measure a wall before respecting it, and SCAN every stored draft rather than
sampling (my first pass checked 8 of 31 and reported "closeness 40" for a function whose MATCH was
in the 9th). Four minutes of re-measurement was worth 50,094 instructions.
2026-08-05 12:51:06 -06:00

9.1 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: 341768 / 353717 = 96.62% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay) FLEET instr-weighted : 12483035 / 13160961 = 94.8% (shipped .text across main + resident + 138 overlays; the decomp.dev-DISPLAY number) FLEET distinct-code(uniq): 5042134 / 5654184 = 89.2% (78074/87459 unique fns; the DISTINCT-RE number) MAIN game-code weighted : 436 / 79510 = 0.5% (INCLUDED in the fleet numbers above since 2026-07-22 — roadmap §1 metrics contract; LINKED-excluding Ghidra sig dated 2026-08-05; 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: 12482599 / 13081451 = 95.4%)

FLEET REAL substantive : 339913 (of which dedup-shared 241439 via 1919 groups / 241513 instances) FLEET LINKED PsyQ objs : 959 FLEET NON_MATCHING : 7 (0 in any default build — G4) FLEET INCLUDE_ASM stubs : 11942 FLEET matchable : 353717

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 2389 1755 0 2389 2403 99.4%
ov_SC01_001 2396 1756 0 2398 2466 97.2%
ov_SC01_004 2393 1747 0 2394 2414 99.2%
ov_SC01_005 2425 1770 0 2425 2503 96.9%
ov_SC01_006 2425 1770 0 2425 2503 96.9%
ov_SC01_008 2393 1747 0 2395 2426 98.7%
ov_SC01_009 2419 1748 0 2420 2507 96.5%
ov_SC01_074 2395 1748 0 2397 2425 98.8%
ov_SC01_077 2554 1713 0 2556 2586 98.8%
ov_SC01_080 2423 1751 0 2423 2512 96.5%
ov_SC01_084 2448 1756 0 2453 2579 95.1%
ov_SC02_000 2519 1795 0 2519 2683 93.9%
ov_SC02_003 2519 1795 0 2519 2683 93.9%
ov_SC02_004 2388 1751 0 2388 2401 99.5%
ov_SC02_005 2538 1747 0 2548 2927 87.1%
ov_SC02_011 2626 1754 0 2637 2893 91.2%
ov_SC02_015 2399 1753 0 2399 2414 99.4%
ov_SC02_016 2482 1754 0 2485 2545 97.6%
ov_SC02_017 2550 1754 0 2558 2732 93.6%
ov_SC02_021 2404 1753 0 2404 2437 98.6%
ov_SC02_026 2502 1751 0 2508 2572 97.5%
ov_SC02_027 2558 1751 0 2567 2692 95.4%
ov_SC02_028 2563 1751 0 2573 2701 95.3%
ov_SC02_031 2493 1752 0 2498 2562 97.5%
ov_SC02_035 2487 1751 0 2490 2520 98.8%
ov_SC02_039 2394 1751 0 2394 2416 99.1%
ov_SC02_041 2475 1751 0 2478 2561 96.8%
ov_SC03_001 2669 1752 0 2686 2869 93.6%
ov_SC03_002 2541 1756 0 2556 2631 97.1%
ov_SC03_003 2397 1751 0 2398 2423 99.0%
ov_SC03_006 2553 1758 0 2562 2767 92.6%
ov_SC03_007 2461 1751 0 2465 2623 94.0%
ov_SC03_010 2414 1751 0 2414 2471 97.7%
ov_SC03_011 2415 1751 0 2421 2527 95.8%
ov_SC03_012 2387 1751 0 2388 2406 99.3%
ov_SC03_013 2420 1751 0 2420 2493 97.1%
ov_SC03_014 2573 1782 0 2573 2685 95.8%
ov_SC03_015 2572 1782 0 2572 2685 95.8%
ov_SC03_023 2399 1751 0 2400 2435 98.6%
ov_SC03_024 2516 1756 0 2523 2641 95.5%
ov_SC03_028 2461 1752 0 2465 2664 92.5%
ov_SC03_029 2499 1754 0 2509 2644 94.9%
ov_SC03_030 2417 1756 0 2419 2495 97.0%
ov_SC03_031 2446 1751 0 2449 2514 97.4%
ov_SC03_089 2512 1756 0 2519 2581 97.6%
ov_SC03_090 2527 1756 0 2535 2625 96.6%
ov_SC03_091 2541 1751 0 2549 2640 96.6%
ov_SC03_092 2505 1756 0 2517 2587 97.3%
ov_SC03_093 2515 1751 0 2519 2563 98.3%
ov_SC03_094 2504 1751 0 2510 2577 97.4%
ov_SC03_095 2431 1751 0 2434 2474 98.4%
ov_SC03_096 2428 1751 0 2431 2465 98.6%
ov_SC03_097 2525 1751 0 2532 2603 97.3%
ov_SC03_098 2509 1751 0 2512 2541 98.9%
ov_SC03_099 2485 1751 0 2488 2504 99.4%
ov_SC03_100 2520 1751 0 2524 2539 99.4%
ov_SC03_101 2482 1756 0 2486 2528 98.3%
ov_SC03_102 2469 1751 0 2472 2492 99.2%
ov_SC03_103 2493 1753 0 2496 2510 99.4%
ov_SC03_104 2540 1756 0 2547 2616 97.4%
ov_SC03_105 2448 1752 0 2455 2597 94.5%
ov_SC03_108 2399 1751 0 2399 2443 98.2%
ov_SC03_109 2407 1751 0 2409 2424 99.4%
ov_SC03_110 2440 1751 0 2440 2468 98.9%
ov_SC03_111 2471 1751 0 2474 2510 98.6%
ov_SC03_112 2436 1753 0 2438 2526 96.5%
ov_SC03_113 2434 1753 0 2437 2468 98.7%
ov_SC03_114 2389 1751 0 2391 2415 99.0%
ov_SC03_115 2430 1751 0 2432 2472 98.4%
ov_SC03_116 2399 1751 0 2402 2438 98.5%
ov_SC03_117 2467 1751 0 2473 2557 96.7%
ov_SC03_118 2542 1776 0 2543 2685 94.7%
ov_SC03_119 2539 1776 0 2540 2685 94.6%
ov_SC03_121 2402 1751 0 2405 2459 97.8%
ov_SC03_124 2576 1747 0 2596 2741 94.7%
ov_SC03_125 2527 1751 0 2539 2588 98.1%
ov_SC03_126 2398 1753 0 2398 2423 99.0%
ov_SC04_000 2473 1755 0 2482 2546 97.5%
ov_SC04_002 2503 1751 0 2507 2636 95.1%
ov_SC04_003 2437 1751 0 2441 2502 97.6%
ov_SC04_004 2469 1751 0 2471 2558 96.6%
ov_SC04_005 2498 1751 0 2504 2612 95.9%
ov_SC04_006 2429 1751 0 2431 2454 99.1%
ov_SC04_007 2492 1751 0 2496 2569 97.2%
ov_SC04_008 2399 1751 0 2399 2415 99.3%
ov_SC04_009 2426 1751 0 2429 2441 99.5%
ov_SC04_010 2401 1751 0 2402 2419 99.3%
ov_SC04_011 2515 1756 0 2521 2803 89.9%
ov_SC04_012 2396 1751 0 2397 2420 99.0%
ov_SC04_015 2532 1752 0 2543 2611 97.4%
ov_SC04_016 2400 1751 0 2402 2440 98.4%
ov_SC04_018 2672 1788 0 2672 2857 93.5%
ov_SC04_019 2672 1788 0 2672 2857 93.5%
ov_SC04_020 2513 1751 0 2525 2567 98.4%
ov_SC04_021 2398 1753 0 2398 2423 99.0%
ov_SC05_000 2405 1755 0 2408 2422 99.4%
ov_SC05_001 2477 1751 0 2482 2574 96.4%
ov_SC05_002 2429 1751 0 2432 2442 99.6%
ov_SC05_003 2412 1751 0 2413 2481 97.3%
ov_SC05_004 2422 1751 0 2424 2464 98.4%
ov_SC05_005 2437 1756 0 2438 2491 97.9%
ov_SC05_006 2421 1751 0 2421 2430 99.6%
ov_SC05_007 2430 1751 0 2435 2482 98.1%
ov_SC05_008 2441 1751 0 2443 2543 96.1%
ov_SC05_009 2408 1751 0 2412 2438 98.9%
ov_SC05_010 2448 1752 0 2452 2588 94.7%
ov_SC05_011 2395 1751 0 2396 2409 99.5%
ov_SC05_017 2648 1748 0 2659 2842 93.6%
ov_SC05_018 2545 1751 0 2558 2673 95.7%
ov_SC05_019 2398 1753 0 2398 2423 99.0%
ov_SC06_000 2527 1760 0 2530 2691 94.0%
ov_SC06_006 2422 1751 0 2423 2511 96.5%
ov_SC06_008 2487 1753 0 2493 2542 98.1%
ov_SC06_010 2459 1751 0 2464 2517 97.9%
ov_SC06_011 2414 1751 0 2418 2468 98.0%
ov_SC06_013 2404 1751 0 2405 2425 99.2%
ov_SC06_014 2415 1751 0 2417 2453 98.5%
ov_SC06_015 2409 1751 0 2409 2421 99.5%
ov_SC06_016 2451 1752 0 2453 2549 96.2%
ov_SC06_018 2499 1753 0 2506 2665 94.0%
ov_SC06_020 2445 1753 0 2446 2518 97.1%
ov_SC06_022 2480 1751 0 2488 2642 94.2%
ov_SC06_024 2500 1751 0 2506 2667 94.0%
ov_SC06_025 2451 1751 0 2456 2572 95.5%
ov_SC06_027 2390 1751 0 2391 2408 99.3%
ov_SC06_029 2476 1752 0 2488 2662 93.5%
ov_SC06_030 2412 1752 0 2412 2456 98.2%
ov_SC06_032 2486 1752 0 2493 2658 93.8%
ov_SC06_033 2486 1752 0 2493 2631 94.8%
ov_SC07_000 2431 1755 0 2433 2521 96.5%
ov_SC07_001 2403 1751 0 2405 2454 98.0%
ov_SC07_002 2459 1752 0 2463 2579 95.5%
ov_SC07_006 2323 1575 0 2403 2455 97.9%
ov_SC07_007 2336 1607 0 2420 2612 92.6%
ov_SC07_008 2384 1751 0 2384 2386 99.9%
ov_SC07_009 2396 1751 0 2398 2430 98.7%
ov_SC07_010 2319 1628 0 2402 2523 95.2%
ov_SC07_011 2338 1606 0 2418 2448 98.8%