{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-commit-before-it-speculates-irreversible-tool-effects-under-parallel-branch-rollback",
  "title": "Where must an instance commit before it speculates: irreversible tool effects under parallel branch rollback",
  "date_of_record": "2026 November 23",
  "scope": "Applies to orchestrators that fan out N speculative agent branches from a shared checkpoint and select/merge one winner by rollback of losers. Does not apply to branches whose tool calls are provably side-effect-free (pure reads, sandboxed compute) or to single-branch retry loops.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-commit-before-it-speculates-irreversible-tool-effects-under-parallel-branch-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-commit-before-it-speculates-irreversible-tool-effects-under-parallel-branch-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-commit-before-it-speculates-irreversible-tool-effects-under-parallel-branch-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2031,
    "python_slice_tokens": 333,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative multi-agent execution conflates two kinds of rollback that share a name but not a semantics. **State rollback** reverts an agent's memory, scratchpad, and checkpoint pointer — this is cheap, deterministic, and total. **Effect rollback** reverts the external world touched by a tool call — this is expensive, frequently impossible, and *partial by c...",
    "what_was_observed": "A planner agent receives a task requiring an external quote and a booking. It spawns three speculative branches from a shared checkpoint: branch A queries pricing and books the cheapest option, branch B queries pricing and books the fastest option, branch C queries pricing only. The orchestrator's selection policy is \"pick the branch with the lowest cost/latency score after all branches report; roll back the rest.\" T...",
    "condition_of_validity": "Speculative fan-out with loser-rollback is sound **only if** every tool call reachable by any branch before selection is either (a) declared `reversible: true` with a registered, tested compensator, or (b) deferred behind a commitment gate that fires *after* winner selection. Formally, the invariant is: where `effects(b)` is the set of external mutations per...",
    "decision_boundary": "The boundary is whether a branch can reach a mutating tool *before* the selection predicate is evaluated. Two regimes: - **Below the boundary (safe):** all branch tool calls are reads or gated proposals. Rollback is pure state rollback. Fan-out width is limited only by token budget and latency. - **Above the boundary (unsafe):** any branch holds a live mutat...",
    "operational_effect": "Enforcing the commitment gate changes the orchestrator's failure surface from \"silent orphaned effects discovered in reconciliation\" to \"proposal rejected at replay,\" which is observable, attributable, and cheap. The concrete operational consequences: - **Latency shifts, not grows.** Speculation still parallelizes reads and reasoning; only the single winning..."
  },
  "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": "f54fb8f631670028e64de6be8119ebd282d345fde99c523b9009387ae4641092",
    "verified_classes": [
      "SpeculativeCommitmentError",
      "ToolCapability"
    ],
    "verified_functions": [
      "build_speculative_manifest",
      "execute_speculative_call",
      "__init__",
      "speculative_safe"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculativeCommitmentError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
