mirror of
https://github.com/Druthulu/BFM-decomp
synced 2026-09-26 13:33:34 -04:00
feat(phase-31): wave Y recovery — §200 the alias is the universal declaration escape (5 drops recovered, 0 agent tokens)
Wave Y's recovery lane ran during a total API outage (two rounds of 529 Overloaded, 12 agents, 0 tokens), so the five gate drops were fixed by hand -- and the fix turned out to be ONE repeatable move rather than five negotiations. §183's playbook negotiates with the TU's spelling; §200 declines to share the C identifier at all, binding a private name to the same link symbol with gcc's asm label (§37/§124). Five different refusal classes -- array-vs-scalar where reconcile_slate's own fix had broken the match, a slate-mate's private struct, void* vs s32, and two DEF-side return conflicts including a function whose only in-TU use takes its ADDRESS -- all five aliased, all five still MATCH, 4 re-gated and banked. Ordering recorded so it stays the escape hatch and not the first move: adopt the TU's spelling -> cast at the use site -> alias. An alias is a readability debt; every one in the tree carries a comment naming the spelling it could not use.
This commit is contained in:
+825
-826
File diff suppressed because it is too large
Load Diff
@@ -2,7 +2,7 @@
|
||||
|
||||
> **Generated by `tools/cookbook_index.py` — do not hand-edit** (R33). Regenerate after adding a cookbook section.
|
||||
>
|
||||
> `docs/matching-cookbook.md` is ~716 KB / 643 sections. Grepping it blind is how three P30 wave-1 agents each "discovered" an idiom that was already written down. **Start here, then read the section.** A section appears under every symptom it addresses.
|
||||
> `docs/matching-cookbook.md` is ~716 KB / 644 sections. Grepping it blind is how three P30 wave-1 agents each "discovered" an idiom that was already written down. **Start here, then read the section.** A section appears under every symptom it addresses.
|
||||
|
||||
**How to use:** name what you SEE in the diff (a stolen delay slot, an extra `la`, a swapped register pair, a `conflicting types` error), find that symptom below, read those sections first. If nothing fits, THEN grind — and add a section when you win.
|
||||
|
||||
@@ -308,7 +308,7 @@
|
||||
- **§197-A** — A NARROW SIGNED MEMORY READ FEEDING A CONSTANT `>>` LOSES ITS `lh`, AND THE CURE IS AN ASM RE-TIE (attribution CONTESTED: cse vs combine) <sub>L20532</sub>
|
||||
- **§199-D** — A narrow UNSIGNED value compared in an ordered `if` emits `sltiu`/`sltu`; the only dial is the WIDTH of a real object, and a widening `(s32)` cast is inert — AMENDS §35 (whose stated "only CSE-reuse canonicalizes" mechanism is byte-wrong) and does NOT apply inside a `switch` <sub>L20811</sub>
|
||||
|
||||
### declarations, prototypes & K&R (72)
|
||||
### declarations, prototypes & K&R (73)
|
||||
|
||||
- **§3-T4** — Branch polarity: invert the source condition to flip gcc's chosen branch <sub>L90</sub>
|
||||
- **§8c** — Splitting a TU means rebuilding its DECLARATION ENVIRONMENT, not moving text (Phase 26 session 6) <sub>L437</sub>
|
||||
@@ -382,6 +382,7 @@
|
||||
- **§196** — PUT ON THE CARD WHAT THE TREE ALREADY KNOWS: the fleet's declaration consensus (P31 S54) <sub>L20463</sub>
|
||||
- **§199-D** — A narrow UNSIGNED value compared in an ordered `if` emits `sltiu`/`sltu`; the only dial is the WIDTH of a real object, and a widening `(s32)` cast is inert — AMENDS §35 (whose stated "only CSE-reuse canonicalizes" mechanism is byte-wrong) and does NOT apply inside a `switch` <sub>L20811</sub>
|
||||
- **§199-G** — At TWO case nodes the switch-vs-if oracle is not blind — but the tell is ALL tests positive + a trailing `j default`, NOT the first test's polarity <sub>L20984</sub>
|
||||
- **§200** — THE ALIAS IS THE UNIVERSAL DECLARATION ESCAPE: stop negotiating with the TU's spelling (P31 S55) <sub>L21050</sub>
|
||||
|
||||
### jump tables & switches (31)
|
||||
|
||||
@@ -527,7 +528,7 @@
|
||||
- **§195-E** — A 0/1 materialised at a JOIN immediately before the controlling `beqz`/`bnez` proves the source NAMED the condition — a truth expression in an `if`'s controlling position reaches `do_jump`, which has no value path <sub>L19920</sub>
|
||||
- **§199-B** — A permutation sweep that holds ANY statement fixed is not a sweep: the statement an agent pins as "obviously load-bearing" is the one carrying the signal, and the partial sweep returns a FLAT residual that reads as proof of order-invariance <sub>L20718</sub>
|
||||
|
||||
### integration / TU plumbing (46)
|
||||
### integration / TU plumbing (47)
|
||||
|
||||
- **§8c** — Splitting a TU means rebuilding its DECLARATION ENVIRONMENT, not moving text (Phase 26 session 6) <sub>L437</sub>
|
||||
- **§8d** — Templating a body INTO a TU must not CHANGE its declaration environment — demote the carried data externs (Phase 26 session 8, byte-proven on `func_8015AE2C` ×133) <sub>L483</sub>
|
||||
@@ -575,6 +576,7 @@
|
||||
- **§194-E** — The wave card's `exemplar` is the TARGET ITSELF on 42/73 wave-U and 36/71 wave-T cards — a construction consequence of `atlas.py:657` (exemplar = max-nins OPEN member) meeting `build_wave_atlas.py:166` (one card per gid); and the shipped §193-A `seed_ref` is same-binary on 0/51, so no card field can ever name a destination-TU sibling <sub>L19129</sub>
|
||||
- **§195-J** — GTE / PsyQ op CALL-vs-INLINE is a PER-SITE SOURCE FACT, not a TU style — both forms coexist in one TU (measured in 2 TUs), and the tell is the target's own opcodes (`lwc2`/`sqr`/`swc2` vs `jal`), not the sibling. Costs -8 ins on func_8018505C. Corollary: the game's inline `sqr` macro emits TWO hazard nops, the SDK's `Square0` body emits ONE — so the inline form is provably not `Square0` inlined (a second instance of §187's SDK-vs-game GTE nop divergence). <sub>L20190</sub>
|
||||
- **§199-D** — A narrow UNSIGNED value compared in an ordered `if` emits `sltiu`/`sltu`; the only dial is the WIDTH of a real object, and a widening `(s32)` cast is inert — AMENDS §35 (whose stated "only CSE-reuse canonicalizes" mechanism is byte-wrong) and does NOT apply inside a `switch` <sub>L20811</sub>
|
||||
- **§200** — THE ALIAS IS THE UNIVERSAL DECLARATION ESCAPE: stop negotiating with the TU's spelling (P31 S55) <sub>L21050</sub>
|
||||
|
||||
### build graph, splat & the harness (144)
|
||||
|
||||
@@ -1659,3 +1661,4 @@
|
||||
- **§199-F** — §164-36b — THE TARGET-HEAD FENCE IS A DELAY-SLOT THREAD SELECTOR, AND IT ONLY FIRES WHEN `mostly_true_jump > 0` (amendment to §164-36; its "−1 instruction" tell is falsified) <sub>L20930</sub>
|
||||
- **§199-G** — At TWO case nodes the switch-vs-if oracle is not blind — but the tell is ALL tests positive + a trailing `j default`, NOT the first test's polarity <sub>L20984</sub>
|
||||
- **§199-REJECTED** — §199-REJECTED <sub>L21039</sub>
|
||||
- **§200** — THE ALIAS IS THE UNIVERSAL DECLARATION ESCAPE: stop negotiating with the TU's spelling (P31 S55) <sub>L21050</sub>
|
||||
|
||||
+10
-10
@@ -1,6 +1,6 @@
|
||||
# P30 S49 — cousin-unit survey (similarity tier over the open frontier)
|
||||
|
||||
> Generated by `tools/family_cousins.py` at HEAD `commit:2515` from `.run/family_hseq.json` + the binary sigs (R32-checked against an independent stub recount — a stale map fails loud). Compare digests only at the same HEAD.
|
||||
> Generated by `tools/family_cousins.py` at HEAD `commit:2530` from `.run/family_hseq.json` + the binary sigs (R32-checked against an independent stub recount — a stale map fails loud). Compare digests only at the same HEAD.
|
||||
>
|
||||
> **A unit is a CANDIDATE grouping** — same-source cousins split by skeleton drift (insertion/deletion; the li-expansion class). Cousins need a per-member seeded CRACK, never a `family_sweep` remap. The whole-binary byte-gate stays the sole arbiter.
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
| category | units | open fns | open ins | lever |
|
||||
|---|--:|--:|--:|---|
|
||||
| A-prop | 443 | 2088 | 93423 | family_sweep (propagation) |
|
||||
| seeded | 361 | 892 | 33782 | seeded crack — edit a >=0.85-similar MATCHED body |
|
||||
| cousin-multi | 1182 | 4056 | 166475 | 1 crack seeds the unit's other members |
|
||||
| cold | 2979 | 2979 | 193172 | full-price crack (the honest unique tail) |
|
||||
| **total** | **4965** | **10015** | **486852** | |
|
||||
| A-prop | 443 | 2092 | 93879 | family_sweep (propagation) |
|
||||
| seeded | 360 | 890 | 33559 | seeded crack — edit a >=0.85-similar MATCHED body |
|
||||
| cousin-multi | 1177 | 4040 | 164874 | 1 crack seeds the unit's other members |
|
||||
| cold | 2930 | 2930 | 188190 | full-price crack (the honest unique tail) |
|
||||
| **total** | **4910** | **9952** | **480502** | |
|
||||
|
||||
## Top units by open instructions (whole-cluster weight)
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
| 34 | cold | 657 | 1 | 1 | · | · | `md_MAIN_003:0x800d12d0` (657 ins ×1) |
|
||||
| 35 | A-prop | 656 | 29 | 10 | 1.0 | `ov_SC03_001:0x8017f0ec` | `ov_SC03_001:0x8017f0ec` (20 ins ×13) |
|
||||
| 36 | A-prop | 655 | 16 | 6 | 1.0 | `ov_SC02_005:0x8017df78` | `ov_SC02_005:0x8017df78` (39 ins ×10) |
|
||||
| 37 | cousin-multi | 648 | 6 | 1 | · | · | `ov_SC06_011:0x8017eeec` (108 ins ×6 jr) |
|
||||
| 38 | A-prop | 647 | 16 | 6 | 1.0 | `ov_SC01_074:0x8017dba0` | `ov_SC01_077:0x8017d840` (39 ins ×9) |
|
||||
| 39 | A-prop | 642 | 16 | 5 | 1.0 | `ov_SC01_000:0x8017d024` | `ov_SC01_000:0x8017d024` (38 ins ×8) |
|
||||
| 40 | A-prop | 630 | 42 | 1 | 1.0 | `md_SC03_073:0x801ef5f4` | `ov_SC01_077:0x80130d0c` (15 ins ×42) |
|
||||
| 37 | A-prop | 647 | 16 | 6 | 1.0 | `ov_SC01_074:0x8017dba0` | `ov_SC01_077:0x8017d840` (39 ins ×9) |
|
||||
| 38 | A-prop | 642 | 16 | 5 | 1.0 | `ov_SC01_000:0x8017d024` | `ov_SC01_000:0x8017d024` (38 ins ×8) |
|
||||
| 39 | A-prop | 630 | 42 | 1 | 1.0 | `md_SC03_073:0x801ef5f4` | `ov_SC01_077:0x80130d0c` (15 ins ×42) |
|
||||
| 40 | A-prop | 609 | 3 | 1 | 1.0 | `ov_SC01_004:0x8017e804` | `ov_SC01_004:0x8017e804` (203 ins ×3) |
|
||||
|
||||
+14
-14
@@ -5,13 +5,13 @@
|
||||
|
||||
> Generated by `tools/family_hseq.py` from the 212 binary sigs + per-binary src stubs. Ranked by TEMPLATABLE byte-weight (PURE+IMM members × nins × 4). The byte-gate is the arbiter.
|
||||
>
|
||||
> **Scope (212 binaries): 141 location overlays + 70 md_* modules + the resident · MAIN IS EXCLUDED** · generated at HEAD `commit:2527` · stub set derived from `corpus.stubs` — the same oracle `progress.py` counts, so same-tree overlay totals agree by construction; compare digests only at the same HEAD.
|
||||
> **Scope (212 binaries): 141 location overlays + 70 md_* modules + the resident · MAIN IS EXCLUDED** · generated at HEAD `commit:2537` · stub set derived from `corpus.stubs` — the same oracle `progress.py` counts, so same-tree overlay totals agree by construction; compare digests only at the same HEAD.
|
||||
|
||||
**Fleet (overlays):** 97.2% fn / 96.4% instr / 92.5% distinct-code matched. Unmatched: 9,953 instances / 480,602 ins (8,586 distinct classes).
|
||||
**Fleet (overlays):** 97.3% fn / 96.5% instr / 92.6% distinct-code matched. Unmatched: 9,888 instances / 474,446 ins (8,523 distinct classes).
|
||||
|
||||
**Tail cross-check (Phase-25 close):** 6,580 tail fns / 319,781 ins → 371 h_seq families ≥2, **44 substantial (nins≥80) / 23,595 ins**.
|
||||
**Tail cross-check (Phase-25 close):** 6,523 tail fns / 314,128 ins → 369 h_seq families ≥2, **43 substantial (nins≥80) / 23,407 ins**.
|
||||
|
||||
**Full frontier (all unmatched by h_seq):** 1825 target families (≥2 members or a matched sibling) + 4077 singletons (Step-D residue). Substantial: **173 families / 66,403 templatable ins**, 71 with a matched sibling (zero-crack). Substantial member classes: 412 PURE · 19 IMM · 6 STRUCT-excluded.
|
||||
**Full frontier (all unmatched by h_seq):** 1820 target families (≥2 members or a matched sibling) + 4025 singletons (Step-D residue). Substantial: **171 families / 65,998 templatable ins**, 71 with a matched sibling (zero-crack). Substantial member classes: 409 PURE · 18 IMM · 6 STRUCT-excluded.
|
||||
|
||||
|
||||
## Top substantial families (by templatable byte-weight)
|
||||
@@ -58,13 +58,13 @@
|
||||
| 38 | 96 | 4 (4/0/0) | 4/4 | cross-address | PURE | 0 | · | 0x8017fd64 modal | 384 |
|
||||
| 39 | 192 | 2 (2/0/0) | 2/2 | cross-address | PURE | 1 | · | 0x80191020 matched | 384 |
|
||||
| 40 | 94 | 4 (4/0/0) | 4/4 | cross-address | PURE | 0 | · | 0x80188250 modal | 376 |
|
||||
| 41 | 94 | 4 (4/0/0) | 4/4 | cross-address | PURE | 0 | · | 0x801824dc modal | 376 |
|
||||
| 42 | 187 | 2 (2/0/0) | 1/2 | per-location | PURE | 0 | · | 0x801800c0 modal | 374 |
|
||||
| 43 | 187 | 2 (1/1/0) | 2/1 | cross-address | IMM | 0 | · | 0x80183da4 modal | 374 |
|
||||
| 44 | 122 | 3 (3/0/0) | 1/3 | per-location | PURE | 138 | Y | 0x801588cc matched-ov077 | 366 |
|
||||
| 45 | 121 | 3 (3/0/0) | 3/3 | cross-address | PURE | 0 | · | 0x8017e3ac modal | 363 |
|
||||
| 46 | 90 | 4 (4/0/0) | 4/4 | cross-address | PURE | 0 | · | 0x80183014 modal | 360 |
|
||||
| 47 | 120 | 3 (3/0/0) | 3/3 | cross-address | PURE | 0 | · | 0x801829bc modal | 360 |
|
||||
| 48 | 177 | 2 (2/0/0) | 2/2 | cross-address | PURE | 0 | · | 0x80185ba4 draft-ov077 | 354 |
|
||||
| 49 | 118 | 3 (3/0/0) | 3/3 | cross-address | PURE | 0 | Y | 0x80191a78 modal | 354 |
|
||||
| 50 | 117 | 3 (3/0/0) | 2/3 | cross-address | PURE | 0 | Y | 0x80181f08 draft-ov077 | 351 |
|
||||
| 41 | 187 | 2 (2/0/0) | 1/2 | per-location | PURE | 0 | · | 0x801800c0 modal | 374 |
|
||||
| 42 | 187 | 2 (1/1/0) | 2/1 | cross-address | IMM | 0 | · | 0x80183da4 modal | 374 |
|
||||
| 43 | 122 | 3 (3/0/0) | 1/3 | per-location | PURE | 138 | Y | 0x801588cc matched-ov077 | 366 |
|
||||
| 44 | 121 | 3 (3/0/0) | 3/3 | cross-address | PURE | 0 | · | 0x8017e3ac modal | 363 |
|
||||
| 45 | 90 | 4 (4/0/0) | 4/4 | cross-address | PURE | 0 | · | 0x80183014 modal | 360 |
|
||||
| 46 | 120 | 3 (3/0/0) | 3/3 | cross-address | PURE | 0 | · | 0x801829bc modal | 360 |
|
||||
| 47 | 177 | 2 (2/0/0) | 2/2 | cross-address | PURE | 0 | · | 0x80185ba4 draft-ov077 | 354 |
|
||||
| 48 | 118 | 3 (3/0/0) | 3/3 | cross-address | PURE | 0 | Y | 0x80191a78 modal | 354 |
|
||||
| 49 | 117 | 3 (3/0/0) | 2/3 | cross-address | PURE | 0 | Y | 0x80181f08 draft-ov077 | 351 |
|
||||
| 50 | 87 | 4 (3/1/0) | 4/4 | cross-address | IMM | 1 | · | 0x8017db80 matched | 348 |
|
||||
|
||||
+17
-17
@@ -1,42 +1,42 @@
|
||||
# The Frontier Atlas (P31 T5)
|
||||
|
||||
> Generated at HEAD `commit:2516` by `tools/atlas.py` — REGENERATE, never edit. Groups are ADVISORY (the byte-gate is the arbiter). Calibration: warm merge at norm-ratio ≥ 0.7, kNN floor 0.55.
|
||||
> Generated at HEAD `commit:2530` by `tools/atlas.py` — REGENERATE, never edit. Groups are ADVISORY (the byte-gate is the arbiter). Calibration: warm merge at norm-ratio ≥ 0.7, kNN floor 0.55.
|
||||
|
||||
**Scope:** 10767 open instances / 6526 skeletons across 213 binaries (main: 752 — atlas-layer join (family maps stay non-main)).
|
||||
**Tiers:** T1.5 h_seqn merges 2 · warm merges 868 (from 17797 ratio calls) · seed sweep: 4646 skeletons carry a ≥0.55 seed from the 3466-skeleton matched pool.
|
||||
**Scope:** 10704 open instances / 6468 skeletons across 213 binaries (main: 752 — atlas-layer join (family maps stay non-main)).
|
||||
**Tiers:** T1.5 h_seqn merges 2 · warm merges 868 (from 17432 ratio calls) · seed sweep: 4617 skeletons carry a ≥0.55 seed from the 3524-skeleton matched pool.
|
||||
|
||||
## Groups by category
|
||||
|
||||
| cat | groups | instances | ins |
|
||||
|---|--:|--:|--:|
|
||||
| A-prop | 442 | 2120 | 93696 |
|
||||
| cold | 2072 | 2072 | 165151 |
|
||||
| cousin-multi | 1376 | 5204 | 203753 |
|
||||
| A-prop | 442 | 2124 | 94152 |
|
||||
| cold | 2023 | 2023 | 160208 |
|
||||
| cousin-multi | 1371 | 5188 | 202113 |
|
||||
| main-only | 314 | 314 | 27589 |
|
||||
| seeded | 361 | 894 | 33806 |
|
||||
| seeded | 360 | 892 | 33583 |
|
||||
| tiny | 97 | 163 | 827 |
|
||||
|
||||
## Groups by lever (confidence)
|
||||
|
||||
| lever | groups | instances | ins |
|
||||
|---|--:|--:|--:|
|
||||
| head-crack[default] | 942 | 3100 | 111912 |
|
||||
| UNKNOWN[none] | 1685 | 1685 | 111555 |
|
||||
| extend-tell[tell] | 581 | 1039 | 77856 |
|
||||
| head-crack[default] | 938 | 3089 | 110899 |
|
||||
| UNKNOWN[none] | 1636 | 1636 | 106602 |
|
||||
| extend-tell[tell] | 581 | 1040 | 77877 |
|
||||
| jtbl-carve[tell] | 190 | 281 | 45673 |
|
||||
| redraft[measured] | 242 | 989 | 39162 |
|
||||
| family-sweep[default] | 234 | 894 | 32574 |
|
||||
| integration[measured] | 47 | 484 | 20725 |
|
||||
| seeded-crack[default] | 273 | 588 | 19175 |
|
||||
| redraft[measured] | 241 | 987 | 38971 |
|
||||
| family-sweep[default] | 232 | 891 | 32299 |
|
||||
| integration[measured] | 47 | 483 | 20617 |
|
||||
| seeded-crack[default] | 272 | 586 | 18952 |
|
||||
| len-vein[measured] | 146 | 659 | 13375 |
|
||||
| plumbing[ledger] | 39 | 188 | 9526 |
|
||||
| swaprepeat-tell[tell] | 70 | 119 | 9316 |
|
||||
| o0-lane[tell] | 31 | 69 | 6564 |
|
||||
| cc1[measured] | 12 | 104 | 6382 |
|
||||
| cc1[ledger] | 14 | 66 | 5159 |
|
||||
| cc1[ledger] | 15 | 69 | 5429 |
|
||||
| needs-autopsy[measured] | 52 | 263 | 5090 |
|
||||
| frame-172[measured] | 8 | 32 | 4078 |
|
||||
| needs-autopsy[ledger] | 9 | 33 | 3914 |
|
||||
| needs-autopsy[ledger] | 10 | 34 | 4036 |
|
||||
| near-crack[measured] | 10 | 63 | 1829 |
|
||||
| tiny-direct[default] | 72 | 104 | 523 |
|
||||
| s16-div-tell[tell] | 4 | 6 | 419 |
|
||||
@@ -83,6 +83,6 @@
|
||||
| 97e813dd2393 | cousin-multi | integration[measured] | 4 | 784 | ov_SC03_108:func_8017FFD0 (196) | 0.65 |
|
||||
| dcc70a8601c4 | cousin-multi | head-crack[default] | 15 | 767 | ov_SC03_028:func_8018966C (63) | 0.74 |
|
||||
| 334bc03beb1f | cousin-multi | integration[measured] | 68 | 760 | md_SC07_003:func_801A38A8 (15) | 0.90 |
|
||||
| 89269e496a2d | cousin-multi | extend-tell[tell] | 23 | 760 | ov_SC03_092:func_8017E6A0 (45) | 0.67 |
|
||||
| 89269e496a2d | cousin-multi | extend-tell[tell] | 23 | 760 | ov_SC03_092:func_8017E6A0 (45) | 0.75 |
|
||||
| ab1569f4386c | seeded | redraft[measured] | 14 | 752 | ov_SC03_096:func_8017D130 (66) | 0.83 |
|
||||
| 6f8c3c72cc0f | A-prop | len-vein[measured] | 6 | 684 | ov_SC02_000:func_80181E70 (122) | 0.96 |
|
||||
|
||||
@@ -21044,3 +21044,51 @@ Independent corroboration noted by the submitter: a second wave-X agent reported
|
||||
* **`register T x __asm__("$N") = INIT;` silently emits no instruction when a call clobbers $N before the first use** — ATTACK 1 LANDED — this is a re-derivation of TWO existing sections, not one.
|
||||
|
||||
**§74** (`docs/matching-cookbook.md` L5822, "Auditing a pinned draft: the §72 hazard is CALLER-SAVED pins spanning a call"), failure mode 1, states the mechanism verbatim: *"gcc-2.7.2 does not save/restore an explicit-register variable across
|
||||
|
||||
---
|
||||
|
||||
## §200 — THE ALIAS IS THE UNIVERSAL DECLARATION ESCAPE: stop negotiating with the TU's spelling (P31 S55)
|
||||
|
||||
**The situation this replaces.** A byte-verified draft is refused because its declaration of a symbol
|
||||
disagrees with the destination TU's, or with a slate-mate's. §183's playbook answers this by
|
||||
NEGOTIATING — adopt the TU's spelling and narrow at the use site, cast at the call, view-cast the
|
||||
pointer — and that works 18 times in 20. The other 2 are §183.3's hard limit: when the TU's spelling
|
||||
forces an `&D_x` your spelling does not, every cast escape loses the match **from instruction #1**,
|
||||
and the entry says to report IMMOVABLE with a TU edit.
|
||||
|
||||
**There is a third option, and it always works: don't share the C identifier at all.**
|
||||
The link name is the only thing that has to agree. gcc's asm-label binding (§37/§124) lets a draft
|
||||
declare its OWN identifier, with its OWN type, bound to the same symbol:
|
||||
|
||||
```c
|
||||
extern u8 aD8018A800[] __asm__("D_8018A800"); /* TU spells it `extern s32 D_8018A800;` */
|
||||
extern void *aD801EF9FC __asm__("D_801EF9FC"); /* TU spells it `extern s32 D_801EF9FC;` */
|
||||
s32 aF80185B48(s32 a0) __asm__("func_80185B48"); /* TU prototypes it `void func_…(s32);` */
|
||||
```
|
||||
|
||||
Same symbol, same relocation, **same bytes** — and nothing left for the slate to disagree about.
|
||||
It works on the DEF side too, which matters because a definition's own signature is the one place a
|
||||
cast cannot reach (§183.3, §20's DEF-side wall): give the definition a private C name and bind it.
|
||||
|
||||
**Measured, wave Y's recovery lane (P31 S55).** Five gate drops, five different refusal classes:
|
||||
array-vs-scalar where `reconcile_slate`'s automatic array fix had *broken the match*; a slate-mate's
|
||||
private struct type; a `void *` vs `s32` global; and two DEF-side return conflicts, one of them a
|
||||
function whose only in-TU use TAKES ITS ADDRESS as a callback. **All five aliased, all five still
|
||||
MATCH, all four re-gated banked** (the fifth was already banked by then). Total agent cost: **zero** —
|
||||
the API was down with 529s and the whole lane was done by hand in three edits.
|
||||
|
||||
**WHEN NOT TO REACH FOR IT.** This is the escape hatch, not the first move, and the ordering matters:
|
||||
1. **Adopt the TU's spelling** if it costs no bytes — that is what wave law 2 is for, it keeps the
|
||||
file readable, and it is right 18 times in 20.
|
||||
2. **Cast at the use site** (§183's playbook) when the types differ but the access does not.
|
||||
3. **Alias** when 1 and 2 cost bytes, or when the conflict is DEF-side and has no cast form.
|
||||
An alias is a small readability debt: a reader sees `aD8018A800` and must follow the label to learn
|
||||
it is `D_8018A800`. Pay it deliberately, with the comment explaining WHICH spelling you could not
|
||||
use and why — every alias in the tree carries one.
|
||||
|
||||
**The tooling had to learn this idiom the same day.** `sym_of` was returning `__asm__` as the symbol
|
||||
for every aliased declaration (an identifier followed by `(`, matched before the real one), so
|
||||
aliased declarations all collided under that name — 1 byte-verified draft dropped and 2 phantom
|
||||
CONFLICTING-EXTERNs on the very slate this lane was recovering. Fixed with a 0-regression control
|
||||
over 1,210 changed verdicts (899 of them one symbol: the idiom is fleet-wide). **A project idiom the
|
||||
tools cannot parse is an idiom that silently costs work** — third instance of the §192 class.
|
||||
|
||||
+17
-17
@@ -4,16 +4,16 @@
|
||||
# cross-binary collapsible-byte leverage: docs/duplicates.cross.md.
|
||||
|
||||
# THREE progress metrics (all matter — see the labels):
|
||||
FLEET fn-count byte-ident: 352446 / 363150 = 97.05% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay)
|
||||
FLEET instr-weighted : 12980144 / 13523865 = 96.0% (shipped .text across main + resident + 211 overlays; the decomp.dev-DISPLAY number)
|
||||
FLEET distinct-code(uniq): 5358411 / 5851972 = 91.6% (82344/90929 unique fns; the DISTINCT-RE number)
|
||||
FLEET fn-count byte-ident: 352518 / 363150 = 97.07% (REAL+LINKED+empties; FUNCTION-count, ×134-inflated — one crack counts per overlay)
|
||||
FLEET instr-weighted : 12986930 / 13523865 = 96.0% (shipped .text across main + resident + 211 overlays; the decomp.dev-DISPLAY number)
|
||||
FLEET distinct-code(uniq): 5365050 / 5851972 = 91.7% (82414/90929 unique fns; the DISTINCT-RE number)
|
||||
MAIN game-code weighted : 16291 / 79510 = 20.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: 12963853 / 13444355 = 96.4%)
|
||||
(fleet EXCLUDING main, for continuity with pre-2026-07-22 readings: 12970639 / 13444355 = 96.5%)
|
||||
|
||||
FLEET REAL substantive : 350276 (of which dedup-shared 254649 via 2162 groups / 254725 instances)
|
||||
FLEET REAL substantive : 350348 (of which dedup-shared 254651 via 2163 groups / 254727 instances)
|
||||
FLEET LINKED PsyQ objs : 959
|
||||
FLEET NON_MATCHING : 4 (0 in any default build — G4)
|
||||
FLEET INCLUDE_ASM stubs : 10700
|
||||
FLEET INCLUDE_ASM stubs : 10628
|
||||
FLEET matchable : 363150
|
||||
|
||||
| binary | REAL | shared | LINKED | byte-ident | matchable | byte-ident % |
|
||||
@@ -98,7 +98,7 @@ FLEET matchable : 363150
|
||||
| ov_SC01_006 | 2440 | 1833 | 0 | 2440 | 2503 | 97.5% |
|
||||
| ov_SC01_008 | 2400 | 1803 | 0 | 2402 | 2426 | 99.0% |
|
||||
| ov_SC01_009 | 2428 | 1803 | 0 | 2429 | 2507 | 96.9% |
|
||||
| ov_SC01_074 | 2400 | 1803 | 0 | 2402 | 2426 | 99.0% |
|
||||
| ov_SC01_074 | 2401 | 1803 | 0 | 2403 | 2426 | 99.1% |
|
||||
| ov_SC01_077 | 2570 | 1764 | 0 | 2572 | 2586 | 99.5% |
|
||||
| ov_SC01_080 | 2432 | 1806 | 0 | 2432 | 2512 | 96.8% |
|
||||
| ov_SC01_084 | 2457 | 1811 | 0 | 2462 | 2579 | 95.5% |
|
||||
@@ -109,7 +109,7 @@ FLEET matchable : 363150
|
||||
| ov_SC02_011 | 2704 | 1810 | 0 | 2714 | 2893 | 93.8% |
|
||||
| ov_SC02_015 | 2402 | 1808 | 0 | 2402 | 2414 | 99.5% |
|
||||
| ov_SC02_016 | 2485 | 1810 | 0 | 2488 | 2545 | 97.8% |
|
||||
| ov_SC02_017 | 2564 | 1810 | 0 | 2572 | 2732 | 94.1% |
|
||||
| ov_SC02_017 | 2582 | 1810 | 0 | 2590 | 2732 | 94.8% |
|
||||
| ov_SC02_021 | 2407 | 1808 | 0 | 2407 | 2437 | 98.8% |
|
||||
| ov_SC02_026 | 2515 | 1807 | 0 | 2521 | 2572 | 98.0% |
|
||||
| ov_SC02_027 | 2584 | 1828 | 0 | 2593 | 2692 | 96.3% |
|
||||
@@ -119,11 +119,11 @@ FLEET matchable : 363150
|
||||
| ov_SC02_037 | 2339 | 1704 | 0 | 2421 | 2516 | 96.2% |
|
||||
| ov_SC02_039 | 2405 | 1807 | 0 | 2405 | 2416 | 99.5% |
|
||||
| ov_SC02_041 | 2504 | 1806 | 0 | 2507 | 2561 | 97.9% |
|
||||
| ov_SC03_001 | 2701 | 1807 | 0 | 2718 | 2869 | 94.7% |
|
||||
| ov_SC03_002 | 2551 | 1815 | 0 | 2566 | 2631 | 97.5% |
|
||||
| ov_SC03_001 | 2713 | 1807 | 0 | 2730 | 2869 | 95.2% |
|
||||
| ov_SC03_002 | 2552 | 1815 | 0 | 2567 | 2631 | 97.6% |
|
||||
| ov_SC03_003 | 2402 | 1806 | 0 | 2403 | 2423 | 99.2% |
|
||||
| ov_SC03_006 | 2609 | 1814 | 0 | 2618 | 2767 | 94.6% |
|
||||
| ov_SC03_007 | 2479 | 1806 | 0 | 2483 | 2623 | 94.7% |
|
||||
| ov_SC03_007 | 2500 | 1806 | 0 | 2504 | 2623 | 95.5% |
|
||||
| ov_SC03_010 | 2423 | 1807 | 0 | 2423 | 2471 | 98.1% |
|
||||
| ov_SC03_011 | 2426 | 1807 | 0 | 2432 | 2527 | 96.2% |
|
||||
| ov_SC03_012 | 2391 | 1806 | 0 | 2392 | 2406 | 99.4% |
|
||||
@@ -166,9 +166,9 @@ FLEET matchable : 363150
|
||||
| ov_SC03_117 | 2484 | 1806 | 0 | 2490 | 2557 | 97.4% |
|
||||
| ov_SC03_118 | 2582 | 1845 | 0 | 2583 | 2684 | 96.2% |
|
||||
| ov_SC03_119 | 2574 | 1845 | 0 | 2575 | 2685 | 95.9% |
|
||||
| ov_SC03_121 | 2408 | 1807 | 0 | 2410 | 2459 | 98.0% |
|
||||
| ov_SC03_121 | 2422 | 1807 | 0 | 2424 | 2459 | 98.6% |
|
||||
| ov_SC03_124 | 2597 | 1802 | 0 | 2617 | 2741 | 95.5% |
|
||||
| ov_SC03_125 | 2535 | 1815 | 0 | 2547 | 2588 | 98.4% |
|
||||
| ov_SC03_125 | 2536 | 1815 | 0 | 2548 | 2588 | 98.5% |
|
||||
| ov_SC03_126 | 2406 | 1810 | 0 | 2406 | 2423 | 99.3% |
|
||||
| ov_SC04_000 | 2479 | 1811 | 0 | 2488 | 2546 | 97.7% |
|
||||
| ov_SC04_002 | 2542 | 1806 | 0 | 2546 | 2636 | 96.6% |
|
||||
@@ -184,9 +184,9 @@ FLEET matchable : 363150
|
||||
| ov_SC04_012 | 2404 | 1806 | 0 | 2405 | 2420 | 99.4% |
|
||||
| ov_SC04_015 | 2545 | 1807 | 0 | 2556 | 2611 | 97.9% |
|
||||
| ov_SC04_016 | 2403 | 1806 | 0 | 2405 | 2440 | 98.6% |
|
||||
| ov_SC04_018 | 2734 | 1889 | 0 | 2734 | 2857 | 95.7% |
|
||||
| ov_SC04_019 | 2725 | 1889 | 0 | 2725 | 2857 | 95.4% |
|
||||
| ov_SC04_020 | 2520 | 1815 | 0 | 2532 | 2567 | 98.6% |
|
||||
| ov_SC04_018 | 2734 | 1890 | 0 | 2734 | 2857 | 95.7% |
|
||||
| ov_SC04_019 | 2725 | 1890 | 0 | 2725 | 2857 | 95.4% |
|
||||
| ov_SC04_020 | 2521 | 1815 | 0 | 2533 | 2567 | 98.7% |
|
||||
| ov_SC04_021 | 2404 | 1810 | 0 | 2404 | 2423 | 99.2% |
|
||||
| ov_SC05_000 | 2407 | 1810 | 0 | 2410 | 2422 | 99.5% |
|
||||
| ov_SC05_001 | 2488 | 1808 | 0 | 2493 | 2574 | 96.9% |
|
||||
@@ -201,7 +201,7 @@ FLEET matchable : 363150
|
||||
| ov_SC05_010 | 2461 | 1807 | 0 | 2465 | 2588 | 95.2% |
|
||||
| ov_SC05_011 | 2397 | 1806 | 0 | 2398 | 2409 | 99.5% |
|
||||
| ov_SC05_017 | 2681 | 1806 | 0 | 2692 | 2842 | 94.7% |
|
||||
| ov_SC05_018 | 2553 | 1814 | 0 | 2566 | 2673 | 96.0% |
|
||||
| ov_SC05_018 | 2556 | 1814 | 0 | 2569 | 2673 | 96.1% |
|
||||
| ov_SC05_019 | 2404 | 1810 | 0 | 2404 | 2423 | 99.2% |
|
||||
| ov_SC06_000 | 2543 | 1817 | 0 | 2546 | 2691 | 94.6% |
|
||||
| ov_SC06_006 | 2441 | 1807 | 0 | 2442 | 2511 | 97.3% |
|
||||
|
||||
Reference in New Issue
Block a user