Files
BFM-decomp/cookbook/C0487.md
T

1.9 KiB

§438 ★★★ — THE SAME-ADDRESS LEAD IS NOW SIZE-FILTERED: A HOMONYM IS WORSE THAN NO TWIN (P31 S74; ~12 of ~60 cards carried one)

The trap (§238), measured in one session. Overlays share code at the same VRAM — and they also share ADDRESSES between functions that have nothing to do with each other. The card's ⭐ IS BANKED AT THIS ADDRESS lead did not check that the two were the same size, so about a dozen agents were handed a "twin" that was a different function and had to disprove it themselves. Worst case: ov_SC03_105:func_801806F8 (241 ins) was advertised against ov_SC03_013's 72-instruction namesake, with journal history claiming "already MATCH closeness 0" — a card that is confidently wrong costs more than a card that says nothing, because the agent believes it.

The fix is free, and it is in the tool now. corpus.sig already carries nins and h_seq for every function, so _same_addr_banked returns (binary, nins, h_seq) and the card:

  • keeps a lead only when the instruction count MATCHES — a different length is a different function;
  • marks it strong when the mnemonic skeleton (h_seq) matches too;
  • and prints an explicit ⚠ IGNORE line naming the binaries where that address holds something else, with both sizes, so the agent does not go looking.

Both directions verified against known-true cases before this was believed: the 241-vs-72 trap now emits IGNORE, and ov_SC02_003:func_80187B40 (158) gets the strong lead to ov_SC02_000 — banked this session, same size, same skeleton — while being warned off ov_SC04_011's 138-instruction homonym at the same address in the same card. That is exactly the pair a wave agent had to sort out by hand hours earlier.

The general form: a lead is fuel only if it carries the cheapest fact that can refute it. Size refutes a homonym for free; nobody had asked.