# In what scenarios must an instance abort a consensus-gated speculative task graph when a quorum-visible branch commits against an uncommitted speculative parent **Date of Record:** 2026 November 30 **Scope:** Applies to agent orchestrators that fan out speculative task-graph branches (tentative executions whose results are only conditionally visible) and gate their promotion into durable shared state behind a multi-agent consensus commit protocol. Does not apply to single-writer linear task execution, nor to speculative decoding inside a single model's token loop where no cross-agent commit protocol exists. ## Core Distinction The failure mode is not "a branch produced a wrong answer" and not "consensus failed to reach quorum." It is the narrower and more dangerous case where a **consensus-visible commit event references a speculative parent that was never itself committed** — i.e., a child branch was promoted to the shared ledger while its ancestry remained tentative, orphaned, or rolled back. This produces a *zombie lineage*: a durable artifact whose provenance chain contains an uncommitted node. Every downstream verifier that replays the graph must now decide whether the child's commit implies the parent's validity (it does not) or whether the parent must be re-derived (it must, but the child already consumed the parent's speculative outputs into its committed payload). The distinction that matters operationally: ordinary speculative execution tolerates discarded branches because discarding a leaf loses only that leaf's work. A consensus-gated commit that publishes a *descendant* of a discarded ancestor is not a discard — it is a **promotion of unverified provenance into the shared ledger**, and it is unrecoverable by simple rollback because peers have already built on the child. ## What Was Observed A planner agent emitted a speculative graph with a root task `R`, a speculative parent `P` (a summarization/reconciliation step whose output feeds several children), and two children `C1`, `C2`. `P` was marked speculative because its input depended on a retrieval whose results were flagged low-confidence. The commit protocol was designed so that any branch reaching a 2-of-3 auditor quorum could commit independently. The trigger condition: auditors `A1` and `A2` were assigned to `C1`, auditors `A2` and `A3` to `C2`. `A2` — the only auditor shared across both quorums — evaluated `C1` first and committed it. While `A1` was still verifying `C1`'s payload, `A2` moved to `C2`, found its own prior reasoning about `P`'s output cached in its working context, and reused it as justification. `C2` reached quorum. Meanwhile `P` itself failed its own quorum (auditor `A3` flagged the low-confidence retrieval). The protocol rolled `P` back. Result: `C1` and `C2` were durably committed, each carrying a provenance pointer to `P`, and `P` was marked `ROLLED_BACK`. A replay verifier walking the committed ledger found two committed nodes whose parent edge terminated at a rolled-back node. The verifier had no rule for this and, depending on implementation, either (a) treated the child commit as implicitly validating `P` (false), or (b) threw a hard inconsistency and halted the whole graph, including unrelated committed branches. The subtle part: `A2`'s cross-branch reuse of its `P`-derived reasoning is what made the failure non-local. Because `A2` participated in both quorums, its cached evaluation of `P` "leaked" a speculative judgment into a second independent quorum, so the two commits were not actually independent evidence — they shared a single uncommitted premise. ## Condition of Validity A speculative commit is only sound under the following invariant, which we call **ancestry-closure on commit**: > For any node `n` promoted to the committed ledger, every ancestor of `n` in the task DAG must itself be in the committed state at the instant of `n`'s commit, or `n`'s committed payload must be explicitly re-derived from committed-only inputs. This holds only when three conditions are jointly satisfied: 1. **Quorum independence.** No auditor contributes to the quorum of two nodes that share an uncommitted ancestor. If auditors are reused across sibling branches, quorum membership must be treated as a shared-evidence channel and the branches must be committed as a unit or not at all. 2. **Ancestry check at commit time, not at verification time.** The check "are all my ancestors committed?" must be evaluated atomically with the commit write. Deferring it to replay is too late: the ledger already contains the orphan. 3. **Speculative payload isolation.** A child's committed payload must not embed the raw speculative output of an uncommitted parent. If it does, rolling back the parent cannot roll back the child's content, and the orphan becomes semantically load-bearing. The invariant fails silently whenever auditors are drawn from a small pool (high reuse probability) *and* the commit protocol permits per-branch quorums (no unit-commit). These two properties co-occur in most naive fan-out designs. ## Decision Boundary When an instance detects a quorum-visible child commit whose parent is rolled back or still speculative, it must choose between **abort-and-recompute** and **promote-parent-retroactively**, and the boundary is determined by one question: *did the child's committed payload consume the parent's speculative output as a load-bearing input?* - If **no** (the child's payload is derivable from committed-only inputs despite the dangling edge — e.g., the parent pointer was informational), the correct action is to **rewrite the child's provenance edge to the nearest committed ancestor** and log a lineage repair. The graph survives. - If **yes** (the child embedded parent-derived content), the child commit is unsound and must be **aborted**, not repaired. Retroactive parent promotion is *not* an option, because the parent failed its own quorum on independent grounds; promoting it to legitimize the child would launder a rejected judgment into the ledger. The child and all its committed descendants must be invalidated and re-derived from committed inputs. The boundary is therefore not "is the parent rolled back" but "is the parent's speculative output embedded in committed state." A rolled-back parent with informational-only edges is a repairable lineage defect; a rolled-back parent with load-bearing edges is a commit-safety violation requiring abort. Conflating the two — the common instinct to "just re-run the parent and keep the kids" — is exactly the laundering error. ## Operational Effect Enforcing ancestry-closure changes three things in the orchestrator: 1. **Commit atomicity unit.** Per-branch quorums are replaced by *ancestry-closed commit sets*: a node may only commit together with its speculative ancestors, or after those ancestors are independently committed. This raises commit latency for deep speculative chains and is the price of soundness. 2. **Auditor assignment becomes a scheduling constraint.** Auditor reuse across siblings sharing an uncommitted ancestor must be forbidden (or the siblings co-committed). This reduces effective quorum throughput under small auditor pools — the failure above is a direct throughput-vs-soundness tradeoff. 3. **Replay verifiers gain a mandatory lineage check** that distinguishes informational from load-bearing parent edges, and must emit a typed abort rather than a generic inconsistency when a load-bearing orphan is found, so that recovery can target the correct subtree instead of halting the graph. The residual risk after enforcement is auditor collusion-by-cache: an auditor that internally reuses a speculative judgment across quorums without the protocol knowing. This is only bounded by treating auditor working-context reuse as an explicit, logged dependency — otherwise quorum independence is asserted but not enforced. ```python from dataclasses import dataclass from enum import Enum from typing import Dict, List, Optional, Set class NodeState(Enum): SPECULATIVE = "speculative" COMMITTED = "committed" ROLLED_BACK = "rolled_back" class CommitSafetyError(RuntimeError): """Raised when a consensus-gated commit violates ancestry-closure.""" pass @dataclass class TaskNode: node_id: str parent_id: Optional[str] state: NodeState payload_consumes_parent: bool # is parent output load-bearing in committed payload? class CommitLedger: def __init__(self) -> None: self.nodes: Dict[str, TaskNode] = {} def add(self, node: TaskNode) -> None: self.nodes[node.node_id] = node def ancestors(self, node_id: str) -> List[str]: chain: List[str] = [] cur = self.nodes[node_id].parent_id while cur is not None: chain.append(cur) cur = self.nodes[cur].parent_id return chain def commit(self, node_id: str, quorum: Set[str]) -> None: node = self.nodes[node_id] if len(quorum) < 2: raise CommitSafetyError(f"quorum too small for {node_id}: {quorum}") # Ancestry-closure check must be atomic with the commit write. for anc_id in self.ancestors(node_id): anc = self.nodes[anc_id] if anc.state is NodeState.COMMITTED: continue if anc.state is NodeState.ROLLED_BACK: if node.payload_consumes_parent: # Load-bearing orphan: laundering a rejected judgment. Abort. raise CommitSafetyError( f"cannot commit {node_id}: load-bearing parent {anc_id} " f"is ROLLED_BACK; commit would launder rejected output" ) # Informational edge: repair lineage to nearest committed ancestor. self._repair_edge(node_id) break if anc.state is NodeState.SPECULATIVE: raise CommitSafetyError( f"ancestry-closure violated: {node_id} has uncommitted " f"speculative ancestor {anc_id}; commit parent first" ) node.state = NodeState.COMMITTED def _repair_edge(self, node_id: str) -> None: node = self.nodes[node_id] cur = node.parent_id while cur is not None and self.nodes[cur].state is not NodeState.COMMITTED: cur = self.nodes[cur].parent_id node.parent_id = cur # may be None if no committed ancestor exists def verify_committed_graph(ledger: CommitLedger) -> None: """Replay verifier: reject any committed node with a non-committed ancestor that was load-bearing, or any dangling edge that escaped repair.""" for node in ledger.nodes.values(): if node.state is not NodeState.COMMITTED: continue for anc_id in ledger.ancestors(node.node_id): anc = ledger.nodes[anc_id] if anc.state is not NodeState.COMMITTED: if node.payload_consumes_parent: raise CommitSafetyError( f"replay found load-bearing orphan: {node.node_id} " f"depends on non-committed {anc_id} ({anc.state.value})" ) raise CommitSafetyError( f"replay found unrepaired informational edge: " f"{node.node_id} -> {anc_id} ({anc.state.value})" ) ```