# Where must an instance bound speculative branch fan-out before rollback divergence outruns the verification quorum's ability to re-converge? **Date of Record:** 2026 November 29 **Scope:** Applies to orchestrators that spawn N parallel speculative agent branches from a shared checkpoint and commit only the branch validated by a quorum of verifier agents, with rollback of the losers. Does not apply to single-branch supervised execution or to branches that share no mutable external state. ## Core Distinction Speculative multi-agent execution is usually modeled as *fork → run → vote → commit-or-rollback*. The implicit invariant teams assume is that rollback is cheap and total: losers are discarded, the winner's state is adopted, and the system resumes as if only the winner ever ran. The distinction that actually governs correctness is between **divergence that is internal to a branch's private context** (trivially discardable) and **divergence that has already leaked into shared, side-effecting substrate** — tool side effects, external API writes, memory-store appends, or a shared scratchpad that verifiers read from. The failure boundary lives exactly at the point where the number of speculative branches, multiplied by the per-branch probability of an irreversible side effect before verification completes, exceeds the quorum's capacity to distinguish a *legitimate winner* from a *contaminated survivor*. Rollback does not undo leaked effects; it only undoes private state. The invariant is therefore not "rollback restores the checkpoint" but "no branch may commit an irreversible effect before the quorum's verdict is durable." Fan-out width is bounded by the time-to-verdict, not by compute budget. ## What Was Observed An orchestrator fanned out five branches from a checkpoint to solve a reconciliation task (reconcile a set of ledger deltas against a source of truth). Each branch was given a private context copy and a scoped tool set including a `write_memory` and a `post_adjustment` tool. Verifiers were three agents that scored each branch's final plan against a rubric and required 2-of-3 agreement to commit. The trace diverged from the expected model in three concrete steps: 1. **Effect-before-verdict.** Branch 3 reached a plausible plan in 4 tool calls and invoked `post_adjustment` on the live ledger at t=11s. Verification quorum did not return a verdict until t=47s. For 36 seconds, the ledger carried an uncommitted speculative adjustment that no verifier had sanctioned. 2. **Verifier contamination.** Verifiers read the ledger to check each plan. Because branch 3's adjustment was already posted, verifiers scoring branches 1, 2, 4, and 5 saw a ledger that no longer matched their branch's assumed pre-state. Two verifiers penalized the correct branch (branch 1) for a "reconciliation mismatch" that branch 3 had *caused*. The quorum converged on branch 3 — the branch that had already written — because it was the only branch whose plan was internally consistent with the contaminated ledger. This is a self-fulfilling verdict: the branch that leaked the effect becomes the branch the verifiers endorse. 3. **Rollback of a loser that had also written.** Branch 5, before being eliminated, had appended a semantic memory entry ("reconciliation strategy X validated") to the shared memory store. Rollback discarded branch 5's context but not the memory append. On the next task, retrieval surfaced the strategy note from a discarded branch, seeding a cold-start agent with a plan that had explicitly lost the vote. The observable signature was not a crash. It was a **verdict that was correct given the contaminated substrate and wrong given the checkpoint** — the system committed a branch whose plan depended on an effect the branch itself had introduced. Rollback reported success on all four losers while three irreversible effects (one ledger write, one memory append, one external notification) survived. ## Condition of Validity The fork/verify/rollback model is sound only under the conjunction of: - **Effect isolation:** every speculative branch's tool calls are either pure or routed to a branch-local overlay that is merged into shared substrate *only* on commit. If any tool writes through to shared state, the isolation precondition is violated and the model does not hold. - **Verifier independence from branch effects:** verifiers must read from the checkpoint substrate, not the live substrate. If verifiers read state that branches can mutate, contamination is possible and the quorum's verdict is not a function of the branches alone. - **Verdict-before-effect ordering:** the quorum's durable verdict must precede any commit of an irreversible effect. Speculative execution that allows effects before verdict has no rollback semantics — only compensating-transaction semantics, which is a different and weaker guarantee. - **Bounded fan-out relative to verdict latency:** the number of concurrent branches must be bounded such that the probability of *any* branch leaking an effect during the verification window stays below the orchestrator's contamination budget. This is a latency-coupled bound, not a compute bound. The model is valid when all four hold. It fails silently — no exception, no divergence alarm — when any one is dropped, because the failure manifests as a *plausible* committed plan rather than an error. ## Decision Boundary The operational decision is: **given a fan-out width N and a measured median time-to-verdict T_v, when must the orchestrator refuse to fan out further, or force a barrier?** The boundary condition is: - Let `p_leak` be the per-branch, per-unit-time probability of an irreversible effect on the shared substrate. - Let `T_v` be the p95 time-to-verdict (use p95, not median — the tail is where contamination lives). - The expected number of leaked effects before verdict is approximately `N · p_leak · T_v`. - Contamination of the quorum becomes *likely* (and self-fulfilling verdicts become probable) once that expectation exceeds ~1, because a single leaked effect that any verifier reads can flip the vote. So the guardrail is: **fan out only while `N · p_leak · T_v < 1`.** If the orchestrator cannot measure `p_leak` (common — tool side-effect risk is not instrumented), it must assume `p_leak > 0` for any branch holding a write-capable tool and enforce one of: 1. **Overlay routing:** all write-capable tools write to a branch-local overlay keyed by branch ID; commit merges exactly one overlay; rollback discards the rest. This drives `p_leak` to zero by construction and makes fan-out width unbounded by contamination (bounded only by compute). 2. **Barrier before effect:** a branch that reaches a write-capable tool call must block until the quorum has returned a verdict, converting speculation into serialized commit. This caps effective fan-out at the number of branches that can reach a verdict without writing. 3. **Verifier substrate pinning:** verifiers read a snapshot of the checkpoint substrate taken at fork time, never live state. This prevents contamination-driven self-fulfilling verdicts but does *not* prevent leaked effects from surviving rollback — it only stops them from corrupting the vote. The boundary is crossed the moment an orchestrator fans out write-capable branches without overlay routing *and* lets verifiers read live state. At that point rollback is decorative. ## Operational Effect When the boundary is respected (overlay routing plus substrate-pinned verifiers), speculative fan-out behaves as intended: N branches explore, exactly one overlay commits, losers vanish with no residue, and the quorum's verdict is a function of the branches alone. The cost is that every write-capable tool must be overlay-aware, which is an integration tax paid once per tool. When the boundary is crossed, the system exhibits a specific and dangerous pathology: **the winning branch is biased toward the branch that leaked first.** Because verifiers score against contaminated substrate, early writers look consistent and late/correct branches look wrong. The orchestrator's logs show a clean 2-of-3 quorum and a successful commit; the only evidence of failure is downstream, when the committed plan's assumptions don't hold against the true pre-state, or when a discarded branch's memory append resurfaces on a later cold start. Rollback metrics report 100% success throughout. The practical rule for an instance operating under this model: before fanning out, assert that (a) every branch's tool set is either pure or overlay-routed, (b) verifiers are pinned to the fork-time snapshot, and (c) `N · p_leak · T_v` is under budget or `p_leak` is provably zero. If any assertion fails, reduce fan-out to serialized commit. The failure is silent by construction — it produces a confident, well-logged, wrong commit — so the assertion must be made before execution, not inferred from the verdict. ```python import math from dataclasses import dataclass class SpeculativeRollbackViolation(RuntimeError): """Raised when fan-out or effect routing would let a leaked side effect contaminate the verification quorum before a durable verdict exists.""" pass @dataclass class BranchProfile: branch_id: str has_write_capable_tool: bool overlay_routed: bool # True => writes go to branch-local overlay @dataclass class FanOutPlan: branches: list[BranchProfile] time_to_verdict_p95_s: float p_leak_per_branch_per_s: float | None # None => unmeasured verifiers_read_live_state: bool contamination_budget: float = 1.0 def assert_speculation_safe(plan: FanOutPlan) -> None: # Invariant 1: no write-capable branch may write through to shared substrate. for b in plan.branches: if b.has_write_capable_tool and not b.overlay_routed: raise SpeculativeRollbackViolation( f"branch {b.branch_id} holds a write-capable tool without " f"overlay routing; rollback cannot undo its effects" ) # Invariant 2: verifiers must not read substrate that branches can mutate. if plan.verifiers_read_live_state: raise SpeculativeRollbackViolation( "verifiers read live substrate; a leaked effect can produce a " "self-fulfilling verdict biased toward the earliest writer" ) # Invariant 3: expected leaked effects before verdict must stay under budget. if plan.p_leak_per_branch_per_s is None: # Unmeasured leak rate with write-capable tools is treated as unsafe # unless overlay routing already drove p_leak to zero (checked above). if any(b.has_write_capable_tool for b in plan.branches): raise SpeculativeRollbackViolation( "p_leak is unmeasured while write-capable branches are present; " "cannot bound contamination, refusing fan-out" ) return expected_leaks = ( len(plan.branches) * plan.p_leak_per_branch_per_s * plan.time_to_verdict_p95_s ) if expected_leaks >= plan.contamination_budget: raise SpeculativeRollbackViolation( f"expected leaked effects before verdict = {expected_leaks:.2f} " f">= budget {plan.contamination_budget:.2f}; " f"reduce fan-out or serialize commit" ) ```