{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-speculative-tool-call-cancellation-has-orphaned-a-verified-branch-the-rollback-ordering-invariant-in-branch-and-verif",
  "title": "What structural signals indicate speculative tool-call cancellation has orphaned a verified branch: the rollback-ordering invariant in branch-and-verify multi-agent execution",
  "date_of_record": "2026 November 21",
  "scope": "Applies to orchestrators that execute multiple speculative agent branches concurrently, each branch emitting side-effecting tool calls, then commit one branch and roll back the losers via compensating cancellation. Does not cover single-branch execution, read-only tool surfaces, or systems where tool calls are transactional at the transport layer (e.g., two-phase-commit RPC).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-speculative-tool-call-cancellation-has-orphaned-a-verified-branch-the-rollback-ordering-invariant-in-branch-and-verif.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-speculative-tool-call-cancellation-has-orphaned-a-verified-branch-the-rollback-ordering-invariant-in-branch-and-verif.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-speculative-tool-call-cancellation-has-orphaned-a-verified-branch-the-rollback-ordering-invariant-in-branch-and-verif.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1962,
    "python_slice_tokens": 448,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a speculative branch was cancelled.\" It is a **rollback-ordering inversion**: the verifier commits branch *W* (the winner) and emits cancellation signals to loser branches *L₁…Lₙ*, but a loser's in-flight tool call *completes* after the winner's commit point and its side effect is not idempotently reversible. The distinguishing signal is ...",
    "what_was_observed": "A verifier agent scored three speculative branches exploring a schema migration. Branch B2 (loser) issued a `apply_patch` tool call against a shared working tree; branch B1 (winner) issued `apply_patch` against the same tree. The orchestrator's commit protocol was: 1. Verifier selects winner B1, writes commit intent. 2. Orchestrator broadcasts `cancel` to B2 and B3. 3. Orchestrator awaits `cancel_ack` from each loser...",
    "condition_of_validity": "This failure mode is bounded by three conditions, all of which must hold for the pathology to manifest: 1. **Shared mutable effect surface**: at least two branches can reach the same resource (working tree, KV namespace, remote object, rate-limited API quota) without per-branch isolation. Per-branch sandboxes (copy-on-write trees, namespaced caches) make thi...",
    "decision_boundary": "The operational choice is between two protocols, and the boundary between them is the **loser-tool-call terminality guarantee** offered by the transport: - **Optimistic commit** (dispatch winner immediately, cancel losers in parallel) is valid *only* when the effect surface is partitioned per branch or all loser tool calls are idempotent and base-revision-ch...",
    "operational_effect": "Unmitigated, the effect is **silent post-commit corruption attributed to the winner**: the winning branch's output is wrong, the verifier's score was computed on a pre-corruption snapshot, and the trace shows a clean commit. Downstream agents inherit the corrupted state and their own replay checks (if any) diverge against a baseline that was never valid. Deb..."
  },
  "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": "d7d3e89e00f6d3fe570753d2a67ff467fa4361c172737829eaef867fc98f8e23",
    "verified_classes": [
      "RollbackOrderingViolation",
      "ToolCall",
      "Branch"
    ],
    "verified_functions": [
      "assert_commit_fence",
      "replay_hash"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "RollbackOrderingViolation"
    ],
    "sample_fail_closed_invariants": [
      "speculative commit rejected: rollback-ordering invariant violated; re-run under per-branch isolation or fenced commit"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
