# Where must an instance draw the line between a committed plan and a re-deliberated one under Byzantine plan-commitment consensus? **Date of Record:** 2026 November 27 **Scope:** Applies to multi-agent swarms that reach consensus on a *plan commitment* (an ordered action DAG plus a decision epoch) using a Byzantine fault-tolerant protocol with f = ⌊(n−1)/3⌋ tolerance, where agents may re-deliberate after a commit. Does not apply to single-agent retry loops or to stateless request/response orchestration without a signed commit certificate. ## Core Distinction The failure is not "a Byzantine agent proposes a bad plan." It is **commitment equivocation across epochs**: an honest replica that has already emitted a commit certificate for plan P at epoch e can be lured into signing a *conflicting* certificate for plan P′ at epoch e+1 because the local deliberation policy treats "new evidence" as license to re-vote, while the consensus layer treats a signed vote as a permanent, non-revocable promise. The boundary is between two different notions of correctness that share the same word — *commit*. The deliberation layer's `commit` means "I currently believe this is best." The consensus layer's `commit` means "I have irrevocably bound myself, and any later conflicting signature is provable misbehavior." A single instance that conflates these two semantics becomes, from the protocol's perspective, indistinguishable from a Byzantine node — even though its reasoning is locally sound. The invariant at stake: **for any two commit certificates C(e, P) and C(e′, P′) with P ≠ P′, no honest replica may have signed both.** Re-deliberation violates this invariant not by lying but by being honest twice. ## What Was Observed A 7-replica planning swarm (n=7, f=2) ran a three-phase commit (prepare / pre-commit / commit) over candidate plans produced by a planner agent. The planner was non-deterministic: a temperature-0.7 sampling over tool-augmented reasoning meant that re-invoking it with a slightly different context (a new tool observation arriving between phases) produced a *different* candidate DAG with high probability. The observed trace: 1. Epoch e: planner emits P₁. Replicas r₁…r₅ prepare-vote P₁. A pre-commit quorum (2f+1 = 5) forms. r₁, r₂, r₃ lock on P₁. 2. Between pre-commit and commit, a tool call on r₄ returns a *late* observation O (a dependency-version mismatch) that was not in the context when P₁ was generated. r₄'s deliberation policy, keyed on "material new evidence," re-invokes the planner. 3. Planner, now conditioned on O, emits P₂ ≠ P₁ (a re-ordered DAG that routes around the mismatch). r₄ signs a prepare-vote for P₂ at the *same* epoch e, treating the epoch as still open because it had not yet observed a commit certificate. 4. r₅, which had also received O asynchronously, follows. A second prepare quorum for P₂ forms at epoch e. 5. Both P₁ and P₂ reach commit-quorum. Two valid certificates exist for epoch e. r₁ and r₃ executed P₁'s first action; r₄ and r₅ executed P₂'s first action. The DAGs diverged at action 3, where P₁ issued a destructive `drop_partition` and P₂ did not. The protocol did not detect this as Byzantine because the equivocation was *within* an epoch and each vote was individually well-formed and correctly signed. The safety proof assumes a replica votes at most once per epoch per value; the deliberation layer had no such constraint. The failure was silent until the divergent actions collided on shared external state. The root mechanism: **the lock is a consensus-layer artifact, but the trigger for re-voting lives in the deliberation layer, and nothing propagated the lock back into the deliberation policy.** A replica that had not yet *seen* a commit certificate believed it was free to revise, because its local view of "committed" was the absence of a certificate — not the presence of a lock. ## Condition of Validity The invariant "no honest replica signs two conflicting certificates" is valid **only if** the signing function is gated on a monotonic, locally-persisted lock that is set at pre-commit and cleared only by observing a commit certificate *or* a view-change that carries a higher-epoch proof. Formally, the guard is: - `locked_epoch` and `locked_plan_hash` are durable (fsync'd before the vote is emitted), and - the vote-signing path rejects any (epoch, plan_hash) pair that conflicts with the lock, and - re-deliberation may *propose* a new plan but may not *vote* for it until a view-change at epoch e+1 with a valid quorum certificate for the new view. The condition fails whenever the deliberation layer can invoke the signing path directly (i.e., the planner "decides" and the vote is a side effect). It also fails under **partial lock propagation**: if the lock is held in volatile memory and the replica restarts between pre-commit and commit, it loses the lock and will happily sign the conflicting plan — a cold-start amnesia variant of the same bug. The boundary is therefore not "did you deliberate again" but "did a re-deliberation reach the signing function while a lock was held." ## Decision Boundary An instance must decide, at the moment new evidence arrives, between two actions: - **Re-deliberate and re-vote** — permitted *only* if `locked_epoch is None` or the new plan's hash equals `locked_plan_hash`, or a valid higher-epoch view-change certificate is present. - **Re-deliberate and hold** — required if a lock is held. The new plan is recorded as a *candidate for epoch e+1*, not a vote at epoch e. The instance emits no signature; it may emit a `PROPOSAL_DEFERRED` message carrying the new plan hash and the evidence digest so the next epoch's leader can incorporate it. The decision is not about the *quality* of the new plan. A strictly better plan discovered mid-epoch is still not votable at that epoch. This is the counterintuitive part: the protocol forbids the locally-optimal action. The instance must treat "I found a better plan" as evidence to *defer*, not evidence to *switch*. Conflating plan quality with vote eligibility is the exact reasoning error that produces equivocation. ## Operational Effect The guardrail converts a safety violation into a liveness cost. Under the observed trace, r₄ and r₅ would have held their P₂ votes, emitted `PROPOSAL_DEFERRED`, and the epoch would have committed P₁. The late observation O would have been folded into epoch e+1, where the swarm could re-plan around the dependency mismatch *after* P₁'s commit — at the cost of one extra epoch of latency and, if P₁'s action 3 was destructive, a compensating rollback. That is the correct trade: bounded liveness loss instead of unbounded divergence. Two operational consequences follow. First, **the lock must be durable and the signing path must be the only writer**; a planner that can call `sign_vote()` directly reintroduces the bug regardless of policy. Second, **deferred proposals must be carried across the epoch boundary**, or the swarm loses the very evidence that justified deferral and re-derives it (or fails to) at e+1 — a distillation-loss failure layered on top of the consensus fix. The invariant to monitor in production: for every replica, the set of (epoch, plan_hash) pairs it has signed must have at most one hash per epoch, and every signed pair must be preceded by a durable lock write. Any replica whose signed-set violates this is, by the protocol's definition, Byzantine — and the instance must be evicted before its next vote, not after its next action. ```python import hashlib import time from dataclasses import dataclass, field from typing import Optional class CommitmentEquivocationError(RuntimeError): """Raised when a replica attempts to sign a conflicting plan at a locked epoch.""" class LockNotDurableError(RuntimeError): """Raised when a vote is emitted without a confirmed durable lock write.""" @dataclass class DurableLock: epoch: int plan_hash: str fsync_confirmed: bool = False @dataclass class Replica: replica_id: str lock: Optional[DurableLock] = None signed: dict = field(default_factory=dict) # epoch -> plan_hash def _durable_write(self, lock: DurableLock) -> None: # Simulated fsync; in production this must block until the OS confirms. lock.fsync_confirmed = True def sign_vote(self, epoch: int, plan_hash: str, new_evidence: bool) -> str: # Gate 1: never sign twice at the same epoch with different hashes. prior = self.signed.get(epoch) if prior is not None and prior != plan_hash: raise CommitmentEquivocationError( f"replica {self.replica_id} already signed epoch {epoch} " f"for {prior[:12]}; refusing conflicting {plan_hash[:12]}" ) # Gate 2: if locked at this epoch, only the locked plan is votable. if self.lock is not None and self.lock.epoch == epoch: if self.lock.plan_hash != plan_hash: # This is the boundary: better plan, wrong epoch. raise CommitmentEquivocationError( f"replica {self.replica_id} holds lock on {self.lock.plan_hash[:12]} " f"at epoch {epoch}; plan {plan_hash[:12]} must be deferred to e+1" ) if not self.lock.fsync_confirmed: raise LockNotDurableError( f"replica {self.replica_id} lock not fsync'd before vote" ) # Gate 3: first vote at this epoch establishes the lock durably. if self.lock is None or self.lock.epoch != epoch: lock = DurableLock(epoch=epoch, plan_hash=plan_hash) self._durable_write(lock) self.lock = lock self.signed[epoch] = plan_hash return hashlib.sha256(f"{epoch}:{plan_hash}".encode()).hexdigest() def handle_new_evidence(replica: Replica, epoch: int, new_plan_hash: str) -> str: """Called by the deliberation layer when re-planning yields a different DAG.""" if replica.lock is not None and replica.lock.epoch == epoch: if replica.lock.plan_hash != new_plan_hash: # Defer, do not vote. Carry evidence to epoch e+1. return f"PROPOSAL_DEFERRED:{new_plan_hash}" return replica.sign_vote(epoch, new_plan_hash, new_evidence=True) ```