{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-abort-a-speculative-branch-before-its-tool-effects-are-observable-speculative-plan-execution-and-rollback-boundary",
  "title": "When must an instance abort a speculative branch before its tool effects are observable: speculative plan execution and rollback boundary",
  "date_of_record": "2026 November 22",
  "scope": "Applies to orchestrators that fan a single plan into parallel speculative branches, each of which may invoke side-effecting tools (writes, sends, commits, payments, state mutations), and that intend to discard losing branches after a winner is selected. Does not apply to pure-read speculation (search, retrieval, dry-run queries) where no compensating action is required, nor to branches whose effects are gated behind an explicit two-phase commit already enforced by the tool server.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-before-its-tool-effects-are-observable-speculative-plan-execution-and-rollback-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-before-its-tool-effects-are-observable-speculative-plan-execution-and-rollback-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-abort-a-speculative-branch-before-its-tool-effects-are-observable-speculative-plan-execution-and-rollback-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2149,
    "python_slice_tokens": 280,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is not \"can the branch be rolled back\" but **whether the branch's effects have crossed the observability horizon** — the point at which a party outside the orchestrator (a downstream service, a human, another agent, an external API consumer) can observe the effect and act on it. Speculative execution is only safe while every bran...",
    "what_was_observed": "A planning agent decomposed \"reconcile customer account and notify\" into three parallel branches: (A) issue a refund via the payments API, (B) post an adjustment note to the CRM, (C) recompute ledger and stage a reconciliation summary. The orchestrator ran all three concurrently to reduce latency, then selected the winner by a verifier scoring branch outputs against the plan's acceptance criteria. Branch A's refund c...",
    "condition_of_validity": "Speculative execution of a parallel branch is valid if and only if all of the following hold at the moment each tool call is dispatched: - **Deferred commit.** The tool adapter supports a `prepare`/`commit`/`abort` protocol, or the call is provably invisible to external parties until commit. A `202 Accepted` async call is *not* deferred commit unless the ada...",
    "decision_boundary": "The decision boundary is a single predicate evaluated per branch at admission time and re-evaluated at each dispatch: If `speculatable` is false at admission, the branch is serialized behind winner selection. If it becomes false mid-flight (a `reversible_until` is discovered to be closer than estimated, or a compensator precondition fails), the orchestrator ...",
    "operational_effect": "Adopting the horizon-aware boundary changes three things in the orchestrator's behavior: 1. **Latency profile becomes heterogeneous.** Plans with commit-on-call tools can no longer be fully parallelized; the orchestrator must compute a speculation frontier and serialize beyond it. Expected p99 latency rises, but the variance collapses because the compensatio..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "e86ba8072fc8c8683c2864900519a4dff2149222627e1f37634e6f6b0e878c29",
    "verified_classes": [
      "HorizonCrossedError",
      "ToolCall",
      "Branch"
    ],
    "verified_functions": [
      "speculatable",
      "admit_branch",
      "dispatch"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "HorizonCrossedError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
