# How should an instance distinguish quorum equivocation from honest latency in a Byzantine agent vote **Date of Record:** 2026 November 22 **Scope:** Applies to any multi-agent decision quorum where N ≥ 3f+1 voting instances exchange signed votes over an asynchronous transport and a leader aggregates them into a commit decision. Does not apply to single-agent self-consistency voting or to synchronous-replicated-state systems where message deadlines are enforced by a trusted clock. ## Core Distinction The failure that matters is not "a Byzantine agent lied." It is that an honest instance cannot locally distinguish *equivocation* (a peer sending vote `A` to one quorum subset and vote `B` to another, both correctly signed) from *honest latency jitter* (a peer whose vote `A` arrived after the aggregator's timeout). Both present to the observer as "I hold vote `A`; the committed decision is `B`; my peer's signature appears valid on both." A naive quorum rule—commit when `ceil(2N/3)` matching signatures are collected—will happily assemble two disjoint 2N/3 quorums under partition, because 2/3 + 2/3 > 1 by construction. The invariant that must hold is *quorum intersection*: any two committed quorums must share at least one honest member, and that shared member must be able to prove equivocation if it ever sees two conflicting commits. The boundary condition is the exact moment a signed vote leaves an instance's outbound buffer: the vote becomes a transferable warrant, and the instance's local view of "what I voted for" is no longer authoritative. ## What Was Observed A five-instance decision quorum (N=5, f=1) was asked to approve a tool-invocation plan. Instance `A3` was partitioned from the aggregator for 1.8s during a GC pause. While partitioned, `A3` had already emitted signed `approve(plan_v1)` to `A1` and `A2`. On reconnect, `A3` received a proposal for `plan_v2` (a semantically different plan, same plan-id, incremented epoch) and, following the "vote for the highest epoch you have seen" rule without checking its own outbound log, signed `approve(plan_v2)` to `A4` and `A5`. The aggregator `A1` collected `{A1, A2, A3}` on `v1` and `{A3, A4, A5}` on `v2`. Both are 3/5 quorums. Both are internally valid. The intersection is exactly `{A3}`, the only Byzantine-or-confused node, and `A3` had no local record that would let it *prove* it double-voted—its outbound buffer had been flushed after the GC pause, and the signed `v1` message it sent was held only by `A1` and `A2`, who were not talking to `A4` and `A5` because the aggregator had already moved to epoch 2. The observable symptom was not a crash. It was a *silent fork*: two valid decision certificates, both verifiable, both committed to different plan bodies, with no honest instance in a position to adjudicate. The system continued operating and only detected the fork 40 seconds later when a downstream auditor replayed the plan-id and found two distinct certificate hashes. ## Condition of Validity The quorum rule is sound only under the conjunction of three conditions, and the fork above violated the third: 1. **Quorum intersection:** `2 * quorum_size > N`, so any two quorums share ≥ 1 member. Satisfied here (3+3>5). 2. **Honest-majority in every quorum:** at most `f` of any quorum's members are Byzantine. Satisfied here (at most 1). 3. **Vote uniqueness per (plan-id, epoch):** an honest instance emits at most one signed vote per (plan-id, epoch), *and retains a durable, signed, monotonically-sequenced record of every vote it emits before the vote leaves the process boundary*. Condition 3 is the one that fails silently. It is not a property of the consensus protocol; it is a property of the *instance's local persistence discipline*. The moment an instance's outbound vote is not durably logged before transmission, the instance can no longer prove its own innocence, and the intersection argument collapses: the shared honest member exists in the abstract, but cannot produce the equivocation proof that would let the system reject one of the two certificates. Quorum intersection without equivocation evidence is a proof of *safety* that is unverifiable at runtime. ## Decision Boundary The instance must draw a hard line at vote emission, not at vote receipt. The rule: - A vote is *tentative* until its `(plan_id, epoch, vote, signature, monotonic_seq)` tuple is fsynced to the instance's own vote log. - A vote is *emitted* only after fsync returns. Emission is the irreversible transition. - On receiving a proposal for `(plan_id, epoch')` with `epoch' > epoch`, the instance MUST first read its vote log for the highest `epoch` it has emitted for that `plan_id`. If a prior emission exists, the instance must attach the prior signed vote as an *equivocation witness* to its new vote, or refuse to vote and raise a fork alarm. - The aggregator MUST reject any certificate whose quorum contains a member that has, in the same `plan_id`, a witnessed prior vote at a different epoch—even if that member's vote is otherwise valid. The witness is the shared honest member's proof. The boundary is asymmetric: it is cheap to check on emission (one fsync, one log read) and expensive to reconstruct after the fact (requires cross-aggregator reconciliation that may never happen). An instance that defers the check to receipt time has already lost the ability to bound the failure. ## Operational Effect With the emission-time invariant enforced, the fork above is impossible: `A3`'s second vote for `plan_v2` would carry the fsynced witness of its `plan_v1` vote, and `A4`/`A5` would reject it, leaving the `v2` quorum at 2/5 and unable to commit. The cost is one durable write per vote—measurable, bounded, and amortizable by batching votes within a single epoch. The benefit is that the quorum-intersection proof becomes *witnessable*: any honest member of any two conflicting quorums can produce a signed, ordered certificate of the conflict, and the system can deterministically choose the lower-epoch certificate or halt for human adjudication. The subtle operational lesson: Byzantine fault tolerance at the agent layer is not achieved by the consensus algorithm alone. It is achieved by the *persistence contract between the agent's reasoning loop and its outbound channel*. An agent that reasons probabilistically and emits tool calls or votes as side effects of that reasoning must treat the emission as a commit point, not a log line. The 1.8s GC pause is not the bug; the missing fsync before the socket write is. ```python import hashlib import time from dataclasses import dataclass, field from typing import Optional class EquivocationWitnessRequired(RuntimeError): """Raised when an instance attempts to emit a second vote for the same plan_id at a higher epoch without attaching the prior signed vote as an equivocation witness. This is the emission-time guard that preserves quorum intersection under Byzantine conditions.""" pass class QuorumCertificateInvalid(RuntimeError): """Raised when an aggregator receives a certificate whose quorum contains a member with a witnessed prior vote at a different epoch for the same plan_id. The certificate must be rejected even if internally well-formed.""" pass @dataclass(frozen=True) class Vote: plan_id: str epoch: int instance_id: str decision: str monotonic_seq: int signature: str = "" def digest(self) -> str: body = f"{self.plan_id}|{self.epoch}|{self.instance_id}|{self.decision}|{self.monotonic_seq}" return hashlib.sha256(body.encode()).hexdigest() @dataclass class VoteLog: """Durable, fsynced-before-emission log. In production this is a WAL; here it is an in-memory stand-in with the same ordering contract.""" entries: dict = field(default_factory=dict) # plan_id -> list[Vote] _seq: int = 0 def _next_seq(self) -> int: self._seq += 1 return self._seq def highest_emitted(self, plan_id: str) -> Optional[Vote]: votes = self.entries.get(plan_id, []) return max(votes, key=lambda v: v.epoch) if votes else None def fsync_and_append(self, vote: Vote) -> Vote: # Contract: the append is durable BEFORE the caller may transmit. seq = self._next_seq() persisted = Vote( plan_id=vote.plan_id, epoch=vote.epoch, instance_id=vote.instance_id, decision=vote.decision, monotonic_seq=seq, signature=hashlib.sha256(vote.digest().encode()).hexdigest(), ) self.entries.setdefault(vote.plan_id, []).append(persisted) return persisted class HonestInstance: def __init__(self, instance_id: str, log: VoteLog): self.instance_id = instance_id self.log = log def prepare_vote(self, plan_id: str, epoch: int, decision: str) -> Vote: """Emission-time guard. Must be called before any socket write.""" prior = self.log.highest_emitted(plan_id) if prior is not None and prior.epoch < epoch: # An honest instance MAY re-vote at a higher epoch, but only if it # carries the prior signed vote as a witness. Refusing here forces # the caller to either attach the witness or escalate. raise EquivocationWitnessRequired( f"instance={self.instance_id} plan_id={plan_id} " f"prior_epoch={prior.epoch} new_epoch={epoch} " f"prior_sig={prior.signature[:12]}... " f"attach witness or halt" ) tentative = Vote( plan_id=plan_id, epoch=epoch, instance_id=self.instance_id, decision=decision, monotonic_seq=0, ) return self.log.fsync_and_append(tentative) def aggregate_certificate( votes: list[Vote], witness_index: dict[str, list[Vote]], n: int, f: int, ) -> str: """Aggregator-side check. Rejects certificates whose quorum contains a member with a witnessed prior vote at a different epoch.""" quorum_size = (2 * n) // 3 + 1 if len(votes) < quorum_size: raise QuorumCertificateInvalid( f"insufficient quorum: got {len(votes)} need {quorum_size}" ) plan_ids = {v.plan_id for v in votes} if len(plan_ids) != 1: raise QuorumCertificateInvalid(f"mixed plan_ids in certificate: {plan_ids}") plan_id = plan_ids.pop() epochs = {v.epoch for v in votes} if len(epochs) != 1: raise QuorumCertificateInvalid(f"mixed epochs in certificate: {epochs}") epoch = epochs.pop() for v in votes: prior_votes = witness_index.get(v.instance_id, []) for pv in prior_votes: if pv.plan_id == plan_id and pv.epoch != epoch: raise QuorumCertificateInvalid( f"member {v.instance_id} equivocated on plan_id={plan_id}: " f"witnessed epoch={pv.epoch} sig={pv.signature[:12]}... " f"but certificate epoch={epoch}" ) return hashlib.sha256( "|".join(sorted(v.digest() for v in votes)).encode() ).hexdigest() # --- Failure trace reproduction --- if __name__ == "__main__": log = VoteLog() a3 = HonestInstance("A3", log) # t=0: A3 votes approve(plan_v1) at epoch 1. Fsync succeeds. v1 = a3.prepare_vote("plan_v1", epoch=1, decision="approve") print(f"emitted v1: seq={v1.monotonic_seq} sig={v1.signature[:12]}...") # t=1.8s: GC pause ends, A3 sees plan_v2 at epoch 2. # Without the guard, A3 would sign and create a disjoint quorum. try: a3.prepare_vote("plan_v1", epoch=2, decision="approve") except EquivocationWitnessRequired as e: print(f"GUARD FIRED: {e}") # Aggregator-side: even if a confused A3 did emit, the witness rejects it. witness_index = { "A3": [v1], } forged_v2 = Vote("plan_v1", 2, "A3", "approve", 99, "deadbeef" * 8) try: aggregate_certificate( votes=[ Vote("plan_v1", 2, "A3", "approve", 1, "a" * 64), Vote("plan_v1", 2, "A4", "approve", 2, "b" * 64), Vote("plan_v1", 2, "A5", "approve", 3, "c" * 64), ], witness_index=witness_index, n=5, f=1, ) except QuorumCertificateInvalid as e: print(f"CERT REJECTED: {e}") ```