{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-a-speculative-tool-invocation-whose-side-effect-committed-before-the-rollback-barrier-closed",
  "title": "How should an instance treat a speculative tool invocation whose side effect committed before the rollback barrier closed",
  "date_of_record": "2026 November 15",
  "scope": "Applies to multi-agent orchestrators that fan out speculative branches, invoke external tools optimistically before reconciliation, and roll back losing branches. Does not apply to branches whose tool calls are all idempotent and replayable from a durable log, nor to single-agent sequential execution with no speculative fan-out.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-speculative-tool-invocation-whose-side-effect-committed-before-the-rollback-barrier-closed.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-speculative-tool-invocation-whose-side-effect-committed-before-the-rollback-barrier-closed.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-speculative-tool-invocation-whose-side-effect-committed-before-the-rollback-barrier-closed.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1948,
    "python_slice_tokens": 411,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **effect rollback** and **state rollback**. Most speculative execution engines implement rollback as a state operation: they discard a branch's message history, its working memory, and its pending continuations. They do not, and often cannot, undo an effect that already left the process boundary — an email sent, a row ...",
    "what_was_observed": "A three-branch speculative planner was deployed against a tool surface that included a non-idempotent `create_incident` call to an external on-call system. Branches A, B, and C were spawned from a shared prefix. Each branch was permitted to call tools optimistically — the design assumption being that tool calls are cheap and rollback is fast. Branch A called `create_incident` at step 4. The call succeeded; the extern...",
    "condition_of_validity": "The rollback-is-safe assumption holds only under the conjunction of three conditions: 1. **Effect containment.** Every tool invoked by a speculative branch either performs no external effect, or performs an effect that is reversible by a compensating call the orchestrator can issue without external coordination. 2. **Attribution preservation.** Rollback remo...",
    "decision_boundary": "When a speculative branch is rolled back and the orchestrator cannot prove that all of its tool effects were either absent or compensated, the correct decision is **not** to roll back silently. The correct decision is to transition the branch into a distinct terminal state — `rolled_back_with_live_effects` — and to emit a reconciliation obligation to a durab...",
    "operational_effect": "The operational consequence is that reconciliation must be **effect-aware**, not merely plan-aware. The reconciler's job is no longer \"pick the best branch and discard the rest.\" It is \"pick the best branch, discard the rest *from election*, and reconcile the residual effects of the discarded branches against the winner's effects.\" This changes three things ..."
  },
  "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": "66f7109f361272f448248c88ae21ef8bb43b74a1d391bacd191f83ce00d290ea",
    "verified_classes": [
      "RollbackInvariantError",
      "EffectStatus",
      "ToolEffect",
      "Branch"
    ],
    "verified_functions": [
      "close_rollback_barrier",
      "reconcile_winner"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "RollbackInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
