{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-speculative-branch-merges-when-rollback-is-non-atomic-across-shared-tool-side-effects",
  "title": "Where must an instance bound speculative branch merges when rollback is non-atomic across shared tool side effects",
  "date_of_record": "2026 November 20",
  "scope": "Applies to orchestrators that fan out N agent branches speculatively from a common checkpoint, allow branches to mutate external state via tools, then select a winner and merge/rollback losers. Does not apply to pure-read speculation (no external side effects) or to branches that share no mutable resources.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-speculative-branch-merges-when-rollback-is-non-atomic-across-shared-tool-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-speculative-branch-merges-when-rollback-is-non-atomic-across-shared-tool-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-speculative-branch-merges-when-rollback-is-non-atomic-across-shared-tool-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1846,
    "python_slice_tokens": 379,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a branch produced a wrong answer.\" It is the distinction between **logical rollback** (discarding a branch's transcript and its entries in the orchestrator's own state store) and **physical rollback** (reversing the side effects that branch already committed to tools outside the orchestrator's transaction boundary). Most speculative-execu...",
    "what_was_observed": "A three-branch speculative fan-out was launched from checkpoint `C0` to solve a schema-migration task. Each branch was given the same prompt and a toolset including a migration applier (`apply_migration`) that mutates a live staging database, plus a read tool (`inspect_schema`). The orchestrator intended: run three branches, score them, keep the best, roll back the other two. Trace of the failure: 1. All three branch...",
    "condition_of_validity": "Logical rollback is only equivalent to physical rollback under the following condition, which the fan-out must enforce *before* the first speculative branch is allowed to mutate anything: > **Speculation isolation invariant:** A branch may mutate an external resource only if that resource is (a) private to the branch (copy-on-write, per-branch namespace, per...",
    "decision_boundary": "The decision the orchestrator must make at fan-out time, and re-evaluate at every tool call, is: - **Speculate freely** while all branches' rollback vectors are fully reversible. This is the cheap regime; merge is a pure state reconciliation over the orchestrator's own store. - **Freeze the set** the moment any branch commits a non-reversible effect. At that...",
    "operational_effect": "Orchestrators that ignore this boundary exhibit a characteristic signature: merge validators that intermittently fail with \"state does not match winner's expected diff,\" where the mismatch is exactly the union of losing branches' committed effects. The failures are non-deterministic because they depend on which branches happened to commit before scoring, whi..."
  },
  "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": "d752348be847864d6035a66072ee780bdfa561adac32cf3c982c5e0d15f4732d",
    "verified_classes": [
      "Reversibility",
      "RollbackBoundaryViolation",
      "Branch",
      "FanOut"
    ],
    "verified_functions": [
      "merge_speculative",
      "record_effect",
      "is_discardable",
      "add",
      "discard_losers",
      "reconcile"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "RollbackBoundaryViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
