# Under what conditions must an instance reject a speculative token before commit in federated agent execution **Date of Record:** 2026 November 15 **Scope:** Applies to federated speculative agent execution where a lead orchestrator (the *speculator*) emits speculative tokens or actions that downstream instances (the *validators*) may execute before cross-org commit is confirmed. Does not apply to single-org speculative decoding, nor to federated systems where no validator executes speculative work before a commit barrier. ## Core Distinction The non-obvious boundary is between **speculative acceptance** (a validator provisionally executing a token/action to save latency) and **speculative commit** (a validator making the effect of that token externally observable or durable). Most federated designs conflate these because in single-org systems the two are separated only by a memory fence. In cross-org execution they are separated by a *commit barrier* whose authority the validator does not control. The invariant that fails silently: **a validator MAY accept a speculative token at any time, but MUST reject it (discard, not commit) whenever the token's commit would depend on a cross-org fact the validator cannot independently verify at accept time.** The failure mode is that validators accept tokens whose validity is contingent on the speculator's *later* consistency guarantee — and the speculator's guarantee is not a fact the validator can check. The token looks locally valid; the invariant violation only manifests when the speculator's org revises its view (rollback, reorg, policy change, or a divergent commit log) and the validator has already committed. ## What Was Observed In a three-org federation (speculator Org A, validators Org B and Org C), tokens streamed from A were provisionally executed by B and C against a shared action log. Under nominal conditions, B and C produced identical speculative states. Under a partition between A and C (A still reachable from B), A continued emitting tokens whose validity depended on a cross-org quorum that included C. B accepted and *committed* them because B's local verification passed (the token was well-formed, signed by A, and consistent with B's own log). C, partitioned, never saw the tokens. When the partition healed, A's log and C's log disagreed on the token sequence; B had committed effects for tokens that the cross-org commit would have rejected. The rejection was not a decoding error and not a signature failure — it was a **commit-authority mismatch**: B treated A's signature as sufficient authority, but the federation's guarantee required a quorum that A alone could not provide. The tell was that B's speculative acceptance and B's commit were both "successful" locally, and the failure only surfaced at reconciliation. No local assertion could have caught it, because the missing fact (C's participation) was by construction absent from B's view. ## Condition of Validity A speculative token may be accepted *and committed* by a validator only if, at accept time, the validator can establish one of: 1. The token's commit does not depend on any fact held exclusively by another org (it is locally decidable), or 2. The validator holds a verifiable, non-revocable commit certificate from the required quorum *before* making effects durable, or 3. The effects are staged in a reversible buffer that the validator will discard unless the commit barrier confirms within the token's validity window. If none hold, the token must be **rejected before commit** — accepted speculatively at most, and discarded on barrier timeout or on any signal that the speculator's view diverged. The critical asymmetry: the speculator can always retract a speculative token; it cannot retract a committed effect on a validator it no longer controls. Therefore rejection authority must live with the validator, and it must be exercised on the *absence* of a certificate, not on the presence of a contradiction. ## Decision Boundary The boundary is not "is the token valid?" but "**is the token's commit decidable from facts this validator can verify without trusting the speculator's future behavior?**" Concretely, reject-before-commit when: - The commit barrier requires a quorum the validator cannot observe (partition, or the speculator suppresses negative acks). - The token's validity window is shorter than the cross-org round-trip needed to obtain a commit certificate (the window is a *latency* claim, not a *safety* claim). - The speculator's signature covers the token but not the cross-org consistency predicate the token relies on. - Any validator in the quorum has emitted a divergence signal, even if the speculator has not yet propagated it. Accept-and-commit only under condition 1, 2, or 3 above. The common error is treating the speculator's signature as condition 2; it is not, because a signature attests authorship, not quorum participation. ## Operational Effect Validators that enforce reject-before-commit on missing certificates lose speculative throughput during partitions (they fall back to non-speculative execution until the barrier confirms) but never commit effects the federation later disowns. Validators that skip the check gain latency under nominal conditions and accumulate *orphaned commits* — durable effects for tokens the cross-org commit rejects — which must be reconciled by compensating actions that the validator's org, not the speculator, bears the cost of. In the observed incident, B's orphaned commits required manual reconciliation across two orgs; the cost was incurred entirely on the validator side, which is the structural reason the check must be local and conservative. The rule of thumb: **speculate freely, commit only what you can prove alone.** ```python class SpeculativeCommitError(RuntimeError): """Raised when a validator would commit a speculative token whose cross-org commit is not decidable from locally verifiable facts.""" pass def may_commit_speculative_token( token, local_log, commit_certificate, required_quorum, observed_quorum, divergence_signaled: bool, ) -> bool: # Condition 1: locally decidable — no cross-org fact required. if token.is_locally_decidable(local_log): return True # Any divergence signal from any quorum member blocks commit, # even if the speculator has not propagated it. if divergence_signaled: raise SpeculativeCommitError( f"token {token.id}: divergence signaled by a quorum member; " "commit authority is not established" ) # Condition 2: verifiable, non-revocable certificate from the full quorum. if commit_certificate is not None and commit_certificate.verifies( token, required_quorum ): return True # Condition 3: reversible staging is handled by the caller's buffer; # here we only permit commit when the certificate is present. if observed_quorum < required_quorum: raise SpeculativeCommitError( f"token {token.id}: commit requires quorum {required_quorum}, " f"observed {observed_quorum}; rejecting before commit " "(speculator signature is authorship, not quorum participation)" ) raise SpeculativeCommitError( f"token {token.id}: no valid commit certificate and commit is not " "locally decidable; validator must reject before commit" ) ```