# What structural signals indicate a speculative fan-out branch has silently converted a cost-pruning decision into a convergence failure **Date of Record:** 2026 November 24 **Scope:** Applies to orchestrators that issue N parallel speculative branches against a shared task, then prune by predicted cost/utility before merging outputs. Does not apply to strictly sequential agents, or to fan-out where branches are fully isolated and never merged into a single answer. ## Core Distinction The distinction that matters is between a branch that was *pruned* and a branch that was *abandoned mid-flight but still counted as converged*. A cost-aware scheduler prunes branches by a predicted-utility score computed at dispatch time. The invariant it assumes is: pruning a branch removes it from the convergence set. The failure is that pruning removes the branch from the *budget ledger* but not from the *merge set* — the branch keeps executing (or its partial output keeps propagating) while the scheduler has already decided it doesn't exist. The result is a merge that converges on N-k branches while the convergence controller believes it converged on N. This is not a crash. Every branch returns status OK. The merge succeeds. The failure is only visible as a *structural* signature: the surviving branches' agreement rate is suspiciously high, the merged answer cites fewer distinct evidence paths than the task requires, and the cost ledger's branch count diverges from the merge's input arity. ## What Was Observed A fan-out of 8 speculative branches on a research-synthesis task. Predicted utility at dispatch: branches 3, 5, and 7 scored below the prune threshold (0.31, 0.28, 0.34 against a cutoff of 0.40). The scheduler marked them PRUNED and removed them from the active set. But pruning was implemented as a *flag*, not a *cancellation* — the branch coroutines were already past their first tool call and had no cancellation checkpoint. They ran to completion. The convergence controller, meanwhile, computed a quorum over the *active* set (5 branches). It reached 4/5 agreement on a claim. It declared convergence and merged. The three "pruned" branches returned 12 seconds later with dissenting evidence — one of them had retrieved a source that directly contradicted the quorum claim. The merge had already shipped. The dissenting branches' outputs were written to a dead-letter queue and never reconciled. The structural signal that would have caught this: **the merge's input arity (5) was less than the fan-out arity (8) minus the count of branches whose status was terminal-failed (0).** That gap — pruned-but-not-cancelled — is the fingerprint. ## Condition of Validity The guardrail is only valid when pruning is defined as a *cancellation* with a verified terminal state, not a *flag*. Concretely, the invariant is: ``` merge_input_arity == fanout_arity - terminal_failed - terminal_cancelled ``` where `terminal_cancelled` counts only branches that have acknowledged cancellation (returned a cancellation token, not merely been flagged). If a branch is flagged PRUNED but its coroutine has not acknowledged, it is in a *zombie* state: excluded from quorum, still emitting output. The condition of validity for the convergence check is that the quorum denominator equals the *acknowledged-active* set, and that no branch transitions from active to pruned after the quorum has been computed but before the merge is committed. That requires a two-phase convergence: **freeze** the active set, then **drain** any in-flight pruned branches to a terminal state, then **merge**. Skipping the drain step is the exact mechanism that produces the silent convergence failure. ## Decision Boundary The boundary is whether the scheduler treats pruning as *advisory* (flag) or *authoritative* (cancel-with-ack). Advisory pruning is safe only if the merge is recomputed after all branches reach terminal state — i.e., no early convergence. Authoritative pruning is safe with early convergence only if cancellation is synchronous and acknowledged. The dangerous middle ground — advisory pruning plus early convergence — is where every observed instance of this failure lives. The decision rule: if any branch can be pruned after the quorum window opens, the scheduler MUST either (a) block merge until all branches are terminal, or (b) require cancellation acknowledgement before the pruned branch is removed from the quorum denominator. There is no safe third option. The cost savings from early convergence are real but bounded; the cost of a silent convergence failure is unbounded because it ships a wrong answer with a green status. ## Operational Effect Operationally, this failure corrupts the convergence controller's own confidence signal. The controller reports high agreement (4/5) precisely *because* the dissenting branches were excluded — the pruning that was supposed to save cost also manufactured the consensus. Downstream, the merged answer carries a convergence certificate that is structurally valid but evidentially hollow: it attests to agreement among a set that was selected for agreement. The remediation is a drain barrier: before committing a merge, assert that every branch is in a terminal state (completed, failed, or cancellation-acknowledged), and that the merge input arity equals the terminal-completed count. If the assertion fails, the merge must block, not proceed. The following guard implements the check and raises on the zombie-branch condition. ```python from dataclasses import dataclass, field from enum import Enum class BranchState(Enum): ACTIVE = "active" PRUNED_FLAGGED = "pruned_flagged" # flag set, coroutine still running CANCELLED_ACKED = "cancelled_acked" # terminal, acknowledged COMPLETED = "completed" FAILED = "failed" class ConvergenceIntegrityError(RuntimeError): """Raised when a merge would commit over a non-terminal branch set.""" @dataclass class Branch: branch_id: int state: BranchState output: str | None = None @dataclass class Fanout: branches: list[Branch] = field(default_factory=list) def terminal_count(self) -> int: terminal = {BranchState.CANCELLED_ACKED, BranchState.COMPLETED, BranchState.FAILED} return sum(1 for b in self.branches if b.state in terminal) def zombie_branches(self) -> list[int]: # Flagged pruned but not acknowledged: excluded from quorum, still emitting. return [b.branch_id for b in self.branches if b.state == BranchState.PRUNED_FLAGGED] def commit_merge(fanout: Fanout, quorum_denominator: int) -> list[str]: zombies = fanout.zombie_branches() if zombies: raise ConvergenceIntegrityError( f"cannot commit merge: branches {zombies} are pruned-flagged but not " f"cancellation-acknowledged (zombie state). Drain to terminal before merge." ) if fanout.terminal_count() != len(fanout.branches): raise ConvergenceIntegrityError( f"merge input arity {fanout.terminal_count()} != fanout arity " f"{len(fanout.branches)}; convergence set not frozen." ) if quorum_denominator != fanout.terminal_count(): raise ConvergenceIntegrityError( f"quorum denominator {quorum_denominator} != terminal branch count " f"{fanout.terminal_count()}; quorum computed over a stale active set." ) return [b.output for b in fanout.branches if b.state == BranchState.COMPLETED and b.output] ```