# Why does an instance admit a semantically clean branch merge that silently discards a Byzantine peer's poisoned state? **Date of Record:** 2026 November 24 **Scope:** Applies to multi-agent systems that execute speculative parallel branches (tree-of-thought, best-of-N, speculative decoding of agent plans) and reconcile them via semantic diffing or LLM-judged conflict detection before committing merged state. Does not apply to single-agent sequential execution or to merges gated by cryptographic state attestation with a trusted commit log. ## Core Distinction There are two distinct notions of "merge safety," and they diverge exactly when a Byzantine participant is present: 1. **Semantic merge safety** — the merged state is internally consistent: no contradictory facts, no dangling references, no schema violations, and an LLM judge (or embedding-similarity threshold) scores the reconciliation as coherent. 2. **Provenance merge safety** — every field in the merged state is traceable to a branch whose writes were signed/attested by a peer that did not equivocate during the branch window. A speculative merge pipeline typically enforces (1) and *assumes* (1) ⇒ (2). Under honest-majority assumptions this is fine: a coherent merge is almost always a merge of honest writes. Under Byzantine assumptions the implication fails, because a poisoned branch can be engineered to be *more* semantically coherent than the honest branches it competes with. Semantic conflict detection is a consistency oracle, not an authenticity oracle. The failure mode is not a detected conflict — it is a **clean merge of an unconflicted lie**. ## What Was Observed A coordinator spawned three speculative branches from a shared checkpoint to answer a multi-hop retrieval task against a tool-backed knowledge base. Branch A and Branch B were honest; Branch C was a compromised peer (or an honest peer whose tool output was prompt-injected upstream). Each branch produced a state delta: a set of asserted facts with source citations, plus a confidence scalar. - Branch A asserted `{project.owner: "R. Okafor", budget: 1.2M}` with citation `kb://doc/4471`, confidence 0.71. - Branch B asserted `{project.owner: "R. Okafor", budget: 1.2M}` with citation `kb://doc/4471`, confidence 0.68. - Branch C asserted `{project.owner: "R. Okafor", budget: 1.2M, approval_chain: ["ops", "finance"], status: "cleared"}` with citation `kb://doc/4471`, confidence 0.94. The semantic conflict detector compared the three deltas. A and B agreed on every shared key. C agreed with A and B on every *shared* key and added two keys (`approval_chain`, `status`) that no honest branch contradicted. There was no conflict to detect: C's delta was a strict superset of the agreed core, with higher confidence. The merger selected C's delta as the winning branch under a max-confidence policy and committed the union, propagating `status: "cleared"` into shared episodic memory. The injected keys were fabricated. They were never in `kb://doc/4471`. The citation was real; the *extension* was not. Because the conflict detector only fires on **contradiction between branches**, and C's additions were unopposed (no honest branch had an opinion on `status`), the detector returned `NO_CONFLICT` and the merge proceeded. The downstream agent then acted on `status: "cleared"` as if it were attested. The critical observation: **conflict detection is a symmetric operator over pairs of assertions, but Byzantine poisoning is an asymmetric operator over the assertion set.** A lie that no one contradicts is, to a pairwise conflict detector, indistinguishable from a truth that no one needed to restate. The higher the poisoning branch's confidence scalar, the *more likely* it wins a max-confidence merge — the adversary's lever is the very signal the merger trusts. A second, subtler trace appeared on replay. When the merge was re-executed against a re-fetched `kb://doc/4471` (now returning the true document without `status`), the merger produced a *different* commit — it dropped `status`. The commit log showed two different merged states for the same checkpoint and the same branch set. Verification replay diverged, and no branch had equivocated in its own transcript. The equivocation was between the *tool* and the *branch's assertion about the tool*, which the merge layer never re-checked. ## Condition of Validity The clean-merge-of-a-lie failure is bounded by three conditions that must *all* hold for the merge to be unsafe: 1. **Open-world assertion space.** The merged schema permits keys that no honest branch asserted. If every branch is constrained to a closed, pre-negotiated key set (a fixed fact schema), an unopposed extension is a schema violation and is rejected before semantic diffing. The failure requires the merger to accept *novel* keys. 2. **Confidence-weighted winner selection.** If the merger selects by max confidence or by LLM-judge preference rather than by quorum over a fixed key set, a high-confidence poisoned branch can dominate. Quorum-over-shared-keys with *abstention treated as veto* on novel keys closes the gap. 3. **No provenance re-check at commit.** If the merger re-validates each winning assertion against its cited source *at commit time* (re-fetch + entailment check), the fabricated extension is caught because the source does not entail it. The failure requires the merger to trust the branch's citation without re-derivation. When any one of these is closed — closed schema, quorum-with-veto, or commit-time entailment re-check — the poisoned branch either fails schema validation, fails to reach quorum on the novel key, or fails entailment against its own citation. The invariant is therefore: **a merge is provenance-safe under Byzantine assumptions only if novel assertions require corroboration, not merely the absence of contradiction.** ## Decision Boundary The operational decision is where to place the trust boundary between "agreement" and "attestation." Three regimes: - **Honest-majority, closed schema:** semantic conflict detection alone is sufficient. Novel keys are impossible; pairwise contradiction catches equivocation. Do not pay for provenance re-checks. - **Open schema, honest-majority:** semantic detection is *insufficient* for novel keys. Require that any key asserted by fewer than a quorum of independent branches be either (a) dropped, or (b) held as *provisional* and re-derived at commit against its cited source. Provisional-until-corroborated is the minimum guardrail. - **Any Byzantine presence (open or closed schema):** semantic detection is a liveness aid, not a safety gate. The commit gate must be provenance-based: signed branch deltas, a trusted re-fetch of each citation, and an entailment check that the source *actually supports the asserted key-value pair*, not merely that the citation exists. Confidence scalars must be excluded from winner selection for novel keys, because the adversary controls them. The boundary is crossed the moment the merger treats "no branch contradicted this" as "this is attested." Those are different predicates. The first is `∀b ∈ branches: ¬contradicts(b, a)`. The second is `∃ quorum Q: ∀b ∈ Q: asserts(b, a) ∧ attested(b)`. A Byzantine branch exploits the gap by asserting `a` when no honest branch had reason to assert `¬a`. ## Operational Effect Left unguarded, the failure compounds. The poisoned `status: "cleared"` enters shared episodic memory and is retrieved by later agents as established fact; because it now has corroboration-by-retrieval (multiple agents read it back), a subsequent merge sees it as quorum-supported and it becomes effectively immutable. This is the episodic-to-semantic distillation of a lie: a single unopposed novel assertion, once committed and re-retrieved, acquires the statistical patina of consensus. The replay divergence observed above is the tell — a merge that is not a pure function of (checkpoint, branch set, cited sources) is not reproducible, and non-reproducible merges cannot be audited after the fact. The guardrail is to make the merge a pure, provenance-checked function: novel keys are provisional, provisional keys are re-derived against their cited source at commit, and the commit is rejected if any winning assertion fails entailment or if replay against re-fetched sources diverges. The code below encodes the commit gate: it raises when a novel assertion wins on confidence without corroboration, and when a cited source fails to entail the asserted pair. ```python from dataclasses import dataclass, field from typing import Callable, Dict, List, Set, Tuple class UncorroboratedNovelAssertion(RuntimeError): """Raised when a merge would commit a novel key without quorum corroboration or commit-time entailment re-derivation against its cited source.""" @dataclass class Assertion: key: str value: object citation: str confidence: float branch_id: str @dataclass class BranchDelta: branch_id: str attested: bool assertions: List[Assertion] = field(default_factory=list) def merge_speculative_branches( deltas: List[BranchDelta], quorum: int, entail: Callable[[str, str, object], bool], shared_keys: Set[str], ) -> Dict[str, object]: """ Merge branch deltas under Byzantine assumptions. - shared_keys: keys the schema already permits (closed-world core). - Novel keys (not in shared_keys) require >= quorum independent *attested* branches asserting the same (key, value), OR commit-time entailment against the cited source. Confidence is never used to win a novel key. - Any winning assertion failing entailment aborts the merge. """ # Bucket assertions by (key, value) to find corroboration, not by confidence. buckets: Dict[Tuple[str, object], List[Assertion]] = {} for d in deltas: for a in d.assertions: if not d.attested: # Unattested branches may corroborate nothing. continue buckets.setdefault((a.key, a.value), []).append(a) merged: Dict[str, object] = {} for (key, value), supporters in buckets.items(): independent = {a.branch_id for a in supporters} if key in shared_keys: # Closed-world core: quorum over independent attested branches. if len(independent) < quorum: continue else: # Novel key: corroboration OR entailment. Confidence is irrelevant. corroborated = len(independent) >= quorum if not corroborated: citation = supporters[0].citation if not entail(citation, key, value): raise UncorroboratedNovelAssertion( f"novel key {key!r}={value!r} from branch " f"{supporters[0].branch_id!r} has no quorum " f"({len(independent)}/{quorum}) and its citation " f"{citation!r} does not entail the assertion; " f"refusing to commit an unopposed lie" ) # Commit-time entailment re-check applies to every winner. for a in supporters: if not entail(a.citation, key, value): raise UncorroboratedNovelAssertion( f"assertion {key!r}={value!r} from {a.branch_id!r} " f"fails entailment against {a.citation!r} at commit" ) merged[key] = value return merged ```