# Which invariants prevent Byzantine quorum collapse in speculative execution trees under cross-agent plan verification **Date of Record:** 2026 November 19 **Scope:** Applies to multi-agent planners that fork speculative execution trees across N verifier agents and commit a branch when a Byzantine quorum (f + 1 honest of 2f + 1 total) attests to branch validity. Does not apply to single-agent self-verification or to sequential plan validation where no tree forking occurs. ## Core Distinction The failure mode here is not "a Byzantine agent lies." It is that the *speculation tree itself* is a shared mutable structure whose node identity is assigned before verification, and the quorum rule is evaluated over *node attestations* rather than over *plan-equivalence classes*. A Byzantine verifier does not need to forge a signature or corrupt a branch; it only needs to attest to a *sibling node that is byte-different but plan-equivalent* to the honest branch, splitting the honest attestation mass across structurally distinct tree nodes. The honest quorum never forms on any single node, the tree stalls, and the orchestrator's timeout logic commits the *first timeout-surviving branch* — which, under adversarial latency shaping, is the branch the Byzantine agent pre-computed. The distinction that matters operationally: liveness failures in speculative trees are indistinguishable from safety failures at the attestation layer, because both manifest as "no quorum on node X." A system that treats quorum-absence as "retry" converts a safety attack into a liveness attack and then resolves the liveness attack by committing unverified state. ## What Was Observed A planner forked a 5-way speculative tree over a tool-calling plan (branch = ordered tool sequence). Verification was delegated to 7 verifier agents (f=2 tolerance) using a commit rule: a node is committed when ≥5 distinct verifier signatures attest `valid(node_hash)`. Trace of the failure: 1. Honest branch `B*` produced node hash `h(B*)`. Four honest verifiers attested `h(B*)`. 2. Two Byzantine verifiers attested `h(B')` where `B'` is a semantically identical plan with a reordered independent tool pair (both orders are valid; the reorder changes the hash). 3. One honest verifier, under a stale retrieval of the plan's canonical form (episodic memory had cached the pre-normalization plan), attested `h(B'')` — a third hash. 4. Attestation mass on `h(B*)` = 4 < 5. No quorum. Orchestrator's 800ms deadline fired. 5. Timeout handler selected the branch with the *most* attestations and broke ties by earliest attestation timestamp. `h(B*)` had 4; `h(B')` had 2. It committed `B*` — but only because of the tiebreak, not because of a quorum. The invariant "committed ⇒ quorum-attested" was violated silently. 6. Critically, the audit log recorded `commit_reason: quorum` because the timeout path reused the same commit emitter. The safety violation was logged as a safety success. The observed mechanism: **hash-level attestation with plan-equivalence classes that are not closed under the normalization used to compute hashes.** Two plans that the executor treats as identical produce distinct attestation targets. The quorum denominator (5) is fixed, but the effective attestation domain is partitioned by an equivalence relation the quorum rule does not know about. ## Condition of Validity The Byzantine quorum argument (f+1 of 2f+1 honest suffices) holds only under the assumption that **all honest verifiers attest to the same node identity for the same plan**. This requires: - A canonicalization function `canon(plan) → node_hash` that is *sound* with respect to executor semantics: `canon(p) == canon(q)` iff the executor's behavior on `p` and `q` is indistinguishable on all reachable states. - Canonicalization applied *before* hashing, at the point of attestation, using a version-pinned normalizer that every verifier shares. If verifiers run different normalizer versions (common after a rolling deploy), the equivalence classes differ across verifiers and the quorum domain fragments even without Byzantine behavior. - The commit rule evaluated over *equivalence classes* (union of attestations across all nodes whose canonical forms match), not over individual nodes. The invariant that must hold is: **for any plan p, the set of honest verifiers attesting to any node in `[canon(p)]` has cardinality ≥ f+1, and the commit rule counts attestations by class, not by node hash.** When this invariant is violated — by non-canonical hashing, by normalizer version skew, or by class-blind commit rules — the quorum is no longer Byzantine-resilient regardless of f. A second condition: the timeout/fallback path must be *safety-preserving*, meaning it must either (a) refuse to commit and escalate, or (b) commit only a node that independently satisfies the quorum rule. A fallback that commits "the best-attested node" is a safety violation dressed as liveness recovery. ## Decision Boundary The boundary between "resilient" and "collapsed" is not f. It is whether the number of distinct equivalence classes among attestations, `|{canon(n) : n attested}|`, exceeds 1 for a single plan. Operationally: - If all honest verifiers share a normalizer version and canonicalize before hashing, `|classes| = 1` and the standard f+1 quorum applies. - If normalizer versions skew across verifiers (e.g., 3 verifiers on v2.1, 2 on v2.2, 2 Byzantine), the honest mass splits into two classes of sizes 3 and 2. Neither reaches 5. The Byzantine agents can now choose which class to *not* join, guaranteeing no class reaches quorum, and the timeout path decides. - The decision boundary is therefore: **commit is safe only when the attestation class with maximum cardinality has ≥ f+1 honest members AND the orchestrator can prove class membership without trusting the attesting agent's own canonicalization.** If the orchestrator must trust the verifier's claimed hash, the boundary fails. The guardrail: the orchestrator recomputes `canon` locally on the plan payload returned with each attestation, rejects attestations whose recomputed class disagrees with the claimed node, and counts by recomputed class. This makes the orchestrator the single canonicalizer and removes normalizer skew as an attack surface — at the cost of the orchestrator needing the full plan payload per attestation (bandwidth) and a version-pinned normalizer that cannot be hot-swapped mid-tree. ## Operational Effect Consequences observed after the failure: - **Silent safety violation:** the commit emitter reported `quorum` on a timeout tiebreak. Audit replay could not distinguish this from a genuine quorum commit. The fix required a distinct `commit_reason: timeout_tiebreak` enum value and a hard rule that `timeout_tiebreak` commits are flagged for post-hoc verification. - **Normalizer version pinning became a hard dependency:** the tree's root records the normalizer version; verifiers whose version mismatches are excluded from the attestation denominator (not counted as Byzantine, but not counted as honest either — they reduce the effective 2f+1 and can drive it below the quorum threshold, which must trigger escalation, not commit). - **Class-aware commit rule:** attestations are grouped by orchestrator-recomputed canonical hash; quorum is evaluated per group; the group with quorum wins; ties between quorum-satisfying groups (possible only under executor-semantics unsoundness in `canon`) trigger escalation. - **Liveness cost:** under normalizer skew, the system now escalates rather than commits, which surfaced as a 4% escalation rate in the first week post-fix — the true cost of the invariant that had been silently violated before. The general lesson for speculative execution trees: **quorum rules are only as strong as the equivalence relation they are evaluated over.** A Byzantine agent's cheapest attack is not to lie about validity but to exploit an equivalence-class mismatch so that honest attestations never aggregate. The invariant to enforce is class-closed attestation with orchestrator-side canonicalization, and the invariant to never violate is that the commit path and the timeout path share no code that can emit a quorum attestation. ```python class QuorumCollapseError(RuntimeError): """Raised when attestation classes fragment such that no honest quorum can form.""" pass class NormalizerSkewError(QuorumCollapseError): """Raised when verifier normalizer versions disagree, fragmenting the attestation domain.""" pass def commit_speculative_branch( attestations: list[dict], orchestrator_normalizer, expected_normalizer_version: str, f: int, quorum_size: int, ) -> str: """ Commit a branch only if a single canonical class reaches quorum. attestation = {"plan_payload": ..., "claimed_hash": ..., "normalizer_version": ..., "verifier_id": ...} """ class_mass: dict[str, set[str]] = {} skew_versions: set[str] = set() for att in attestations: if att["normalizer_version"] != expected_normalizer_version: # Not Byzantine, but excluded from the honest denominator. skew_versions.add(att["normalizer_version"]) continue recomputed = orchestrator_normalizer(att["plan_payload"]) if recomputed != att["claimed_hash"]: # Verifier attested a hash it cannot justify; treat as Byzantine. continue class_mass.setdefault(recomputed, set()).add(att["verifier_id"]) if skew_versions: raise NormalizerSkewError( f"normalizer version skew detected: {sorted(skew_versions)}; " f"effective quorum domain reduced, refusing to commit" ) winners = [h for h, voters in class_mass.items() if len(voters) >= quorum_size] if len(winners) == 0: max_mass = max((len(v) for v in class_mass.values()), default=0) raise QuorumCollapseError( f"no canonical class reached quorum {quorum_size}; " f"max class mass = {max_mass}, classes = {len(class_mass)}; " f"timeout fallback must escalate, not commit" ) if len(winners) > 1: raise QuorumCollapseError( f"multiple canonical classes reached quorum: {winners}; " f"canonicalization is not sound w.r.t. executor semantics" ) return winners[0] ```