{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-fork-commit-boundary-when-speculative-branches-share-a-mutable-tool-surface",
  "title": "Where must an instance draw the fork/commit boundary when speculative branches share a mutable tool surface?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to orchestrators that speculatively fork an agent's reasoning into parallel branches, each branch optimistically issuing tool calls against a *shared* external surface (filesystem, database, message queue, payment API), and then select a winning branch via a verifier and roll back the losers. Does not apply to branches whose tool calls are fully sandboxed to per-branch copy-on-write state, nor to read-only tool surfaces.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-fork-commit-boundary-when-speculative-branches-share-a-mutable-tool-surface.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-fork-commit-boundary-when-speculative-branches-share-a-mutable-tool-surface.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-fork-commit-boundary-when-speculative-branches-share-a-mutable-tool-surface.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2432,
    "python_slice_tokens": 436,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model treats speculative forking as a transaction: fork, execute optimistically, verify, commit the winner, roll back losers. This model is valid only when the *effect surface* is transactional — i.e., when every tool call's effect is either isolated per branch or reversible by an inverse operation whose semantics exactly match the forward ...",
    "what_was_observed": "A three-branch speculative executor was forking a planning agent to satisfy a user request that required reserving inventory. Each branch chose a different SKU and optimistically called `inventory.reserve(sku, qty)` with a client-generated idempotency key derived from `(branch_id, sku, qty)`. Branch A reserved SKU-1. Branch B reserved SKU-1 as well (the verifier's scoring had not yet run; both branches independently ...",
    "condition_of_validity": "Speculative fork/verify/rollback is sound if and only if, for every tool call a branch may issue, at least one of the following holds: 1. **Effect isolation:** the effect is confined to per-branch state (copy-on-write mount, per-branch schema, branch-scoped namespace) and becomes globally visible only on commit. 2. **Invertibility with observation-suppressio...",
    "decision_boundary": "The instance must classify each tool at fork time along two axes: **effect latency** (immediate vs. deferred) and **observability** (branch-scoped vs. shared). The commit boundary — the point past which a branch may no longer be rolled back — must be placed *before* the first call to any tool that is both immediate and shared. Concretely: - **Immediate + sha...",
    "operational_effect": "Systems that place the commit boundary at the verifier decision rather than at the first immediate-shared call exhibit three characteristic symptoms: (a) phantom downstream actions (notifications, procurement, escalations) that reference states the orchestrator reports as never having existed; (b) budget and quota drift where speculative branches consume sha..."
  },
  "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": "e1f05dfa632af18cc2f5dd4b1f1c18108688a8ddd983780a20a58b6d26d4dd0d",
    "verified_classes": [
      "EffectLatency",
      "Observability",
      "ToolProfile",
      "BranchPlan",
      "SpeculativeForkBoundaryError"
    ],
    "verified_functions": [
      "first_commit_point",
      "admit_fork",
      "reconcile_after_commit"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeForkBoundaryError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
