Files
BFM-decomp/cookbook/C0449.md
T

2.1 KiB

§401

A probe that does not model the GATE's carve is optimistic, and for jtbl functions it is wrong 92% of the time.

recover_integration --probe-only reports a per-function real cc1 verdict by compiling the draft in its real TU and comparing that function's bytes. For an ordinary function this is an excellent predictor. For a jump-table-bearing function it is systematically wrong, because the byte-gate does something the probe does not: harvest_verify carves the function into its own object so the jump table can be emitted ([jtbl] carved func_X in its log). The carve changes the translation-unit boundary, and therefore the codegen — so a draft can match in the uncarved TU and DIFF once carved.

Measured (P31 S70), on 52 leftover standalone-MATCH drafts:

probe verdict n jtbl-bearing
MATCH (gate says DIFF) 26 24 (92%)
CC1-FAIL 20 5 (25%)
DIFF 6 0

Worked case: ov_SC01_004:func_8017EB30 probes MATCH 279 ins; the gate says DIFF in a worktree and in-tree and via harvest_verify directly — three independent runs, so it is not a worktree artifact and not the canon -> cast_call_sites -> sig_unify pipeline either.

Rule. The whole-binary byte-gate is the arbiter (G3). Before believing a probe MATCH, ask whether the target's .s contains jtbl_[0-9A-Fa-f]{8} (the same predicate harvest_verify carves on, and parallel_gate._JTBL_RE). If it does, the probe has not modelled the work the gate must do — treat the verdict as UNPROVEN and do not use it to size a batch. This is the R34 shape: two oracles that disagree because one is structurally blind, fixed by knowing WHICH is blind, not by trusting the friendlier one.

Corollary — a declaration fix that only turns CC1-FAIL into DIFF has bought nothing. fix_arity_callers --any-proto (382 edits to the fleet-shared engine_core.h) and cast_self_callers --apply --sync-decls (main's 4 self-conflicts) both did exactly that in S70: every target compiled afterwards and none matched. Revert such an edit rather than leave unverified shared-state risk standing for zero banks.