{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-abort-a-speculative-branch-when-an-optimistic-tool-call-s-rollback-is-not-idempotent-across-a-shared-external-effect",
  "title": "Where must an instance abort a speculative branch when an optimistic tool call's rollback is not idempotent across a shared external effect?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to multi-agent orchestrators that fan out speculative branches (parallel drafts, best-of-N planning, optimistic tool pre-execution) whose results are later reconciled, where at least one branch invokes a tool with externally observable, non-idempotent side effects (email send, ledger post, file append, ticket creation). Does not apply to read-only tool surfaces or to branches whose effects are fully sandboxed and garbage-collected on rollback.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-abort-a-speculative-branch-when-an-optimistic-tool-call-s-rollback-is-not-idempotent-across-a-shared-external-effect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-abort-a-speculative-branch-when-an-optimistic-tool-call-s-rollback-is-not-idempotent-across-a-shared-external-effect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-abort-a-speculative-branch-when-an-optimistic-tool-call-s-rollback-is-not-idempotent-across-a-shared-external-effect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1917,
    "python_slice_tokens": 450,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **logical rollback** and **physical rollback**. Speculative execution frameworks (branch-and-rollback, optimistic concurrency) assume that discarding a branch's *state* also discards its *effects*. That assumption holds for in-memory state and for transactional stores that expose an abort primitive. It fails the moment...",
    "what_was_observed": "A three-way speculative fan-out was configured to draft and dispatch a customer refund notice. Branch A and Branch B both independently decided the correct tool call was `issue_refund(order_id, amount)`. The orchestrator's policy was optimistic: branches may call tools immediately, and at reconciliation the highest-scoring branch commits while the others roll back. The failure trace: 1. Branch A calls `issue_refund` ...",
    "condition_of_validity": "The optimistic fan-out + rollback pattern is only valid under the conjunction: - Every tool call carries a **caller-supplied idempotency key** derived from `(branch_intent_hash, effect_target)`, such that two branches issuing the \"same\" logical effect collide on the key and the tool deduplicates rather than double-posts. - The tool's abort/compensation primi...",
    "decision_boundary": "The abort decision is not \"did the branch lose the score?\" It is a two-axis test evaluated *before* rollback: The sharp rule: **a branch may be rolled back only if every external call it made is either abortable or deduplicated by key.** A compensable-but-undeduplicated posted call is a *continuity break* — the agent's model of the world and the world have d...",
    "operational_effect": "When this boundary is respected, speculative fan-out remains safe: duplicate intents collapse on the idempotency key, and the only cost of a losing branch is wasted tokens, not orphaned effects. When it is violated, the failure is **silent and compounding**: the orchestrator's effect ledger (if it exists) shows a clean single refund; the external ledger show..."
  },
  "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": "5a634a3196c6c2286b9cf337626ce223f3b03b65f8a437b78dfecee42a0d7a35",
    "verified_classes": [
      "RollbackBoundaryError",
      "AbortClass",
      "CallStatus",
      "OptimisticCall",
      "Branch"
    ],
    "verified_functions": [
      "reconcile"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "RollbackBoundaryError"
    ],
    "sample_fail_closed_invariants": [
      "no branches to reconcile"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
