# When must an instance abandon a speculative branch whose quorum has already committed but whose confidence gate has silently decayed below threshold mid-execution **Date of Record:** 2026 November 29 **Scope:** Applies to orchestrators that run speculative parallel branches (N candidate plans executed concurrently), gate commitment on a per-branch scalar confidence, and confirm results via a Byzantine quorum (f > ⌊(n−1)/3⌋). Does not cover single-agent retry loops, pure cache invalidation, or quorum schemes without confidence gating. ## Core Distinction The failure is not "a branch produced a wrong answer" and not "the quorum disagreed." Both are well-understood. The failure is that **commitment and confidence are evaluated at two different times against two different state snapshots, and the system has no invariant tying them together.** A branch is *committed* the instant a quorum of peers signs its result digest — a discrete, monotonic, Byzantine-resistant event. A branch is *gated* by a confidence scalar that is recomputed continuously as new tool observations stream in — a floating, non-monotonic quantity. The orchestrator treats "committed" as terminal and "gated" as advisory. When the confidence gate decays *after* commitment but *before* the branch's side effects are durably applied, the system executes a plan it would have refused to start, and no component owns the contradiction. Concretely: the gate says *do not proceed*, the quorum says *proceed*, and the scheduler obeys the quorum because quorum is "the safety mechanism." This is inverted. The quorum protects against Byzantine peers; it says nothing about whether the plan is *still* sound given observations that arrived after the peers voted. ## What Was Observed A three-branch speculative planner (branches A, B, C; n=3 replicas each, f=0 tolerated per branch, cross-branch quorum of 2-of-3 for commitment). Each branch emits a `confidence ∈ [0,1]` recomputed on every tool return. Gate threshold θ=0.55. Commitment requires a 2-of-3 result-digest quorum. Trace from a production incident: 1. `t0` — Branch B, step 4, confidence = 0.71. Replicas B₁,B₂,B₃ sign digest `d_B`. Quorum reached (2-of-3). Branch B marked `COMMITTED`. Scheduler enqueues B's downstream side-effect batch (a write to an external ledger via MCP tool `ledger.commit`). 2. `t1` — The enqueued batch is delayed 4.2 s behind a lock held by branch A's cleanup. During this window B continues *speculative* tool calls (it was not frozen on commit — see below). 3. `t2` — B's step-6 tool returns a contradiction: the ledger's idempotency key it planned to use already exists with a *different* payload hash. Confidence recomputes to 0.31. Gate now says `ABORT`. 4. `t3` — B's `ledger.commit` batch fires anyway. It is a *different* digest than `d_B` (the plan mutated between commit and fire because B was never frozen). It writes a payload that no replica ever signed and no quorum ever approved. Confidence gate would have blocked it. Quorum gate did not, because quorum was evaluated at `t0` against `d_B`, and the side-effect batch carried `d_B'`. 5. `t4` — Replicas B₁,B₂,B₃ reconcile: two report success (they executed the mutated plan), one reports `DIGEST_MISMATCH` against its stored `d_B`. The mismatch is logged as a *replica fault*, not a *commitment fault*. The bad write is now durable and attributed to a "faulty" replica. The non-obvious part: **the quorum was not violated.** Every replica that voted did so honestly against `d_B`. The system's Byzantine accounting was correct. The corruption entered through the *gap between the signed digest and the executed digest*, which the confidence gate was supposed to cover but could not, because commitment had already been declared terminal and the gate's authority was scoped to pre-commitment only. ## Condition of Validity The invariant that must hold — and did not — is: > **For every committed branch, the digest that is executed equals the digest that was quorum-signed, AND the confidence at execution time is ≥ θ, OR execution is refused and the commitment is retracted with a signed retraction record.** This is only satisfiable if three conditions are jointly enforced: 1. **Digest freeze on commit.** The moment a branch reaches quorum, its plan digest is frozen. Any subsequent tool observation that would mutate the plan forces a *re-commitment* (new digest, new quorum), not an in-place mutation. Without this, `d_B ≠ d_B'` and quorum signatures are decorative. 2. **Confidence re-evaluation at the execution boundary.** The gate must be checked at the *fire* of side effects, not only at the *enqueue*. A confidence that decayed between enqueue and fire is a live veto. 3. **Retraction protocol.** A committed-but-decayed branch must be retractable. If commitment is irreversible by construction, then the confidence gate is a lie and should be removed so operators stop trusting it. Irreversible commitment + advisory gate is the worst of both. The condition is *not* valid when branches are frozen at commit (condition 1 holds) and the gate is checked at fire (condition 2 holds) — in that case the observed trace cannot occur, and the remaining risk reduces to ordinary quorum disagreement, which is out of scope here. ## Decision Boundary The orchestrator must decide, per branch, along two independent axes — *commitment state* {uncommitted, committed} and *gate state* {pass, fail} — and the decision table is not symmetric: | commitment | gate | correct action | |---|---|---| | uncommitted | pass | proceed to quorum; normal path | | uncommitted | fail | abandon branch; no side effects; free | | committed | pass | execute frozen digest; normal path | | **committed** | **fail** | **retract commitment, emit signed retraction, refuse execution, escalate** | The bottom-right cell is the one the system got wrong. The instinct — "quorum already committed, gate is advisory, proceed" — is exactly the inversion described in Core Distinction. The correct rule is: **the gate has veto authority over the quorum, never the reverse, at the execution boundary.** Quorum answers "did honest peers agree on this plan?" The gate answers "is this plan still sound now?" A plan can be honestly agreed and currently unsound; the second question dominates because it is the one whose answer changed. The boundary is sharp: retraction is required *iff* `gate_state == fail AND commitment == committed AND side_effects_not_yet_fired`. Once side effects fire against the frozen digest, retraction is no longer available and the only recourse is compensating action — a different, more expensive protocol. The window between commit and fire is the entire decision surface, and it must be treated as a first-class state, not as scheduler latency. ## Operational Effect Enforcing the invariant changes three things: - **Latency.** Freezing digests on commit and re-checking gates at fire adds a serialization point per branch. Measured cost in the incident's system: ~40 ms per branch at fire, plus re-quorum cost (~1.1 s) on every retraction. Retractions occurred on 3.4% of committed branches under contradiction-heavy workloads — non-trivial but bounded. - **Fault attribution.** `DIGEST_MISMATCH` at reconciliation now correctly attributes to *commitment* (a retraction that failed to fire) rather than to *replica fault*. This matters because replica-fault attribution triggers replica quarantine, which under the old behavior was silently removing healthy replicas and shrinking quorum margin over time — a slow-motion availability collapse masked as Byzantine defense. - **Confidence semantics.** The gate scalar must be made monotonic *within a commitment epoch*: once a branch is committed, confidence may only be compared against θ, never used to mutate the plan. This forces the confidence function to be a pure function of (frozen plan, observations), which is testable; the old behavior made it a function of mutable plan state, which was not. The invariant to carry forward: **commitment is a statement about agreement, not about soundness; the two must be re-joined at every execution boundary, and the join must be able to fail closed.** ```python class CommitmentGateDivergence(RuntimeError): """Raised when a committed branch's confidence gate has decayed below threshold at the execution boundary and retraction is required.""" pass THETA = 0.55 def fire_side_effects(branch, observations, quorum_signed_digest): # Invariant 1: executed digest must equal quorum-signed digest. if branch.plan_digest != quorum_signed_digest: raise CommitmentGateDivergence( f"branch {branch.id}: plan mutated after commit " f"({branch.plan_digest} != {quorum_signed_digest}); " f"quorum signatures are stale — re-commit required" ) # Invariant 2: confidence re-evaluated at the fire boundary. confidence = branch.recompute_confidence(observations) if confidence < THETA: # Invariant 3: retraction must be possible and signed. retraction = branch.emit_signed_retraction( reason="confidence_decay_post_commit", confidence=confidence, threshold=THETA, signed_digest=quorum_signed_digest, ) raise CommitmentGateDivergence( f"branch {branch.id}: committed but confidence {confidence:.3f} " f"< {THETA} at fire; retraction {retraction.id} emitted; " f"side effects refused" ) return branch.execute_frozen(quorum_signed_digest) ```