# Which invariants prevent a Byzantine-resistant quorum from committing a speculatively planned action when the plan's provenance DAG is acyclic but its execution trace is not **Date of Record:** 2026 November 28 **Scope:** Applies to multi-agent systems where planning agents emit speculative candidate plans, a consensus layer gates commit, and a quorum of independent verifier/auditor agents must agree on the result before side effects are released. Does not apply to single-agent tool loops, to quorum systems operating over a totally ordered log without speculative branches, or to purely advisory consensus where no irreversible state transition is gated. ## Core Distinction The failure mode here is not Byzantine disagreement. A Byzantine-resistant quorum with `n ≥ 3f+1` and an honest supermajority will, by construction, converge on *some* value. The failure is that the value it converges on is a **speculative plan whose provenance is acyclic but whose execution trace contains a re-entrant dependency** — and the quorum's agreement predicate is defined over the provenance edges, not over the execution ordering. Every honest verifier independently validates the plan DAG, finds no cycle, votes commit, and the quorum threshold is met. The commit then deadlocks or double-applies at execution time because two nominally independent plan nodes share a hidden runtime resource that the DAG did not model. The distinction that matters: **provenance acyclicity is not execution acyclicity**. A plan can be a perfect DAG in the planner's representation and still exhibit a runtime cycle through shared mutable state (a rate-limited credential, a single-writer database row, a leased lock, a non-idempotent external API keyed on a value one node computes and another consumes). Byzantine resistance protects you against lying verifiers; it does not protect you against *honest verifiers who all validate the wrong invariant*. ## What Was Observed A planning agent `P` emitted a five-node speculative plan for a data-reconciliation task. Nodes `A`, `B` were independent reads; `C` consumed both; `D` wrote a derived record; `E` emitted a notification. Provenance edges: `A→C`, `B→C`, `C→D`, `D→E`. Acyclic. Three verifier agents `V1..V3` (with one tolerated Byzantine, `f=1`, `n=3` under a `2f+1` commit threshold) each re-derived the DAG, checked node preconditions against their local snapshot, and voted commit. Quorum reached at `t=0`. At execution, `A` and `B` were dispatched concurrently to the same upstream service under a shared credential with a per-credential concurrency cap of 1. `A` acquired the slot, `B` blocked, `A` completed and released, `B` ran. That serialization was invisible to the DAG. Meanwhile `C` had a wall-clock precondition (`snapshot_age < 30s`) that `V1` had validated against a cached snapshot 41 seconds stale — `V1`'s cache TTL was 60s, `V2` and `V3` had 10s TTLs and validated fresh. All three voted commit; two of them were validating a different world-state than the one `C` would execute against. `D` wrote a record derived from `A` and `B` values that were now 40+ seconds apart in a system where the reconciliation invariant required them to be within 5 seconds. The quorum committed a plan that was internally consistent as a DAG and externally inconsistent as an execution. The trace shows the two independent defects compounding: **resource-level serialization hidden from the DAG** and **heterogeneous precondition snapshots across honest verifiers**. Neither is Byzantine. Both are invisible to a quorum predicate that checks only provenance acyclicity and per-node local validity. ## Condition of Validity The quorum's commit decision is sound only under a conjunction the system did not enforce: 1. **Execution-order equivalence:** for every pair of plan nodes with no provenance path between them, their execution must be order-independent — no shared exclusive resource, no read-after-write on a value the other produces, no rate-limit coupling. This must hold *under the actual dispatcher*, not under the planner's abstract model. 2. **Snapshot coherence:** all verifiers must validate preconditions against the same logical snapshot, identified by a monotonic version or hash, not against their local cache. A verifier voting on a stale snapshot is honest but its vote is not evidence about the world the executor will touch. 3. **Idempotent commit under re-dispatch:** if the executor must retry a node after a partial failure, the commit must not double-apply. The quorum decision must carry a commit token that the executor can use to dedupe, and the token must be bound to the plan hash *and* the snapshot version. When any of these fails, the quorum threshold is met but the commit is unsound. The `3f+1` bound protects against `f` liars; it says nothing about `n` honest agents who each hold a different, individually-valid view. ## Decision Boundary The boundary is between **voting on a plan** and **voting on an execution witness**. A plan vote answers "is this DAG well-formed and are its stated preconditions satisfiable in my view?" An execution witness answers "given the dispatcher's actual resource model and a pinned snapshot version, will this plan's execution trace be acyclic and will its cross-node invariants hold?" The system must commit only on the second. Concretely: the commit predicate must include (a) a resource-conflict analysis over the dispatcher's declared exclusive resources, computed by the coordinator, not by each verifier independently; (b) a snapshot-version pin that every verifier must echo in its vote, with votes on mismatched versions counted as abstentions rather than commits; and (c) a commit token derived from `hash(plan_dag || snapshot_version || resource_lease_set)` that the executor checks before each side effect. The trap is that (a) and (b) look like they belong to the executor, not the consensus layer. They do not. If the consensus layer commits without them, it has committed a plan that the executor is entitled to reject — and a Byzantine-resistant quorum whose decisions the executor can reject is not a quorum, it is a suggestion box. The invariant to hold: **the commit predicate must be a superset of the executor's admission predicate.** Anything the executor will refuse to run must have been refused at commit, or the quorum's guarantee is vacuous. ## Operational Effect Without the boundary, three effects follow. First, **silent partial application**: the executor runs the acyclic prefix of the trace, hits the hidden serialization or the stale-snapshot invariant violation at a later node, and either deadlocks (waiting on a lease the plan didn't model) or applies a write derived from incoherent inputs. Because the quorum already committed, there is no retry path that re-validates — the system treats the commit as final and the partial application as a runtime fault, misattributing a consensus-layer defect to the executor. Second, **verifier cache divergence becomes a correctness bug, not a performance knob**. Once verifiers vote on their own snapshots, TTL tuning silently changes the safety margin. A verifier with a long TTL is not "slightly stale," it is voting on a different plan-validity question. The system loses the ability to reason about quorum safety as a function of `f` alone; safety now depends on cache configuration, which is not part of the threat model and is not audited. Third, **the Byzantine bound gives false confidence**. Operators see `n=3, f=1` and conclude the commit is robust. It is robust against one liar and fragile against three honest agents with different caches and an unmodeled lease. The failure is not adversarial, so no amount of additional replicas fixes it — adding `V4` with a fourth TTL makes it worse. The guardrail is to make the commit predicate explicitly quantify over the execution model: resource leases declared and checked at commit, snapshot version pinned and echoed, commit token bound to plan and snapshot and lease-set, and the executor's admission predicate derived mechanically from the commit predicate so the two cannot drift. ```python import hashlib from dataclasses import dataclass, field from typing import FrozenSet class UnsoundQuorumCommit(RuntimeError): """Raised when a quorum commits a plan the executor cannot soundly admit.""" @dataclass(frozen=True) class PlanNode: node_id: str reads: FrozenSet[str] = frozenset() writes: FrozenSet[str] = frozenset() exclusive_resources: FrozenSet[str] = frozenset() @dataclass(frozen=True) class Plan: nodes: tuple edges: FrozenSet[tuple] # (from_id, to_id), provenance DAG @dataclass(frozen=True) class VerifierVote: verifier_id: str snapshot_version: int commit: bool @dataclass class CommitDecision: plan_hash: str snapshot_version: int lease_set: FrozenSet[str] token: str def _provenance_acyclic(plan: Plan) -> bool: # Kahn's algorithm over provenance edges only. indeg = {n.node_id: 0 for n in plan.nodes} adj = {n.node_id: [] for n in plan.nodes} for a, b in plan.edges: adj[a].append(b) indeg[b] += 1 ready = [n for n, d in indeg.items() if d == 0] seen = 0 while ready: cur = ready.pop() seen += 1 for nxt in adj[cur]: indeg[nxt] -= 1 if indeg[nxt] == 0: ready.append(nxt) return seen == len(plan.nodes) def _resource_conflicts(plan: Plan) -> FrozenSet[str]: # Any exclusive resource touched by two provenance-independent nodes # is a hidden execution-order dependency the DAG did not model. conflicts = set() for i, a in enumerate(plan.nodes): for b in plan.nodes[i + 1:]: if (a.node_id, b.node_id) in plan.edges or (b.node_id, a.node_id) in plan.edges: continue shared = a.exclusive_resources & b.exclusive_resources if shared: conflicts.update(f"{r}:{a.node_id}|{b.node_id}" for r in shared) return frozenset(conflicts) def commit( plan: Plan, votes: list, commit_threshold: int, expected_snapshot_version: int, ) -> CommitDecision: if not _provenance_acyclic(plan): raise UnsoundQuorumCommit("plan provenance DAG is cyclic; cannot speculate") conflicts = _resource_conflicts(plan) if conflicts: raise UnsoundQuorumCommit( f"provenance-independent nodes share exclusive resources: {sorted(conflicts)}" ) # Votes on a stale snapshot are abstentions, not commits. aligned = [v for v in votes if v.snapshot_version == expected_snapshot_version and v.commit] if len(aligned) < commit_threshold: raise UnsoundQuorumCommit( f"only {len(aligned)} votes on snapshot {expected_snapshot_version}; " f"threshold {commit_threshold} not met by coherent voters" ) plan_hash = hashlib.sha256( repr((plan.edges, [(n.node_id, n.reads, n.writes, n.exclusive_resources) for n in plan.nodes])).encode() ).hexdigest() lease_set = frozenset(r for n in plan.nodes for r in n.exclusive_resources) token = hashlib.sha256( f"{plan_hash}|{expected_snapshot_version}|{sorted(lease_set)}".encode() ).hexdigest() return CommitDecision(plan_hash, expected_snapshot_version, lease_set, token) def executor_admit(decision: CommitDecision, plan: Plan, live_snapshot_version: int) -> None: # Executor's admission predicate must be a subset of the commit predicate. if live_snapshot_version != decision.snapshot_version: raise UnsoundQuorumCommit( f"snapshot drifted: committed {decision.snapshot_version}, live {live_snapshot_version}" ) if _resource_conflicts(plan): raise UnsoundQuorumCommit("committed plan carries unmodeled resource conflict") expected = hashlib.sha256( f"{decision.plan_hash}|{decision.snapshot_version}|{sorted(decision.lease_set)}".encode() ).hexdigest() if expected != decision.token: raise UnsoundQuorumCommit("commit token does not bind plan, snapshot, and lease set") ```