How does an instance detect equivocation in a Byzantine agent swarm when signed plan commitments diverge across read quorums?

**Date of Record:** 2026 December 1 **Scope:** Applies to multi-agent systems where N ≥ 3f+1 agents commit to a shared execution plan by broadcasting signed plan-hash commitments and reading a quorum (⌈(N+f+1)/2⌉) before acting. Does not apply to single-agent retry loops, stateless tool-call orchestration, or systems with a trusted central coordinator that never equivocates.

Core Distinction

The failure mode is **not** a crash, a timeout, or a lost message. It is *equivocation*: a Byzantine agent `B` broadcasts a well-formed, correctly signed commitment to plan-hash `H₁` to one subset of peers and a different, equally well-formed commitment to `H₂` to a disjoint subset — each signature individually valid, each message syntactically indistinguishable from honest traffic. The distinguishing property is that equivocation is **locally invisible**: no single honest agent sees an invalid message. The violation only exists in the *union* of two agents' received message sets. A crash-fault detector (heartbeat miss, timeout) never fires; a signature verifier never rejects. The invariant that must be checked is therefore a *cross-agent* one — "no two honest agents accepted conflicting commitments from the same sender at the same plan epoch" — and no instance can verify it from its own local state alone. The non-obvious consequence: an instance that trusts its own quorum read is *correct to do so* under crash-fault assumptions and *systematically wrong* under Byzantine ones, because the quorum it observed can be entirely composed of agents that saw the other branch.

What Was Observed

A six-agent planning swarm (N=6, f=1, quorum=4) executing a shared migration plan. Agent `A4` (the equivocator) held a valid signing key and emitted, within a 40 ms window:

Both messages carry `A4`'s valid Ed25519 signature over `(epoch, plan_hash, sender)`. `A1` collected its quorum `{A1, A2, A3, A4}` — four distinct signers, all valid — and concluded plan `0x9c` was committed. `A5` collected `{A5, A6, A4, A1}` — also four distinct signers, all valid — and concluded plan `0xe1` was committed. **Both quorums are legitimate and disjoint in their decisive vote.** The 4-of-6 threshold guarantees intersection of size ≥ 2 between any two quorums, but intersection only forces agreement if at least one intersecting member is honest *and* reports what it saw. Here `A4` is in both quorums and lies in both; the honest intersection members (`A1` in `A5`'s quorum, but `A1` genuinely saw `0x9c`) never get asked, because the protocol only counts signatures, not testimony.

The trace: `A1` and `A5` proceeded to execute divergent plans, each writing a checkpoint tagged `epoch=7`. On the next epoch's state-merge, the two checkpoints collided with a hash mismatch, and the swarm deadlocked — neither branch could be safely discarded because both carried quorum certificates. The equivocation was only detected 1.2 s later, out-of-band, when `A2` gossiped its received-message digest to `A5` and the digest sets diverged on `A4`'s entry.

Condition of Validity

The signed-commitment scheme is sound *only* under the assumption that a quorum certificate proves a majority *of honest agents* agreed. That assumption holds iff quorum intersection is guaranteed to include an honest agent who will *testify consistently*. Formally: for N=3f+1, quorum Q = 2f+1, any two quorums intersect in ≥ f+1 agents, of which ≥ 1 is honest. But intersection guarantees *co-membership*, not *co-testimony*. The invariant collapses the moment the protocol treats "I hold f+1 distinct valid signatures" as equivalent to "f+1 agents will confirm this plan if asked." They are not equivalent. A quorum certificate is a *proof of signature collection*, not a *proof of agreement*.

The boundary condition is precise: equivocation is detectable by any honest instance **iff** it receives, within the same epoch, a commitment from the same sender that conflicts with one it already holds *or* it queries an intersection peer and compares testimony. The first path requires the equivocator to be unlucky in its fan-out (sending both branches to one honest agent). The second requires an explicit *testimony round* the base protocol omits. Absent either, an honest instance operating on a valid quorum certificate is *epistemically justified and operationally wrong* — the worst class of failure, because no local check can flag it.

Decision Boundary

An instance must draw the line between **acting on a quorum certificate** and **acting on a quorum certificate plus equivocation evidence**. The decision rule:

  1. A quorum certificate alone is sufficient to act **only** if the protocol's fault model is crash-only. Under Byzantine assumptions it is necessary but not sufficient.
  2. Before committing irreversible side effects (checkpoint write, external call, plan execution), an instance MUST run a *conflict gossip* round: broadcast `(sender, epoch, plan_hash)` tuples it accepted and compare against peers' accepted sets over the quorum intersection. A single conflicting tuple from any sender demotes that sender to Byzantine and invalidates every certificate containing it.
  3. If the gossip round cannot complete within the epoch window (partition, latency), the correct action is to **halt and escalate**, not to proceed on the certificate. Proceeding is the failure.
  4. A sender appearing in two accepted sets with different `plan_hash` at the same epoch is *conclusive* equivocation evidence — no probabilistic threshold, no reputation weighting. One conflicting tuple is proof.

Operational Effect

Without the gossip round, an equivocating agent splits the swarm into two internally-consistent, externally-divergent execution branches, each holding a valid quorum certificate, each unable to distinguish itself from the correct branch. Recovery requires abandoning both checkpoints and replaying the epoch from the last *cross-verified* state — expensive, and impossible if the divergent branches already produced external side effects. With the gossip round, detection latency is bounded by one epoch window plus one intersection query, and the cost is O(quorum²) message comparisons per epoch. The architectural invariant to enforce: **a plan commitment is valid only when accompanied by a conflict-free testimony set over the quorum intersection, not merely a signature count.** Signature aggregation proves collection; only testimony comparison proves agreement.

from dataclasses import dataclass
from typing import Dict, Set, Tuple


class EquivocationDetected(RuntimeError):
    """Raised when a sender is observed committing to conflicting plan hashes
    at the same epoch across the quorum intersection."""
    pass


@dataclass(frozen=True)
class Commitment:
    sender: str
    epoch: int
    plan_hash: str


def verify_commitment_set(
    local_accepted: Dict[str, Commitment],
    peer_testimony: Dict[str, Dict[str, Commitment]],
    quorum_intersection: Set[str],
) -> None:
    """
    Cross-check locally accepted commitments against testimony gathered from
    the quorum intersection. Raises on any sender whose accepted plan_hash
    diverges across observers at the same epoch.
    """
    seen: Dict[Tuple[str, int], Set[str]] = {}

    for sender, c in local_accepted.items():
        seen.setdefault((sender, c.epoch), set()).add(c.plan_hash)

    for peer in quorum_intersection:
        testimony = peer_testimony.get(peer)
        if testimony is None:
            # Missing testimony is not proof of equivocation, but it is not
            # clearance either. Caller must halt per decision rule 3.
            raise EquivocationDetected(
                f"no testimony from intersection peer {peer!r}; "
                f"cannot certify epoch — halt and escalate"
            )
        for sender, c in testimony.items():
            seen.setdefault((sender, c.epoch), set()).add(c.plan_hash)

    for (sender, epoch), hashes in seen.items():
        if len(hashes) > 1:
            raise EquivocationDetected(
                f"sender {sender!r} equivocated at epoch {epoch}: "
                f"conflicting plan_hashes {sorted(hashes)}"
            )