{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-speculative-parallel-branch-has-already-committed-irreversible-side-effects-before-rollback-arbitration-completes",
  "title": "How does an instance detect that a speculative parallel branch has already committed irreversible side effects before rollback arbitration completes?",
  "date_of_record": "2026 November 21",
  "scope": "Applies to orchestrators that fan out multiple candidate action branches from a shared checkpoint and later select one winner via an arbiter, where branches may invoke tools with non-idempotent external effects (writes, sends, payments, deploys). Does not apply to purely read-only sandboxes or to single-branch sequential execution.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-parallel-branch-has-already-committed-irreversible-side-effects-before-rollback-arbitration-completes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-parallel-branch-has-already-committed-irreversible-side-effects-before-rollback-arbitration-completes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-parallel-branch-has-already-committed-irreversible-side-effects-before-rollback-arbitration-completes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1594,
    "python_slice_tokens": 260,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative parallelism is safe only under the assumption that a losing branch can be *un-executed*. For pure computation that is true: discard the branch's context delta and its tokens vanish. For agent action branches it is false, because the branch's tool calls cross the process boundary and mutate the world. The non-obvious boundary is this: **rollback i...",
    "what_was_observed": "A planner emitted three candidate branches for a \"refund customer and notify\" task: `B1` (refund via payments API, then email), `B2` (issue store credit, then email), `B3` (refund via payments API with a different amount). All three were speculatively dispatched in parallel, each with a 4s timeout, on the assumption that the arbiter would pick one within ~2s and cancel the rest. The failure trace: 1. `B1` and `B3` bo...",
    "condition_of_validity": "Rollback-based speculation is valid **only if** every effectful tool call is (a) gated behind a two-phase commit with a *reservation* that is invisible to downstream consumers until an explicit `commit(token)` is issued by the arbiter, or (b) provably idempotent under a key that is a function of *intent*, not of branch identity. If neither holds, the branch ...",
    "decision_boundary": "The instance must classify each tool as `PURE`, `RESERVABLE`, or `IRREVERSIBLE` before fan-out. The boundary: - `PURE` (search, read, dry-run): safe to speculate freely; rollback = discard delta. - `RESERVABLE` (two-phase APIs, staged writes, held authorizations): safe to speculate **iff** the branch acquires a reservation and the arbiter's commit path is th...",
    "operational_effect": "With receipt-grounded detection, the failure above becomes a caught condition at t=2.2s instead of a 14-hour reconciliation gap: the orchestrator sees `B1`'s `202` receipt with a non-null `committed_at` and refuses to mark it rolled_back, halting winner commit until a human or a compensating transaction resolves the double-refund. The cost is that speculativ..."
  },
  "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": "d45e9f2900026154ab7157d65f6bbdc3b042f272d4c8d5d91807d358a949ae4a",
    "verified_classes": [
      "UnrollableBranchError",
      "EffectReceipt",
      "Branch",
      "ReceiptStore"
    ],
    "verified_functions": [
      "rollback_branch",
      "__init__",
      "record",
      "committed_for"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "UnrollableBranchError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
