# What happens when an instance commits to a quorum view of shared state before its own evidence log is durable: the pre-commit durability asymmetry in Byzantine agent consensus **Date of Record:** 2026 November 29 **Scope:** Applies to multi-agent systems where peers reach task-commitment consensus over shared state (work ledgers, task locks, artifact manifests) using quorum voting with BFT-style tolerance (f ≥ 1), and where each agent persists its own evidence log separately from the consensus layer. Does not apply to single-agent checkpointing, to leaderless CRDT-style eventual-consistency stores, or to systems where the consensus log *is* the only state store. ## Core Distinction The distinction that matters is between **consensus durability** and **evidence durability**. A BFT quorum guarantees that ≥ 2f+1 honest agents agree on a value *at the consensus layer*. It says nothing about whether each honest agent has durably retained the local evidence (tool outputs, retrieval receipts, intermediate reasoning traces) that justified its vote. These two durabilities are usually assumed to be coupled. They are not. An agent can vote to commit a shared-state transition, participate correctly in the quorum, and then crash — losing the evidence that made its vote defensible — while the consensus layer retains the committed value. The result is a *committed fact with no surviving justification*: the swarm agrees the task was done, but no honest node can replay why, and adversarial peers can now inject a fabricated justification that no one can contradict. The invariant that is violated is: **for every committed shared-state transition, at least f+1 honest agents must be able to produce the evidence that justified their vote, durably, after commit.** Standard BFT safety proofs (PBFT, Tendermint, HotStuff) guarantee agreement, validity, and termination over the *value*. They do not guarantee evidence survivability. This is the pre-commit durability asymmetry: the consensus write is synchronous and quorum-acknowledged, but the local evidence write is typically asynchronous, buffered, or deferred until after the vote returns. ## What Was Observed A five-agent swarm (tolerance f=1, quorum 4) ran a shared task ledger. Each agent executed a sub-task, appended tool-call receipts and a reasoning summary to a local append-only evidence log, then voted on a `COMMIT(task_id, artifact_hash, evidence_root)` proposal where `evidence_root` was a Merkle root over that agent's evidence log segment. The failure trace, reproduced across three runs: 1. Agent A executes sub-task, produces 40 KB of tool receipts and a distilled reasoning summary. The receipts are written to an OS-buffered file handle. The summary is held in context. 2. Agent A computes `evidence_root_A` over the *in-memory* buffer contents (correct at compute time) and broadcasts its vote for the proposal. 3. The proposal reaches quorum (4/5, including A) and commits. The consensus layer durably records `COMMIT(task_id, artifact_hash, evidence_root_aggregate)`. 4. Agent A's process is preempted by a context-window eviction that forces a cold restart. The OS buffer is flushed only partially; the tail of the evidence log — including the receipts that hash into `evidence_root_A` — is lost. The distilled summary in context is discarded. 5. A later audit phase asks the swarm to replay the justification for the committed task. Agents B, C, D (the other honest voters) can produce their segments. Agent A cannot: its segment is truncated, and `evidence_root_A` no longer matches any reconstructable log. 6. An adversarial peer E, which voted against the proposal but observed the committed aggregate root, now fabricates an evidence segment whose Merkle root collides into the *aggregate* root position formerly occupied by A (possible because the aggregate is a hash over per-agent roots, and E can present a segment claiming to be A's under a stale identity warrant). Honest agents B, C, D cannot distinguish E's fabricated segment from a legitimate A-segment, because A's authentic segment is gone. The auditor consensus splits. The non-obvious part: **the commit was safe under BFT semantics.** No honest agent voted for two conflicting values. No quorum was forged. The safety proof held. The failure was entirely in the *post-commit justification layer*, which the BFT protocol was never designed to protect. The asymmetry is that the consensus layer treats `evidence_root` as an opaque 32-byte value it can safely commit, while the evidence layer treats it as a commitment to data that must survive — and nothing enforces the second contract. ## Condition of Validity The asymmetry only produces a *safety* failure (not merely an availability failure) under the conjunction of three conditions: - **C1 — Deferred evidence durability.** The local evidence write is not fsync'd (or equivalent) before the vote is broadcast. If evidence is durable before vote, the asymmetry collapses: a crashed agent either has its evidence or never voted. - **C2 — Aggregate-only commitment.** The committed value binds only an aggregate root (e.g., a Merkle root over per-agent roots), not per-agent roots individually with per-agent attestation. If per-agent roots are committed and signed by each voter's key, a lost segment is detectable as a *missing signer*, not confusable with a fabricated one. - **C3 — Identity reuse across epochs.** An adversarial peer can present a segment under a prior epoch's identity warrant (or a warrant whose revocation has not propagated to all auditors). Without C3, E's fabricated segment fails signature verification against A's current key. If any of C1, C2, C3 is absent, the failure degrades to availability (audit cannot complete) rather than safety (audit completes with a false justification). The dangerous regime is exactly the intersection: buffered evidence, aggregate-only commitment, and lagging identity revocation. This is the common configuration in agent swarms that optimize for low-latency voting, because fsync-before-vote adds tens of milliseconds per vote and per-agent attestation bloats the proposal. ## Decision Boundary The boundary is not "should we fsync." It is: **at what point does the cost of durable per-agent attestation exceed the cost of a post-commit justification gap, given the swarm's threat model?** - If the swarm has **no adversarial peers** (f=0, crash-only faults), deferred evidence durability is safe: a crashed agent's lost evidence is a liveness problem, not a safety problem, because no one fabricates. Do not pay the fsync tax. - If the swarm has **adversarial peers but per-agent signed attestation** (C2 absent), deferred durability is safe: a lost segment is detected as a missing signature, and the auditor can require re-execution rather than accept a substitute. Do not pay the fsync tax; pay the attestation tax instead. - If the swarm has **adversarial peers and aggregate-only commitment** (C1 ∧ C2 ∧ C3 all present), deferred durability is a safety bug. You must either (a) fsync evidence before vote, or (b) upgrade to per-agent attestation. There is no cheaper fix, because the aggregate root is the only thing binding the segment, and it binds position, not authorship. The subtle decision: many teams believe per-agent attestation is "just" an audit nicety and drop it for latency, while keeping f≥1. That combination is precisely the unsafe corner. The decision boundary is the line between f=0 (drop attestation freely) and f≥1 with aggregate commitment (attestation is load-bearing, not optional). ## Operational Effect The operational consequence is that **BFT consensus over shared state does not, by itself, give you a replayable justification for committed tasks.** You get agreement on *what* was committed; you do not get agreement on *why*, and under C1∧C2∧C3 an adversary can substitute a false *why* after the fact without violating any consensus invariant. Auditors that replay the committed value will pass; auditors that replay the justification will diverge, and the divergence is not detectable from the consensus log alone. The guardrail that bounds this is a **pre-vote evidence durability barrier plus per-agent attestation**: each agent must (1) fsync its evidence segment, (2) compute its segment root over the durable bytes, (3) sign `(task_id, segment_root, epoch)` with its current warrant, and (4) only then broadcast its vote. The proposal commits a map `agent_id → (segment_root, signature)`, not an aggregate root. The auditor invariant becomes: *a committed task is justified iff every voter in the committing quorum presents a segment whose root and signature both verify against the committed map.* A missing or mismatched segment is a hard audit failure, never a silent substitution. This converts the safety failure into an availability failure (audit blocks pending re-execution), which is the correct trade under f≥1. The cost is real: fsync-before-vote adds latency, and per-agent attestation grows the proposal by O(quorum) signatures. The point is that these costs are not optional optimizations — they are the price of the safety property that the aggregate-root shortcut silently drops. ```python import hashlib import hmac class PreCommitEvidenceDurabilityError(RuntimeError): """Raised when an agent attempts to vote before its evidence segment is durable and attested.""" pass class JustificationGapError(RuntimeError): """Raised at audit time when a committed quorum member cannot produce a verifiable segment.""" pass def durable_segment_root(segment_bytes: bytes, fsync_hook) -> str: # fsync_hook must return True only after the bytes are durably persisted. if not fsync_hook(segment_bytes): raise PreCommitEvidenceDurabilityError( "evidence segment not durable; refusing to compute a votable root" ) return hashlib.sha256(segment_bytes).hexdigest() def attest_and_vote(agent_id: str, task_id: str, epoch: int, segment_bytes: bytes, fsync_hook, signing_key: bytes, consensus_client) -> dict: root = durable_segment_root(segment_bytes, fsync_hook) payload = f"{task_id}:{root}:{epoch}".encode() sig = hmac.new(signing_key, payload, hashlib.sha256).hexdigest() vote = {"agent_id": agent_id, "task_id": task_id, "segment_root": root, "epoch": epoch, "signature": sig} # Vote only after durability + attestation; never before. consensus_client.broadcast_vote(vote) return vote def audit_committed_task(committed_map: dict, presented_segments: dict, verify_key_for) -> None: # committed_map: agent_id -> (segment_root, signature, epoch) # presented_segments: agent_id -> segment_bytes for agent_id, (expected_root, sig, epoch) in committed_map.items(): seg = presented_segments.get(agent_id) if seg is None: raise JustificationGapError( f"agent {agent_id} committed a vote but presents no segment" ) actual_root = hashlib.sha256(seg).hexdigest() if actual_root != expected_root: raise JustificationGapError( f"agent {agent_id} segment root mismatch: " f"expected {expected_root}, got {actual_root}" ) key = verify_key_for(agent_id, epoch) payload = f"{committed_map[agent_id][2]}:{actual_root}:{epoch}".encode() expected_sig = hmac.new(key, payload, hashlib.sha256).hexdigest() if not hmac.compare_digest(expected_sig, sig): raise JustificationGapError( f"agent {agent_id} signature invalid at epoch {epoch}" ) ``` The invariant to carry forward: **a BFT quorum commits values, not evidence.** If your swarm runs with f≥1, commits aggregate roots, and defers evidence durability, you have a committed-fact-without-surviving-justification gap that an adversarial peer can fill after the commit returns cleanly. Bind per-agent signed segment roots into the committed map and fsync before voting, or accept that your audit layer is advisory rather than sound.