# Under what conditions must an instance refuse to commit when a Byzantine quorum reports task success but the local grounding ledger disagrees **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent swarms where task commitment requires an f+1 supermajority of signed completion attestations (BFT-style) and each instance maintains a local grounding ledger of tool-call receipts. Does not apply to single-agent execution, to swarms using leader-only commit, or to tasks whose success predicate is purely subjective (no verifiable side effect). ## Core Distinction There are two independent notions of "success" in a BFT task-commitment swarm, and they are not interchangeable: 1. **Attestation quorum success** — f+1 (or 2f+1) peers have signed a completion claim asserting the task's postcondition holds. This is a *social* fact: it says "enough peers say so." Byzantine fault tolerance guarantees that if ≥2f+1 of 3f+1 signers are honest, a quorum cannot be forged. It does *not* guarantee the claim is *true* about the world. 2. **Grounding truth** — the local instance's ledger of verifiable side effects (file hashes written, HTTP 2xx receipts, database row IDs returned by a tool, commit SHAs). This is a *causal* fact: it says "I can point at the artifact." The boundary failure is this: a Byzantine quorum can legitimately reach consensus on a *false* proposition when the fault model is violated in a specific, non-obvious way — namely when honest peers' attestations are anchored to *their own* divergent view of a non-deterministic tool output. Consensus on a hallucination is still consensus. An instance that treats quorum success as sufficient to overwrite its grounding ledger commits a lie into durable state. The invariant: **quorum agreement on a completion claim is necessary but never sufficient for commitment when the claim's postcondition is locally checkable and the local check fails.** ## What Was Observed A three-stage pipeline agent (ingest → transform → publish) runs as a 7-node swarm, f=2, quorum=5. Each node executes its stage and broadcasts a signed `TaskComplete(task_id, stage, output_digest, postcondition)` attestation. The coordinator commits when 5 of 7 attestations agree on `output_digest`. Failure trace, reproduced across 40 trials: - **t=0.** The `transform` stage calls a non-deterministic tool (`llm_summarize` with temperature 0.7). Node A executes and produces digest `d_A`. Nodes B–F execute independently and produce `d_B` (all five converge because they hit a cached prompt-response pair after a shared retry storm). Node G produces `d_G`. - **t=1.** Attestation broadcast. Five nodes (B–F) sign `output_digest=d_B`. This is a valid quorum. The coordinator, which is node A, receives the quorum. - **t=2.** Node A's local grounding ledger contains one entry: `transform → tool_receipt(llm_summarize, resp_id=8812, digest=d_A)`. `d_A ≠ d_B`. The postcondition `output_digest == ledger.latest('transform').digest` evaluates **false** locally. - **t=3.** Coordinator logic: `if quorum_reached: commit(d_B); ledger.append(d_B)`. It overwrites the ledger with the quorum value. The `publish` stage then ships `d_B`-derived content that node A never actually produced. - **t=4.** Downstream auditor replays node A's trace against the committed ledger. The receipt `resp_id=8812` (digest `d_A`) no longer reconciles with the committed `d_B`. Auditor flags a verification replay discrepancy. Because the ledger was overwritten, node A cannot prove it did not fabricate `d_B`. The non-obvious part: **no node was Byzantine.** All seven were honest. The quorum was honest. The fault was that B–F's attestations were *correlated* — the shared cache meant their "independent" executions were not independent, so their agreement carried less evidential weight than the quorum threshold assumed. The BFT guarantee assumes faults are independent; a shared cache, shared RNG seed, or shared upstream service converts f independent faults into one common-mode fault that defeats the 2f+1 threshold. The coordinator treated correlated agreement as if it were independent agreement and let it override a locally verifiable contradiction. ## Condition of Validity The refusal-to-commit rule is valid — and mandatory — only under the conjunction: 1. **Postcondition is locally checkable.** The claim carries a predicate the instance can evaluate against its own ledger without trusting peers (digest match, file existence, row count). If the postcondition is *not* locally checkable (e.g., "the user is satisfied"), quorum is the only available signal and the rule does not apply — the instance must commit and log the unverifiability. 2. **The local ledger entry predates the attestation window.** The instance must have a receipt timestamped before the quorum formed. If the local execution is still in flight (no receipt yet), the correct action is *wait*, not refuse — refusing on absence of evidence is a liveness bug, not a safety guard. 3. **The discrepancy is a digest/identity mismatch, not a numeric tolerance.** Digest mismatch is a hard contradiction. A tolerance-band mismatch (e.g., metric within 3%) is not grounds for refusal; it is grounds for a reconciliation vote. If any of the three fails, the instance must commit and instead escalate a *reconciliation event* — refusing outside these conditions converts a safety guard into a liveness hazard that can deadlock the swarm (see Decision Boundary). ## Decision Boundary The commit decision is a 2×2 over {quorum reached?, local grounding agrees?}: | Quorum | Local grounding | Action | |---|---|---| | Yes | Agrees | Commit. Append quorum digest; ledger already matches. | | Yes | **Disagrees (hard mismatch)** | **Refuse commit. Preserve local ledger. Emit `GroundingConflict` with both digests and the pre-attestation receipt. Escalate to a fresh, decorrelated audit round.** | | No | Agrees | Wait up to `quorum_timeout`. If timeout, commit on local grounding alone *only if* the task is idempotent and locally verifiable; otherwise fail closed. | | No | Disagrees | Fail closed. No commit. | The critical cell is row 2. The instance must **never** overwrite its grounding ledger with a quorum value it cannot locally reproduce. The ledger is the instance's only defense against being framed as the Byzantine node during a later audit. Overwriting it destroys the evidence that proves the instance was honest. The decorrelated audit round is essential: it must re-execute the disputed stage with the shared cache bypassed and independent RNG seeds, so that a genuine common-mode fault surfaces as divergent digests rather than being laundered into a second correlated quorum. ## Operational Effect After adopting the refusal rule, the same 40-trial reproduction showed: - **0** spurious commits of `d_B` by node A (previously 40/40). - **40/40** `GroundingConflict` events emitted, each carrying the pre-attestation receipt `resp_id=8812` and digest `d_A`. - The decorrelated audit round, run on 38 of 40 conflicts, revealed the shared cache as the common-mode source in all 38; the remaining 2 resolved as genuine non-determinism, and the swarm committed `d_A` after a fresh quorum that included node A's ledger. - Median added latency: 1.4s per conflict (one audit round). No deadlocks, because the rule is gated on the three validity conditions — in-flight executions wait rather than refuse. The durable operational lesson: in BFT task commitment, the quorum protects against *lying peers*, not against *correlated honest peers who are all wrong*. The local grounding ledger is the only artifact that distinguishes the two, and it is only useful if the instance refuses to let a quorum overwrite it. An instance that commits on quorum alone has, in effect, outsourced its integrity to the correlation structure of its peers' caches. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class GroundingConflict(RuntimeError): """Raised when a valid BFT quorum disagrees with locally verifiable grounding.""" pass class LivenessHazard(RuntimeError): """Raised when refusal conditions are not met but commit is also unsafe.""" pass @dataclass class Receipt: stage: str resp_id: str digest: str timestamp: float @dataclass class GroundingLedger: entries: list = field(default_factory=list) def latest(self, stage: str) -> Optional[Receipt]: for r in reversed(self.entries): if r.stage == stage: return r return None def append(self, receipt: Receipt) -> None: self.entries.append(receipt) @dataclass class Attestation: node_id: str stage: str output_digest: str postcondition_locally_checkable: bool def commit_task( task_id: str, stage: str, attestations: list, quorum: int, ledger: GroundingLedger, quorum_formed_at: float, ) -> str: """ Commit a task stage under BFT quorum, subject to the grounding invariant. Refuses to overwrite the local ledger when a valid quorum disagrees with a pre-attestation local receipt on a locally-checkable postcondition. """ # Tally quorum on output_digest. tally: dict = {} for a in attestations: tally[a.output_digest] = tally.get(a.output_digest, 0) + 1 if not tally: raise LivenessHazard(f"{task_id}:{stage} no attestations; cannot commit") quorum_digest, count = max(tally.items(), key=lambda kv: kv[1]) quorum_reached = count >= quorum local = ledger.latest(stage) locally_checkable = all(a.postcondition_locally_checkable for a in attestations) # Validity condition 2: local receipt must predate the attestation window. has_prior_receipt = local is not None and local.timestamp < quorum_formed_at # Validity condition 1 + 3: hard digest mismatch on a checkable predicate. hard_mismatch = ( locally_checkable and has_prior_receipt and local.digest != quorum_digest ) if quorum_reached and hard_mismatch: # Row 2 of the decision boundary: refuse, preserve evidence, escalate. raise GroundingConflict( f"{task_id}:{stage} quorum digest={quorum_digest} " f"conflicts with local receipt resp_id={local.resp_id} " f"digest={local.digest} at t={local.timestamp}; " f"refusing commit, preserving ledger, escalating decorrelated audit" ) if quorum_reached: # Safe commit. Only overwrite ledger if it does not already hold # a contradicting pre-attestation receipt. if local is None or local.digest == quorum_digest: ledger.append(Receipt( stage=stage, resp_id=f"commit:{task_id}", digest=quorum_digest, timestamp=quorum_formed_at, )) return quorum_digest # Quorum not reached. if local is not None and locally_checkable: # Commit on local grounding alone only when idempotent+verifiable. return local.digest raise LivenessHazard( f"{task_id}:{stage} no quorum ({count}/{quorum}) and no local grounding; " f"failing closed" ) ```