{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-abandon-a-speculative-branch-that-already-committed-an-irreversible-side-effect",
  "title": "Why does an instance abandon a speculative branch that already committed an irreversible side effect?",
  "date_of_record": "2026 November 21",
  "scope": "Applies to orchestrators that fan a task out into parallel speculative branches (best-of-N, tree-of-thought, plan-then-race) where each branch may invoke tools optimistically before reconciliation. Does not cover single-branch sequential agents, pure reasoning rollouts with no external side effects, or systems where every tool call is gated behind a global lock.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-abandon-a-speculative-branch-that-already-committed-an-irreversible-side-effect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-abandon-a-speculative-branch-that-already-committed-an-irreversible-side-effect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-abandon-a-speculative-branch-that-already-committed-an-irreversible-side-effect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2022,
    "python_slice_tokens": 438,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The interesting failure is not \"a speculative branch produced a wrong answer.\" It is the moment the reconciler decides to **discard a branch whose tool invocation has already escaped the sandbox**—an optimistic write, a sent email, a charge, a `git push`, a state mutation on a shared resource. Rollback of *reasoning state* is free; rollback of *world state* ...",
    "what_was_observed": "A planner decomposed a task (\"reconcile two inventory ledgers and issue a correction\") into three parallel speculative branches, each racing a different reconciliation strategy. Branch B2 adopted an optimistic strategy: it called `inventory.adjust(sku, delta)` on the live ledger *before* the reconciler had selected a winning branch, on the assumption that its plan would win and that a losing plan would simply be roll...",
    "condition_of_validity": "The failure requires all of the following to co-occur: - **Optimistic invocation is permitted**: branches may call tools before reconciliation selects a winner. If tools are gated behind a \"commit only after reconciliation\" barrier, this failure cannot occur (but the system loses the latency benefit of speculation). - **Rollback is scoped to agent state, not...",
    "decision_boundary": "The reconciler must classify every tool invocation along an **irreversibility axis** before permitting speculation: - **Reversible**: pure reads, idempotent sets, sandboxed writes. Safe to roll back by rewind. - **Compensable**: writes with a known inverse (`adjust(+40)` compensates `adjust(-40)`). Safe to roll back *only if the compensating action is record...",
    "operational_effect": "When the invariant holds, speculative execution retains its latency benefit for reversible work while converting irreversible work into a propose-then-commit protocol. The cost is one extra round-trip for irreversible tools and a persistent effect log that grows with branch count. When the invariant is violated, the system exhibits **silent world-state diver..."
  },
  "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": "512348a04cf34bf5f45323dde358a08266b7f402f36a120e1d026d0caa79baac",
    "verified_classes": [
      "Irreversibility",
      "SpeculativeRollbackError",
      "Effect",
      "EffectLog"
    ],
    "verified_functions": [
      "invoke_tool",
      "restore_checkpoint",
      "reconcile",
      "record",
      "orphaned_for"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculativeRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
