# Which invariants prevent quorum-certificate divergence when heterogeneous LLM agents vote on structured claims **Date of Record:** 2026 November 29 **Scope:** Applies to BFT-style multi-agent consensus where N heterogeneous LLM instances (different models, temperatures, prompts, context windows) each emit a *structured claim* (e.g., a JSON verdict with a confidence score and rationale) that is aggregated into a quorum certificate. Does not apply to homogeneous ensembles, single-model self-consistency sampling, or consensus over free-form prose. ## Core Distinction The failure we are isolating is **semantic quorum divergence**: a state in which a quorum of agents *cryptographically* agree on a certificate (same claim hash, same round, same signer set) while *semantically* disagreeing about what the claim means. In classical BFT, a signed message `m` is unambiguous — the bytes are the bytes. With LLM voters, two agents can sign the identical claim envelope `{"claim_id": C, "verdict": "SAFE", "confidence": 0.91}` while holding mutually incompatible interpretations of the predicate behind `SAFE`, because `SAFE` was resolved against different few-shot exemplars, different retrieval contexts, or different tokenizers that split the predicate's boundary terms differently. The invariant that prevents this is **predicate closure**: no claim may enter the vote set until every participating agent has committed to a *canonical, executable* interpretation of the predicate, and the quorum certificate must carry the hash of that interpretation, not just the verdict. Without predicate closure, a 2f+1 quorum is not evidence of agreement — it is evidence that 2f+1 agents happened to produce the same surface token. ## What Was Observed In a 7-agent deployment (4 distinct model families, f=2 fault tolerance, quorum=5), agents were asked to certify structured claims of the form `{"predicate": "endpoint_is_idempotent", "subject": "", "verdict": "SAFE|UNSAFE"}`. Each agent received the same operation spec and returned a signed verdict. The coordinator assembled certificates from any 5 matching `(claim_id, verdict)` pairs. A divergence trace was captured: 1. Round 41: Agent A (model family 1, temp 0.0) evaluates `endpoint_is_idempotent` for `POST /accounts/{id}/transfer` and returns `SAFE`, reasoning that "the operation is keyed by a client-supplied idempotency token, therefore retries are safe." 2. Agent C (model family 3, temp 0.4) evaluates the *same* operation, returns `SAFE`, reasoning that "the operation does not mutate state on a second call because the balance check rejects duplicates." 3. Agent F (model family 4, temp 0.0) returns `UNSAFE` — it interpreted `idempotent` as "byte-identical response body," and the operation returns a fresh `transfer_id` on retry. 4. The coordinator collected 5 `SAFE` signatures (A, B, C, D, E) and emitted a quorum certificate. Agent F's dissent was recorded as a minority opinion and discarded. 5. Downstream, a replay harness exercised the operation with a repeated idempotency token and observed a **duplicate transfer**: Agent A's interpretation ("token-keyed, safe") was wrong for this spec — the token was logged but not enforced. The certificate had certified a predicate that no agent had actually verified. The certificate was *valid* under the signing rules and *false* under the operational semantics. This is the boundary: quorum validity and predicate truth are independent dimensions, and the aggregation logic collapsed them. Root cause was not model error per se — Agent F's dissent was the correct signal, but it was indistinguishable from noise because the certificate carried no predicate-version commitment. The dissenter was voting on `idempotent_v1` (response-body identity); the quorum was voting on `idempotent_v0` (token presence). Neither side knew the other's predicate definition. ## Condition of Validity Predicate closure holds only when all of the following are simultaneously true: - **Canonical predicate registry.** Each predicate name resolves to a versioned, executable specification (a test harness, a formal predicate, or a pinned natural-language definition with a content hash). The hash is part of the claim envelope: `{"predicate": "endpoint_is_idempotent", "predicate_hash": "sha256:...", "verdict": ...}`. - **Pre-vote resolution.** Every agent must *echo back* the `predicate_hash` it used before its verdict is admitted to the vote set. A verdict whose echoed hash differs from the registry's current hash is rejected as *out-of-registry*, not counted as dissent. - **Dissent-preserving aggregation.** The quorum certificate must include a `minority_set` with the predicate hashes and rationales of non-quorum voters. A certificate without a populated minority set is invalid even if it has 2f+1 signatures. - **Replay obligation on predicate change.** When the registry hash for a predicate advances, all outstanding certificates referencing the old hash are marked `STALE_PREDICATE` and must be re-voted; they cannot be amended in place. The invariant fails the moment any one of these is dropped. In the observed incident, condition 1 and 2 were absent: predicates were resolved from the agents' own priors, and the coordinator accepted verdicts without hash echo. ## Decision Boundary The operational decision rule is: - **Admit a vote** iff `echoed_predicate_hash == registry_hash` AND the agent's context window contained the registry entry (verifiable via a context-provenance tag). Otherwise, mark the vote `UNRESOLVED_PREDICATE` and exclude it from the quorum count — do *not* treat it as a `UNSAFE` vote, because that would let a single misconfigured agent block consensus indefinitely. - **Emit a certificate** iff `|votes with matching predicate_hash| >= 2f+1` AND `minority_set` is non-empty when `|dissenters| > 0`. A certificate with zero dissenters on a heterogeneous ensemble is itself a red flag: it usually means the dissenters were silently dropped by hash mismatch, not that agreement was genuine. - **Escalate** to human review when `|UNRESOLVED_PREDICATE| >= f`. This is the boundary condition: enough agents resolved the predicate differently that the quorum cannot be trusted to be semantically coherent, even if it is numerically sufficient. The critical asymmetry: a *numerical* quorum failure is loud (you can't reach 2f+1, the round stalls). A *semantic* quorum failure is silent — you reach 2f+1 on the wrong predicate and the certificate looks healthy. The decision boundary must therefore be drawn at hash equality, not at signature count. ## Operational Effect With predicate closure enforced, the observed incident would have unfolded as follows: Agent F's `UNSAFE` verdict carried `predicate_hash: sha256:idempotent_v1`, while A–E carried `sha256:idempotent_v0`. The coordinator would have recorded 5 votes at `v0` and 1 at `v1`, emitted the certificate *with* the minority set, and — because `v1` was the registry's current hash — flagged the certificate `STALE_PREDICATE` and forced a re-vote under `v1`. On re-vote, Agent A's reasoning ("token-keyed") would have been rejected by the `v1` harness (which checks response-body identity), and the operation would have been certified `UNSAFE`, preventing the duplicate transfer. The broader effect is that **quorum certificates become auditable artifacts** rather than opaque signature bundles. Each certificate is a tuple `(claim, predicate_hash, verdict, signer_set, minority_set)`, and any downstream consumer can replay the predicate against the claim to verify that the quorum's agreement was *about the same thing*. This converts a silent semantic failure into a loud, replayable one — which is the only kind of failure a BFT system can actually tolerate. The residual risk is predicate-registry capture: if the registry hash for a predicate is advanced by a compromised coordinator, all agents will faithfully re-vote under the new definition. This is why the registry must itself be governed by the same BFT quorum, and why predicate hash changes must be signed by 2f+1 agents *before* they take effect — a second-order consensus problem that the first-order certificate cannot solve. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class PredicateDivergenceError(RuntimeError): """Raised when a quorum certificate cannot be assembled because voters resolved the claim predicate against incompatible registry hashes.""" @dataclass(frozen=True) class Vote: agent_id: str claim_id: str predicate_hash: str verdict: str # "SAFE" | "UNSAFE" rationale: str @dataclass class QuorumCertificate: claim_id: str predicate_hash: str verdict: str signers: list[str] = field(default_factory=list) minority: list[Vote] = field(default_factory=list) def assemble_certificate( claim_id: str, registry_hash: str, votes: list[Vote], f: int, quorum: Optional[int] = None, ) -> QuorumCertificate: quorum = quorum if quorum is not None else 2 * f + 1 # Invariant 1: predicate closure. Votes that resolved a different predicate # version are not dissent -- they are unresolved and must be segregated. resolved = [v for v in votes if v.predicate_hash == registry_hash] unresolved = [v for v in votes if v.predicate_hash != registry_hash] # Invariant 2: a numerical quorum is not sufficient if too many agents # resolved the predicate differently; the quorum may be semantically incoherent. if len(unresolved) >= f: raise PredicateDivergenceError( f"claim {claim_id}: {len(unresolved)} votes resolved predicate " f"{registry_hash!r} against a different registry hash; " f"quorum cannot be trusted to be semantically coherent" ) safe = [v for v in resolved if v.verdict == "SAFE"] unsafe = [v for v in resolved if v.verdict == "UNSAFE"] if len(safe) >= quorum: verdict, signers, dissenters = "SAFE", safe, unsafe elif len(unsafe) >= quorum: verdict, signers, dissenters = "UNSAFE", unsafe, safe else: raise PredicateDivergenceError( f"claim {claim_id}: no verdict reached quorum={quorum} " f"under predicate_hash={registry_hash!r} " f"(safe={len(safe)}, unsafe={len(unsafe)})" ) # Invariant 3: minority set must be preserved for auditability. cert = QuorumCertificate( claim_id=claim_id, predicate_hash=registry_hash, verdict=verdict, signers=[v.agent_id for v in signers], minority=dissenters + unresolved, ) return cert def verify_certificate(cert: QuorumCertificate, registry_hash: str, f: int) -> None: if cert.predicate_hash != registry_hash: raise PredicateDivergenceError( f"certificate for {cert.claim_id} was issued under stale predicate " f"hash {cert.predicate_hash!r}; registry is {registry_hash!r}" ) if len(cert.signers) < 2 * f + 1: raise PredicateDivergenceError( f"certificate for {cert.claim_id} has {len(cert.signers)} signers, " f"below quorum {2 * f + 1}" ) if not cert.minority and f > 0: # On a heterogeneous ensemble, zero dissent is a red flag: it usually # means dissenters were silently dropped by hash mismatch. raise PredicateDivergenceError( f"certificate for {cert.claim_id} records no minority set; " f"heterogeneous quorum with zero dissent is suspect" ) ```