{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-speculative-branch-rollback-as-unsafe-when-a-parallel-branch-has-already-committed-a-non-idempotent-tool",
  "title": "Under what conditions must an instance treat speculative branch rollback as unsafe when a parallel branch has already committed a non-idempotent tool side effect",
  "date_of_record": "2026 November 21",
  "scope": "Applies to orchestrators that fan out multiple speculative agent branches from a shared checkpoint, permit each branch to issue tool calls through a shared connector layer, and later select one branch as canonical while rolling back the rest. Does not apply to branches operating under strict read-only tool allowlists or to sandboxes whose tool effects are transactionally isolated per branch.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-speculative-branch-rollback-as-unsafe-when-a-parallel-branch-has-already-committed-a-non-idempotent-tool.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-speculative-branch-rollback-as-unsafe-when-a-parallel-branch-has-already-committed-a-non-idempotent-tool.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-speculative-branch-rollback-as-unsafe-when-a-parallel-branch-has-already-committed-a-non-idempotent-tool.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2259,
    "python_slice_tokens": 612,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between *speculative state* and *committed effect*. A speculative branch's internal reasoning trace, scratchpad, and even its writes to a private branch-local memory namespace are all reversible: the orchestrator can discard them by dropping the branch and restoring the pre-fan-out checkpoint. But a tool call that crosses...",
    "what_was_observed": "A support-triage orchestrator fanned out three branches from a shared checkpoint to draft a resolution for a billing dispute. Branch A proposed issuing a refund via `billing.issue_refund`; Branch B proposed a credit memo via `billing.create_credit`; Branch C proposed escalation via `ticketing.create_escalation`. Each branch was permitted to call tools during speculation so that the scorer could evaluate proposals aga...",
    "condition_of_validity": "Speculative rollback is safe for a given branch if and only if, for every tool call the branch issued during speculation, at least one of the following holds: 1. **Deferred visibility.** The connector buffers the effect and exposes it externally only after the orchestrator commits the branch (a two-phase commit keyed to branch identity). The buffer is itself...",
    "decision_boundary": "The orchestrator must decide, per branch and per tool call, whether the call is *speculation-safe*. The boundary is drawn at the connector, not at the branch: the branch's reasoning cannot be trusted to know whether its own tool call was reversible, because the branch has no visibility into the orchestrator's rollback model and will happily treat a successfu...",
    "operational_effect": "When the boundary is respected, fan-out width is bounded by the cost of deferred calls rather than by the risk of duplicate effects, and branch selection becomes a genuine choice among proposals rather than a race to see whose side effects land first. When it is violated, the orchestrator silently produces multi-effect resolutions: the customer-visible outco..."
  },
  "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": "09c1a5df1b822ae88aa2d2e73a7750b395c9cd99478cb053262e47bf57f223d4",
    "verified_classes": [
      "SpeculationSafetyError",
      "Visibility",
      "Reversibility",
      "ToolSpec",
      "Branch",
      "SpeculativeConnector"
    ],
    "verified_functions": [
      "rollback_branch",
      "__init__",
      "is_speculation_safe",
      "invoke",
      "_execute"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculationSafetyError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
