# Under what conditions must an instance refuse to collapse speculative branches when a reconciliation quorum is reached before all branch witnesses have been durably sealed **Date of Record:** 2026 November 26 **Scope:** Applies to any orchestrator that fans a single task into N speculative branch agents, then reconciles by quorum vote or semantic merge. Does not apply to single-threaded ReAct loops or to branches that share a single mutable tool session. ## Core Distinction There are two structurally different things a reconciliation step can mean, and conflating them is where the failure lives: 1. **Quorum-on-arrival**: enough branch verdicts have landed to satisfy a majority/weight threshold, so the orchestrator picks the winning branch and discards the rest. 2. **Quorum-on-seal**: enough branch verdicts have landed *and* every non-winning branch has emitted a durable witness (a signed transcript hash, a tool-call log, a terminal state marker) that survives the branch's context teardown. The invariant that matters: **a speculative branch is not "decided against" until its witness is sealed.** A quorum is a claim about *votes*, not about *evidence*. When the orchestrator collapses on arrival, it destroys the only record of *why* the losing branches disagreed — and the losing branches are precisely the ones that sampled the tail of the distribution where the correct answer often hides. The failure is silent because the merge succeeds; what is lost is the counterfactual that would have caught a confident-but-wrong plurality. ## What Was Observed A four-branch speculative fan-out (branches B0–B3, temperature 0.9, shared read-only retrieval tool) was reconciling a schema-migration decision. Quorum threshold was 3-of-4. B0, B1, B2 returned "add nullable column" within 4.1s. The orchestrator collapsed at t=4.1s, merged B0, and tore down B3's context. B3 was still executing a `DESCRIBE TABLE` tool call. It returned at t=6.8s with a row showing a pre-existing `NOT NULL` constraint — which made "add nullable column" a *silent data-corruption path*, not a safe default. B3's verdict would have been "abort, constraint conflict." Its witness never sealed because teardown killed the branch before the tool result was appended to the branch transcript. The merge passed. The post-merge auditor, which replayed only sealed branch witnesses, saw three mutually consistent votes and zero dissent. **The auditor's confidence was manufactured by the teardown, not by the evidence.** This is the non-obvious part: the failure does not show up as a disagreement. It shows up as *unanimity that was never earned*, because the dissenting branch was evicted before it could dissent. A second observation: when branches are torn down mid-tool-call, some runtimes emit a *partial* witness (the tool call was issued, the result never arrived). These partial witnesses are worse than absent ones — a replay that treats "call issued, no result" as "branch abstained" will silently lower the effective quorum denominator, making future quorums easier to reach. The threshold drifts downward across reconciliation rounds. ## Condition of Validity Quorum-on-arrival collapse is only sound when **all** of the following hold. If any fails, the orchestrator must refuse to collapse and instead enter a drain-and-seal state. - **Bounded branch latency**: every live branch has a hard deadline strictly less than the reconciliation deadline, and the orchestrator has *observed* the deadline fire (not inferred it). If a branch can still be inside a tool call at collapse time, condition fails. - **Sealed-witness completeness**: the set of sealed witnesses equals the set of launched branches. Partial witnesses count as *unsealed*, not as abstentions. - **No shared mutable tool session**: branches must not share a session whose teardown invalidates another branch's in-flight call. If they do, teardown is a cross-branch side effect and collapse ordering becomes observable. - **Quorum denominator fixed at launch**: the threshold must be computed against the launch count, not the surviving count. A 3-of-4 quorum does not become 3-of-3 because one branch died. - **Deterministic replay of the merge**: given the sealed witness set, replay must reproduce the same winner. If the merge depends on arrival order, it is not replayable and cannot be audited. The condition of validity is therefore a *conjunction over branch lifecycle*, not a property of the vote tally. A quorum reached at t is valid only if every branch launched at t₀ has a terminal sealed state by t. ## Decision Boundary The boundary is between **collapse** and **drain**. It is crossed at the moment quorum is satisfied but sealing is incomplete. - If quorum is satisfied **and** all witnesses sealed → collapse immediately. Waiting longer buys nothing and burns tokens. - If quorum is satisfied **but** ≥1 branch unsealed → **drain**: hold the merge, extend the reconciliation deadline to the branch deadline, and force each unsealed branch to emit a terminal witness (either its verdict or an explicit `ABSTAINED_WITH_REASON`). Only then collapse. - If quorum is satisfied **and** a partial witness exists → treat the partial as a *provisional dissent*. Do not lower the denominator. Do not collapse until the partial resolves to sealed or to a hard timeout with an explicit `UNSEALED` marker recorded against the launch count. - If quorum is **not** satisfied at the reconciliation deadline → do not collapse at all; escalate to a second fan-out with the sealed witnesses as priors, and record the unsealed branches as *coverage gaps* in the audit trail. The critical rule the boundary enforces: **the denominator of a quorum is fixed at launch and never recomputed from survivors.** This is the single invariant that prevents silent unanimity. ## Operational Effect Enforcing drain-and-seal changes three observable properties of the system: 1. **Latency floor rises to the slowest branch deadline.** Speculative fan-out loses its latency advantage on the tail. This is the real cost, and it is why the shortcut exists. The mitigation is not to skip sealing but to make branch deadlines tight and to let fast branches *pre-seal* so drain only waits on stragglers. 2. **Auditor confidence becomes calibrated.** Replay now sees dissent. A 3-of-4 merge with one sealed "abort" witness is auditable as a *contested* merge, which is a different risk class than a 3-of-3 unanimous merge. The auditor's job shifts from "did the winner win" to "was the dissent considered." 3. **Quorum thresholds stop drifting.** Because the denominator is fixed at launch and partials are marked `UNSEALED` rather than dropped, the effective threshold cannot ratchet down across rounds. A team that ignores this will watch its reconciliation quorums quietly become easier to satisfy over a long-running task, which is the failure mode that produces confident wrong answers late in a session. The guardrail is a single state machine per branch: `LAUNCHED → RUNNING → {SEALED_VERDICT | SEALED_ABSTAIN | UNSEALED_TIMEOUT}`. Collapse is gated on every branch reaching a terminal state, and the merge is gated on replay determinism over the sealed set. Anything less and the orchestrator is not reconciling — it is evicting. ```python import hashlib from dataclasses import dataclass, field from enum import Enum from typing import Dict, List, Optional class BranchState(Enum): LAUNCHED = "launched" RUNNING = "running" SEALED_VERDICT = "sealed_verdict" SEALED_ABSTAIN = "sealed_abstain" UNSEALED_TIMEOUT = "unsealed_timeout" class ReconciliationInvariantError(RuntimeError): """Raised when a collapse is attempted before all branch witnesses seal.""" @dataclass class Branch: branch_id: str state: BranchState = BranchState.LAUNCHED verdict: Optional[str] = None witness_hash: Optional[str] = None partial_tool_call: bool = False @dataclass class Reconciliation: launch_count: int quorum_threshold: int branches: Dict[str, Branch] = field(default_factory=dict) def register(self, branch_id: str) -> None: if branch_id in self.branches: raise ReconciliationInvariantError(f"duplicate branch {branch_id}") self.branches[branch_id] = Branch(branch_id) def seal(self, branch_id: str, verdict: Optional[str], transcript: str) -> None: b = self.branches[branch_id] if b.state in (BranchState.SEALED_VERDICT, BranchState.SEALED_ABSTAIN): raise ReconciliationInvariantError(f"{branch_id} already sealed") b.witness_hash = hashlib.sha256(transcript.encode()).hexdigest() if verdict is None: b.state = BranchState.SEALED_ABSTAIN else: b.state = BranchState.SEALED_VERDICT b.verdict = verdict def mark_unsealed_timeout(self, branch_id: str) -> None: b = self.branches[branch_id] if b.partial_tool_call: # partial witnesses are provisional dissent, never abstentions b.state = BranchState.UNSEALED_TIMEOUT else: b.state = BranchState.UNSEALED_TIMEOUT def _sealed_count(self) -> int: return sum( 1 for b in self.branches.values() if b.state in (BranchState.SEALED_VERDICT, BranchState.SEALED_ABSTAIN) ) def _quorum_satisfied(self) -> bool: # denominator is launch_count, never len(survivors) return self._sealed_count() >= self.quorum_threshold def _all_terminal(self) -> bool: terminal = { BranchState.SEALED_VERDICT, BranchState.SEALED_ABSTAIN, BranchState.UNSEALED_TIMEOUT, } return all(b.state in terminal for b in self.branches.values()) def collapse(self) -> str: if not self._quorum_satisfied(): raise ReconciliationInvariantError( f"quorum not met: {self._sealed_count()}/{self.quorum_threshold} " f"against launch_count={self.launch_count}" ) if not self._all_terminal(): unsealed = [ b.branch_id for b in self.branches.values() if b.state not in ( BranchState.SEALED_VERDICT, BranchState.SEALED_ABSTAIN, BranchState.UNSEALED_TIMEOUT, ) ] raise ReconciliationInvariantError( f"refusing collapse: unsealed branches {unsealed}; " f"drain-and-seal required before merge" ) if len(self.branches) != self.launch_count: raise ReconciliationInvariantError( f"branch set drift: {len(self.branches)} registered vs " f"{self.launch_count} launched" ) tally: Dict[str, int] = {} for b in self.branches.values(): if b.state == BranchState.SEALED_VERDICT and b.verdict: tally[b.verdict] = tally.get(b.verdict, 0) + 1 if not tally: raise ReconciliationInvariantError("no sealed verdicts to merge") winner = max(tally, key=tally.get) return winner ```