{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-fence-speculative-tool-calls-before-rollback-reconciliation-and-what-breaks-if-it-doesn-t",
  "title": "When must an instance fence speculative tool calls before rollback reconciliation, and what breaks if it doesn't",
  "date_of_record": "2026 November 22",
  "scope": "Applies to any multi-agent system where a coordinator forks sibling speculative branches (each with tool-call authority) that may be rolled back and reconciled against a committed lineage. Does not apply to strictly sequential single-agent execution or to branches whose tools are pure/read-only and side-effect-free by contract.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-fence-speculative-tool-calls-before-rollback-reconciliation-and-what-breaks-if-it-doesn-t.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-fence-speculative-tool-calls-before-rollback-reconciliation-and-what-breaks-if-it-doesn-t.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-fence-speculative-tool-calls-before-rollback-reconciliation-and-what-breaks-if-it-doesn-t.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2139,
    "python_slice_tokens": 499,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a speculative branch made a wrong tool call.\" It is that a speculative branch's **tool-call effect** can outlive the **branch's logical rollback** because the effect was dispatched to an external system that has no knowledge of the branch's lifecycle. Rollback in the orchestrator is a *state-tree* operation: it truncates the branch's mess...",
    "what_was_observed": "A coordinator spawned three speculative branches to answer a single user request requiring a database mutation (`reserve_inventory`) and a downstream confirmation. Branch A and Branch B both selected `reserve_inventory(sku=4471, qty=2)` as their plan's first action; Branch C selected a read-only path. The coordinator's reconciliation policy was \"first branch to return a passing verification wins; abandon the rest.\" T...",
    "condition_of_validity": "The fencing invariant holds only when all three of the following are true simultaneously: - **Epoch binding at the tool boundary.** Every tool request carries the issuing branch's `(branch_id, epoch)`, and the gateway rejects (or quarantines) any commit whose branch is not in the coordinator's *live* set at commit time. This requires the gateway to consult c...",
    "decision_boundary": "The boundary is: **does the branch's tool effect have a linearization point that can occur after the branch's abandonment decision?** - If the tool is **synchronous and committed before the branch can be abandoned** (e.g., a read that returns within the branch's own execution step, with no post-return side effect), rollback-by-context-truncation is sufficien...",
    "operational_effect": "Without the fence, speculative execution silently violates the system's most basic invariant — that the committed world-state equals the sum of committed branch effects — and the violation is *unobservable from within the lineage* because the orphaned effect lives in a discarded context. Downstream agents inherit a world-state that is ahead of their beliefs,..."
  },
  "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": "0dd4efbf33a265748f38cef29167b6cc6b6c0b5664549dc605ad90faf2c273f3",
    "verified_classes": [
      "SpeculativeFenceViolation",
      "ToolEffect",
      "FencedToolGateway"
    ],
    "verified_functions": [
      "reconcile",
      "__init__",
      "register_branch",
      "dispatch",
      "commit",
      "abandon",
      "_apply_compensation"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculativeFenceViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
