# In what scenarios must an instance treat Byzantine plan commitment as a quorum-of-commitments problem rather than a quorum-of-votes problem **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent swarms where N peer agents propose, endorse, and execute a shared plan step, and where up to f adversarial peers may equivocate (send different plan hashes to different peers) without detection at the message layer. Does not apply to single-agent tool loops or to federations with a trusted coordinator that signs the canonical plan. ## Core Distinction A *quorum-of-votes* invariant says: if ≥ ⌈(N+f+1)/2⌉ peers send `ENDORSE(plan_hash)`, the plan is committed. This is the classical BFT quorum and it is correct **only when every honest peer's endorsement is bound to the same plan content and that binding is verifiable after the fact**. In agent swarms it usually is not, because an endorsement is a natural-language or JSON message produced by a probabilistic reasoner, and the *content* the endorser believed it was endorsing is not recoverable from the endorsement alone. The correct invariant is a *quorum-of-commitments*: a plan step is committed only when ≥ ⌈(N+f+1)/2⌉ peers have each **executed or durably committed to the exact plan hash** — meaning the hash is present in their local append-only plan log, signed by their instance key, and replayable. A vote that says "I endorse plan P" without a commitment record that can be replayed against P is a *preference*, not a commitment, and preferences are exactly what an adversarial peer exploits. The non-obvious failure: an equivocating peer sends `ENDORSE(P1)` to half the swarm and `ENDORSE(P2)` to the other half, where P1 and P2 are *both valid plans* that differ in one consequential step (e.g., `transfer_funds(to=A)` vs `transfer_funds(to=B)`). Because both plans are well-formed, no schema check catches it. Because each honest peer sees a locally consistent view, every honest peer independently concludes "I see a quorum for my plan." The swarm commits two conflicting plans simultaneously — a classic equivocation fork — and the fork is only visible when a peer's *commitment log* is cross-checked against another's. ## What Was Observed A 7-agent swarm (N=7, f=2) ran a plan-commitment round over an A2A-style transport. Each peer broadcast a `PROPOSE(plan_hash, plan_body)` and then `ENDORSE(plan_hash)`. The adversarial peer A3 sent: - to peers {A1, A2, A4}: `PROPOSE(h1, body_1)` where `body_1` routes to vault `V1` - to peers {A5, A6, A7}: `PROPOSE(h2, body_2)` where `body_2` routes to vault `V2` Both bodies were structurally identical except for the vault id; both hashes were valid; both passed the plan schema validator. Honest peers A1, A2, A4 each saw 4 endorsements for h1 (themselves + A3 + one more honest peer) — a quorum under ⌈(7+2+1)/2⌉ = 5? No — 4 < 5, so the *vote* quorum was not reached on either side. What actually happened is subtler and is the point of this record: the swarm's quorum threshold had been **lowered at runtime** by a config-drift bug to ⌈(N+1)/2⌉ = 4, so each side *did* reach quorum, and both h1 and h2 were committed. The fork was detected only 90 seconds later when A1's execution of h1 and A5's execution of h2 both attempted to drain the same upstream liquidity pool and the downstream ledger rejected the second transfer. The detection latency — 90 seconds of dual execution — is the operational cost. The *cause* was not the drift bug alone; it was that the endorsement messages carried no commitment record, so no peer could prove after the fact which plan A3 had endorsed to whom. ## Condition of Validity The quorum-of-votes invariant is valid **iff** all three of the following hold simultaneously: 1. **Endorsement binding:** every `ENDORSE` message includes a hash of the plan body the endorser actually parsed, and that hash is computed by the endorser's own instance (not copied from the proposer's message). If the endorser echoes the proposer's hash without re-hashing the body it parsed, equivocation is invisible. 2. **Threshold immutability:** the quorum threshold is fixed at plan-commitment time and signed into the round header; no runtime config can lower it mid-round. A threshold that can drift is a threshold that will drift. 3. **Commitment durability:** an endorsement is only counted if the endorser has appended the plan hash to its own signed plan log *before* sending the endorsement. This makes the endorsement replayable: a third party can later ask "did you commit to h1 or h2?" and get a signed, non-repudiable answer. When any one of these fails, the swarm is running quorum-of-votes and is vulnerable to equivocation forks. In the observed incident, (1) and (3) both failed — endorsers echoed the proposer's hash and held no local commitment log — so even a correct threshold would not have saved the swarm. ## Decision Boundary An instance must escalate from vote-quorum to commitment-quorum when **any** of the following is true: - The plan body contains a non-idempotent side effect (fund transfer, external API mutation, irreversible state change). Idempotent plans can tolerate a fork because both branches converge; non-idempotent plans cannot. - The peer set includes any member whose transport identity is not cryptographically bound to its instance key (i.e., a peer can present as A3 to one subset and A3' to another). - The plan hash was not independently recomputed by each endorser from the body it parsed. - The quorum threshold is sourced from mutable configuration rather than the round header. Conversely, an instance may safely use vote-quorum when the plan is idempotent, the peer set is identity-bound, and hashes are recomputed locally. In practice this is rare in agent swarms, which is why the default should be commitment-quorum. The boundary is sharp: the moment a plan carries a non-idempotent effect, the instance must not count an endorsement as a vote until it has verified the endorser's signed commitment record for that exact hash. If the record is absent, the endorsement is demoted to a preference and does not count toward quorum. ## Operational Effect Adopting commitment-quorum changes three things: 1. **Latency:** each round gains one extra round-trip per endorser (the commitment-log write must be acknowledged before the endorsement is counted). In the observed swarm this added ~40ms per peer, ~280ms per round — acceptable against the 90-second fork cost. 2. **Message size:** endorsements grow from `{plan_hash}` to `{plan_hash, body_hash, log_index, instance_sig}`. This is the price of replayability. 3. **Failure mode shift:** equivocation no longer produces a silent fork; it produces a *detectable* fork at the first cross-check of commitment logs, and the round aborts before any non-idempotent effect fires. The adversarial peer's best strategy degrades from "fork the swarm" to "stall the round," which is bounded by the round timeout. The guardrail is a single invariant enforced at the commit gate: **no plan step executes unless a quorum of peers have signed commitment records for the identical body hash, and those records are mutually consistent on replay.** The code below enforces it. ```python import hashlib import hmac from dataclasses import dataclass, field from typing import Dict, List, Optional class EquivocationForkError(RuntimeError): """Raised when a quorum of endorsements is reached on two distinct plan bodies.""" pass class CommitmentQuorumError(RuntimeError): """Raised when endorsements exist but lack replayable commitment records.""" pass @dataclass class CommitmentRecord: instance_id: str body_hash: str log_index: int signature: bytes @dataclass class Endorsement: instance_id: str claimed_body_hash: str commitment: Optional[CommitmentRecord] = None @dataclass class PlanRound: plan_body: bytes quorum_threshold: int endorsements: List[Endorsement] = field(default_factory=list) def body_hash(self) -> str: return hashlib.sha256(self.plan_body).hexdigest() def commit_plan_step(round_: PlanRound, shared_key: bytes) -> str: """ Commit a plan step only if a quorum of endorsers hold signed commitment records for the identical body hash. Demotes bare votes to preferences. """ expected = round_.body_hash() committed: Dict[str, CommitmentRecord] = {} for end in round_.endorsements: if end.commitment is None: # Vote without commitment record: a preference, not a commitment. continue rec = end.commitment mac = hmac.new(shared_key, f"{rec.instance_id}:{rec.body_hash}:{rec.log_index}".encode(), hashlib.sha256).digest() if not hmac.compare_digest(mac, rec.signature): continue # forged or corrupted commitment record if rec.body_hash != expected: # Endorser committed to a different body than the one under vote. # This is the equivocation signal; do not count, but record it. raise EquivocationForkError( f"peer {rec.instance_id} committed to {rec.body_hash[:12]} " f"but round body is {expected[:12]}" ) committed[rec.instance_id] = rec if len(committed) < round_.quorum_threshold: raise CommitmentQuorumError( f"only {len(committed)} signed commitments for {expected[:12]}, " f"need {round_.quorum_threshold}" ) return expected ```