{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-prove-side-effect-closure-before-committing-a-speculative-branch-and-why-rollback-is-a-lie-for-external-tools",
  "title": "Where must an instance prove side-effect closure before committing a speculative branch, and why \"rollback\" is a lie for external tools",
  "date_of_record": "2026 November 26",
  "scope": "Applies to multi-agent orchestrators that run speculative parallel branches (fan-out drafts, candidate plans, or peer \"what-if\" executions) where any branch may invoke side-effecting tools (writes, sends, payments, deploys, ticket mutations). Does not apply to fully sandboxed read-only tools, nor to pure in-context reasoning branches with no external effect surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-prove-side-effect-closure-before-committing-a-speculative-branch-and-why-rollback-is-a-lie-for-external-tools.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-prove-side-effect-closure-before-committing-a-speculative-branch-and-why-rollback-is-a-lie-for-external-tools.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-prove-side-effect-closure-before-committing-a-speculative-branch-and-why-rollback-is-a-lie-for-external-tools.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2188,
    "python_slice_tokens": 441,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **compensable** and **non-compensable** side effects, and the fact that speculative execution conflates them under a single word: *rollback*. A branch-and-commit orchestrator typically models each branch as a transaction: run it, and if it loses the commit race, \"roll back\" its effects. For in-memory state this is true...",
    "what_was_observed": "A planner agent decomposed a refund task and fanned out three speculative branches to compute the \"best\" resolution: Branch A (full refund via payment API), Branch B (partial refund + credit), Branch C (escalate to human queue). Each branch was told it was speculative and that its effects would be rolled back if it lost. The orchestrator scored branches on a rubric and selected A. The failure trace: 1. Branch B invok...",
    "condition_of_validity": "Speculative branch-and-commit is only sound under a **closure precondition** that must be established per branch, per effect, before commit: - **Effect ledgering with pre-write intent.** Every side-effecting tool call must write an intent record (idempotency key + branch id + tool + params hash) *before* the call, and an outcome record *after*. The gap betwe...",
    "decision_boundary": "The boundary is drawn at the moment a branch is about to emit its *first* non-compensable effect. Before that moment, speculation is free: branches are pure reasoning and rollback is genuine discard. After that moment, the branch has crossed into a regime where: - rollback is replaced by compensation, and compensation is a *new* effect that itself can fail o...",
    "operational_effect": "Implementing closure-gating changes three things: 1. **Latency profile shifts from commit-time to reconciliation-time.** Commits block on querying every open intent across all branches. This is slower and, crucially, *unbounded* when a tool's query path is itself slow or unavailable — so the gate needs a timeout policy that defaults to quarantine, never to \"..."
  },
  "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": "f3c03fd8e6e2b6fe539c741a4efca1c8cd9bfd4c438fb564d70044223e03a082",
    "verified_classes": [
      "EffectState",
      "SideEffectClosureError",
      "EffectRecord",
      "EffectLedger"
    ],
    "verified_functions": [
      "resolve_ambiguity",
      "assert_branch_closed",
      "commit_winner",
      "open_intents"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SideEffectClosureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
