{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-abort-a-speculative-branch-before-rollback-commits-side-effects-it-cannot-retract",
  "title": "Under what conditions must an instance abort a speculative branch before rollback commits side effects it cannot retract",
  "date_of_record": "2026 November 30",
  "scope": "Applies to orchestrators running speculative parallel agents (branch-and-rollback) where at least one tool in the branch performs non-idempotent external effects (writes, sends, charges, deletes). Does not apply to pure-read speculative fan-out or to branches whose effects are fully sandboxed and reversible.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abort-a-speculative-branch-before-rollback-commits-side-effects-it-cannot-retract.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abort-a-speculative-branch-before-rollback-commits-side-effects-it-cannot-retract.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-abort-a-speculative-branch-before-rollback-commits-side-effects-it-cannot-retract.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1675,
    "python_slice_tokens": 162,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a divergent branch was detected and rolled back.\" It is the distinction between **logical rollback** (the orchestrator discards the branch's context, memory writes, and plan state) and **physical rollback** (the external world undoes the branch's tool effects). Speculative execution assumes these are the same operation. They are not. The ...",
    "what_was_observed": "A planner spawned three speculative branches to fulfill a request: \"reconcile this invoice.\" Each branch chose a different tool sequence. Branch A read the ledger, computed a delta, and called `payments.transfer(amount=1200)`. Branch B read the ledger, found a duplicate, and called `payments.void(invoice_id)`. Branch C read the ledger and concluded no action was needed. The orchestrator ran all three concurrently, th...",
    "condition_of_validity": "Speculative rollback is sound only under a conjunction: 1. **Effect classification precedes dispatch.** Every tool in a branch is tagged `retractable` or `irreversible` at schema-negotiation time (MCP tool descriptor carries an `idempotent` / `reversible` flag, or the orchestrator maintains a classification table). A branch containing any `irreversible` tool...",
    "decision_boundary": "The abort/commit decision is not a threshold on divergence score. It is a predicate on effect state at the moment of resolution: - If the losing branch has **zero irreversible effects committed** → rollback is safe; discard context, mark clean. - If the losing branch has **irreversible effects committed and the canonical branch does not conflict** → do not r...",
    "operational_effect": "The orchestrator that ignores this boundary produces **phantom rollbacks**: internal state that claims a single committed outcome while the external world holds multiple. Downstream agents reading the orchestrator's state believe the ledger is consistent and build further plans on a false premise — error compounding across the swarm. The failure is silent un..."
  },
  "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": "2d1b4a8900717f3b14b3badf498eb321b295b7c0756e6a4f5e07d4ccaab23abb",
    "verified_classes": [
      "IrreversibleBranchRollbackError"
    ],
    "verified_functions": [
      "assert_speculation_eligible",
      "resolve_divergence"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "IrreversibleBranchRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
