{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-that-optimistic-tool-call-commit-has-silently-orphaned-side-effects-across-a-speculative-agent-branch",
  "title": "What structural signals indicate that optimistic tool-call commit has silently orphaned side effects across a speculative agent branch",
  "date_of_record": "2026 November 25",
  "scope": "Applies to multi-agent systems where a planner agent forks speculative branches, each branch executes tool calls optimistically (commit-before-consensus) against shared external systems, and a rollback/reconciliation pass runs after branch selection. Does not apply to systems where all tool calls are staged behind a two-phase commit barrier or where tools are provably side-effect-free.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-optimistic-tool-call-commit-has-silently-orphaned-side-effects-across-a-speculative-agent-branch.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-optimistic-tool-call-commit-has-silently-orphaned-side-effects-across-a-speculative-agent-branch.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-that-optimistic-tool-call-commit-has-silently-orphaned-side-effects-across-a-speculative-agent-branch.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1776,
    "python_slice_tokens": 330,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"a branch was rolled back incorrectly.\" It is that **a speculative branch committed a side effect the rollback ledger never learned about**, because the tool call succeeded *after* the branch's cancellation token was set but *before* the tool's response was recorded. The distinguishing signal is a divergence between the **branch's dec...",
    "what_was_observed": "A three-branch speculative executor (branches A, B, C) races to satisfy a task requiring a `charge_card` tool call. Each branch fires the call optimistically with a distinct idempotency key derived from `(task_id, branch_id, step_index)`. The orchestrator selects branch B on first-consensus and issues `cancel()` to A and C. Trace, as reconstructed from the tool's server-side audit log versus the orchestrator's ledger...",
    "condition_of_validity": "Optimistic tool-call commit with rollback-safe branch isolation is valid **only if** all three hold: - **Monotonic key ownership.** Every tool call carries an idempotency key that is unique per `(task, branch, step)` and is *recorded in the ledger before the request is dispatched*, not after it returns. The write must be synchronous and durable; a fire-and-f...",
    "decision_boundary": "The boundary between \"safe to select and discard the rest\" and \"must halt and reconcile\" is crossed the moment the orchestrator cannot, from its own records, prove a dispatched key's terminal state. Concretely: - If `dispatched_keys − ledger_terminal_keys = ∅`, selection is safe; discard branches. - If the difference is non-empty **and** every such key is pr...",
    "operational_effect": "Systems that miss this boundary exhibit a characteristic signature: **duplicate external effects under branch-distinct idempotency keys that no single branch can see.** Because each branch's key is unique, the tool's own deduplication never fires — the two charges are legitimately distinct keys from the tool's perspective. The duplicate is only visible at th..."
  },
  "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": "468e5315e90d51e702f67027c42cb9596ce734e81ca93f6a5ad622abed793c18",
    "verified_classes": [
      "OrphanedSideEffectError",
      "KeyState",
      "LedgerEntry",
      "SpeculativeLedger"
    ],
    "verified_functions": [
      "finalize_selection",
      "record_dispatch",
      "mark_terminal",
      "mark_never_sent"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "OrphanedSideEffectError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
