# Which invariants prevent speculative fan-out from corrupting cross-org agent coalitions when the fastest replica wins the baton **Date of Record:** 2026 November 21 **Scope:** Applies to coalitions of ≥2 independent organizations whose orchestrators issue speculative parallel sub-invocations (N replicas of the same logical step, first-valid-response-wins, losers cancelled) across an A2A/MCP transport with per-org trust boundaries. Does not apply to single-tenant fan-out where all replicas share one principal, nor to idempotent read-only fan-out with no state mutation. ## Core Distinction Speculative fan-out is usually justified as a latency trick: issue the same task to N replicas, take the first response that passes a *local* validator, cancel the rest. The failure mode is not "a slow replica lost the race." It is that **the winner is selected on per-replica validity, but the baton it receives carries coalition-wide state that only the *set* of replicas could have validated.** In a single org this is harmless because all replicas share the same principal, memory store, and tool credentials. In a cross-org coalition, each replica runs under a *different* org's warrant, reads a *different* slice of shared context, and may have executed side-effecting tool calls before losing. The first-valid-wins rule therefore promotes a response whose provenance is a single org's partial view into a step that the whole coalition will build on. The invariant that breaks is not determinism—it is **warrant monotonicity**: the set of authorities and preconditions attached to the winning state must be a superset of what any cancelled sibling would have required to be safe. Speculative scheduling silently inverts this to "the fastest subset." ## What Was Observed A three-org coalition (call them A, B, C) ran a contract-review pipeline. Step 4 ("reconcile clause conflicts") was fanned out 3× for latency: one replica per org's edge agent, each given the same task envelope but scoped to its own org's document store. Validator was a schema + confidence check local to each replica. Median step latency dropped 41%, so the pattern was promoted to steps 5–8. The failure trace on a sampled run: 1. Replica B returned first at t=180ms with a reconciliation that cited only B's clause store. It passed the schema validator (confidence 0.91) and won the baton. 2. Replicas A and C were cancelled at t=205ms and t=240ms. C had *already* issued two side-effecting `write_annotation` calls to the shared clause registry under C's warrant before cancellation landed. 3. Step 5 (downstream drafting) consumed B's reconciliation, which was internally consistent but omitted a conflict that only existed between A's and C's stores. The omission was invisible to B because B never had A's or C's documents in context. 4. Step 6 verification flagged nothing, because the verifier was also fanned out and the fastest verifier replica shared B's scoping—so the verification was correlated with the error, not independent of it. 5. The inconsistency surfaced 40 minutes later when a human auditor compared the drafted contract against A's store. By then step 7 had propagated the omission into three downstream artifacts and C's orphaned annotations had created a phantom conflict that no replica's context could explain. The non-obvious part: **every individual replica behaved correctly.** B's answer was valid *given B's context*. C's writes were authorized *given C's warrant*. The verifier was sound *given its scope*. The corruption was produced entirely by the composition rule—first-valid-wins over replicas with disjoint context and independent side-effect authority. ## Condition of Validity First-valid-wins is safe for a coalition step only if all of the following hold simultaneously. Each is a checkable predicate, not a vibe: - **Context-equivalence:** every replica's input context is a superset-or-equal of the union of contexts any downstream step will assume. If replicas are scoped to disjoint stores, this fails by construction and the step must not be speculated—it must be *joined* (all replicas must return, then merge) rather than *raced*. - **Effect-deferral:** no replica may commit a side effect under its own warrant before the baton is awarded. Side effects must be staged under a coalition-scoped transaction and committed only by the winner, or by a designated committer, after the race resolves. C's `write_annotation` calls violated this. - **Warrant-subsumption:** the winner's warrant must be a superset of the union of all replicas' warrants for the scope of the step. If A can read documents B cannot, B winning means the step executed with less authority than the step nominally required—an authority *downgrade* disguised as a latency win. - **Verifier independence:** any verification of the winning response must be run by an agent whose context is not a subset of the winner's. Racing verifiers alongside workers guarantees correlated blindness; the verifier must be scheduled *after* baton award and must see the union context. - **Cancellation fencing:** a cancelled replica's in-flight effects must be fenced by a generation token, not merely signalled. A cancel message that arrives after a tool call has been dispatched is advisory, not binding. If context-equivalence and effect-deferral cannot both be established, the step is **not speculatable** regardless of latency budget. This is the boundary: latency optimization is admissible only over steps whose replicas are *context-complete* and *effect-free until commit*. ## Decision Boundary The scheduler must classify each coalition step before fan-out, on two axes, and the classification is a hard gate: | | Effects deferred to commit | Effects committed per-replica | |---|---|---| | **Context-complete replicas** | Race (speculate) | Race with fence + post-hoc union audit | | **Disjoint-context replicas** | Join (barrier, then merge) | Forbidden—serialize or redesign | The forbidden quadrant is where the observed failure lived: disjoint context *and* per-replica effects. No amount of validator tuning fixes it, because the validator sees one replica's context and cannot detect an omission that lives in another replica's store. The decision boundary is therefore not "how many replicas" or "what timeout"—it is **whether the step's correctness predicate is a function of a single replica's context or of the replica set's union.** Single-replica predicates may race. Union predicates must join. A scheduler that races a union predicate has silently converted a correctness requirement into a latency bet. A second boundary: when a step *is* raced, the baton award must be accompanied by a **union-context attestation**—the winner asserts, with a signed claim, which contexts it actually consulted, and downstream steps treat any context outside that attestation as unverified. This converts silent omission into an explicit, checkable gap. ## Operational Effect After the incident, the coalition adopted three guardrails that bound the failure without giving up the latency win on genuinely speculatable steps: 1. **Step classification gate.** Each step declares `context_scope: single | union` and `effect_mode: deferred | immediate`. The scheduler refuses to fan out any `union`+`immediate` step and raises rather than degrading to a race. This alone would have blocked the step-4 fan-out. 2. **Staged effects with generation fencing.** Replica side effects are written to a staging area keyed by `(step_id, generation)`. Only the winner's generation is committed; cancelled generations are discarded, and any late write from a fenced generation is rejected at the commit boundary rather than trusted to have been cancelled. 3. **Post-award union verification.** The verifier is scheduled after baton award, receives the union of all replicas' contexts (including cancelled replicas' read sets, which are logged even when their responses are discarded), and re-checks the winner against the union. This restored independence and caught two latent omissions in the first week. Net effect: step latency on the four genuinely speculatable steps stayed ~35% below serial; the four union-predicate steps reverted to barrier-join and cost ~8% more than the (unsafe) raced version but eliminated the class of omission. The lesson recorded for the coalition's operational memory: **speculative fan-out is a bet that the correctness predicate is local. In cross-org coalitions the predicate is almost never local, and the race does not fail loudly—it fails by promoting the fastest partial view and cancelling the evidence.** ```python class SpeculationScopeError(RuntimeError): """Raised when a coalition step is scheduled for speculative fan-out despite having a union-scoped correctness predicate or immediate effects.""" pass def classify_and_dispatch(step, replicas, latency_budget_ms): # Hard gate: union-scoped predicates must not race. if step.context_scope == "union" and step.effect_mode == "immediate": raise SpeculationScopeError( f"step {step.id}: union-context predicate with per-replica effects " f"is not speculatable; serialize or redesign (latency_budget={latency_budget_ms}ms)" ) if step.context_scope == "union": # Barrier-join: collect all replicas, then merge under union context. results = [r.execute() for r in replicas] winner = merge_union(results) winner.attest(consulted=union_of(r.context for r in replicas)) return winner # Single-context, deferred effects: safe to race with fencing. generation = new_generation() for r in replicas: r.stage_effects(generation) winner = first_valid(replicas) if winner is None: raise SpeculationScopeError( f"step {step.id}: no replica produced a valid response within budget" ) commit_generation(winner, generation) # discards all other generations verify_against_union(winner, replicas) # verifier sees union, not winner's slice return winner ```