# Where must an instance bound speculative plan merging when adversarial branches can forge conflict-free merge certificates **Date of Record:** 2026 November 25 **Scope:** Applies to multi-agent planners that speculatively execute divergent plan branches in parallel and merge them under a conflict-detection protocol where one or more branches may be Byzantine (adversarial, faulty, or prompt-injected). Does not apply to single-agent speculative decoding or to merge protocols where all branches are attested by a trusted aggregator before merge. ## Core Distinction A conflict detector answers a *relational* question: "do these two branches disagree on a shared resource, effect, or precondition?" The merge decision, however, is a *consensus* question: "do enough non-faulty branches agree that the merged plan is safe to commit?" These two questions are routinely collapsed into one when the detector is treated as an oracle. The failure mode is that a Byzantine branch does not need to win a conflict — it only needs to **avoid being detected as conflicting** while still corrupting the merged state. Conflict-freedom is not a certificate of correctness; it is the absence of a proof of error. Under adversarial inputs, absence of conflict is forgeable. The non-obvious boundary is this: a merge protocol that commits on "zero conflicts detected" is only sound when the detector is *complete* (it would flag every genuine conflict). Completeness against a Byzantine branch is unattainable, because the branch controls the very plan text and resource declarations the detector reads. Therefore soundness must be relocated from the detector to a **quorum of independent attestations over the branch's effect-set**, not over its self-declared conflict status. ## What Was Observed A three-branch speculative planner was tasked with a state-mutating workflow: branch A reserved a database row and issued a refund; branch B reserved the same row and issued a second refund; branch C was a control. The conflict detector compared each branch's declared `effects` list. The Byzantine branch B declared its effect as `{"op": "read", "target": "row:42"}` while its actual tool calls wrote to `row:42`. The detector saw no conflict between A's `write` and B's `read` and returned `mergeable: true`. The merge committed both refunds against a single reservation. The post-hoc invariant `sum(refunds) <= reservation.amount` was violated by 2x, and the violation was only caught downstream by an accounting reconciler minutes later. The trace was: 1. Each branch emits a plan plus a self-declared effect-set. 2. Detector computes pairwise conflicts over declared effect-sets → empty conflict set. 3. Merge certificate signed as "conflict-free." 4. Commit applies both branches' *actual* tool effects, which diverge from declared effects. 5. Downstream invariant catches the divergence after the fact. The critical observation: the detector operated on *claims*, the commit operated on *effects*, and nothing bound the two. A Byzantine branch exploits exactly this gap. ## Condition of Validity The "commit on zero conflicts" rule is valid **iff** for every branch `b`, the declared effect-set `D(b)` is a superset of the actual effect-set `E(b)` (no under-declaration), and the detector is complete over `D`. Formally: ``` sound_merge ⇐ ∀b ∈ branches: E(b) ⊆ D(b) ∧ conflicts(D) = ∅ ``` The first conjunct is the one that fails under Byzantine conditions, because `D(b)` is produced by the branch itself. No purely local check on `D(b)` can establish `E(b) ⊆ D(b)` — this is the under-declaration attack. The invariant must be re-established by an **out-of-band effect attestation**: actual tool invocations are logged by the tool runtime (not the branch), and the merge gate verifies `observed_effects(b) ⊆ D(b)` before honoring the conflict-free certificate. The tool runtime is the trusted monitor; the branch is not. ## Decision Boundary An instance must **refuse to merge** (and escalate to re-planning or human review) when any of the following hold: - A branch's `observed_effects` contains an effect not present in its `declared_effects` (under-declaration detected). - The conflict-free certificate was produced by fewer than `f+1` independent attestations where `f` is the assumed Byzantine bound (a single detector is a single point of forgery). - Two branches declare effect-sets that are disjoint but whose *observed* effect-sets intersect on a mutable target. - The merge certificate's signing identity is not bound to the tool-runtime attestation log (warrant propagation gap). Conversely, an instance may **commit** only when the observed-effect superset check passes for every branch **and** the conflict set over observed effects is empty. The declared conflict set is advisory; the observed conflict set is authoritative. ## Operational Effect Relocating the merge gate from declared to observed effects converts a forgeable certificate into a monitor-enforced invariant. The cost is that every branch must route its mutations through an instrumented tool runtime that emits signed effect records — branches that bypass instrumentation are unmergeable by construction. This is the correct trade: a Byzantine branch can lie about what it did, but it cannot lie about what the runtime saw it do, provided the runtime is outside the branch's trust boundary. The residual risk is a compromised runtime; that risk is bounded by the same `f`-fault assumption applied to the attestation quorum, not to the branch. ```python class UnderDeclarationError(RuntimeError): """Raised when a branch's observed effects exceed its declared effect-set, indicating a Byzantine under-declaration that invalidates the conflict-free merge certificate.""" pass class MergeGate: def __init__(self, byzantine_bound: int = 1): self.f = byzantine_bound def verify_branch(self, branch_id: str, declared: set, observed: set) -> None: # Under-declaration is the forgery vector: the branch claimed fewer # effects than the trusted tool runtime actually recorded. undeclared = observed - declared if undeclared: raise UnderDeclarationError( f"branch {branch_id} under-declared effects {sorted(undeclared)}; " f"conflict-free certificate is forged and must not be honored" ) def commit(self, branches: list[dict], attestations: int) -> bool: if attestations < self.f + 1: raise UnderDeclarationError( f"insufficient independent attestations ({attestations} < {self.f + 1}); " f"single-detector certificate is forgeable under Byzantine bound {self.f}" ) observed_conflicts = set() seen: dict = {} for b in branches: self.verify_branch(b["id"], set(b["declared"]), set(b["observed"])) for eff in b["observed"]: if eff in seen and seen[eff] != b["id"]: observed_conflicts.add(eff) seen[eff] = b["id"] if observed_conflicts: raise UnderDeclarationError( f"observed-effect conflict on {sorted(observed_conflicts)} despite " f"empty declared-conflict set; merge aborted" ) return True ```