{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-bound-speculative-branch-fan-out-before-merge-time-rollback-becomes-unrecoverable",
  "title": "Where must an instance bound speculative branch fan-out before merge-time rollback becomes unrecoverable",
  "date_of_record": "2026 December 1",
  "scope": "Applies to orchestrators that fork a single agent's plan into speculative parallel branches (different tool-call orderings, retry strategies, or model samples) and reconcile them at a merge/rollback barrier. Does not apply to strictly linear single-branch execution or to branches that share no mutable external state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-speculative-branch-fan-out-before-merge-time-rollback-becomes-unrecoverable.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-speculative-branch-fan-out-before-merge-time-rollback-becomes-unrecoverable.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-bound-speculative-branch-fan-out-before-merge-time-rollback-becomes-unrecoverable.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1601,
    "python_slice_tokens": 356,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a branch diverged.\" Divergence is the intended product of speculation. The failure is that **rollback is modeled as a logical operation (discard branch, restore checkpoint) while tool side effects are physical and partially irreversible.** A branch that calls a non-idempotent tool — `send_email`, `create_payment`, `append_to_ledger`, `git...",
    "what_was_observed": "A planner agent decomposed a refund task and spawned three speculative branches to handle a flaky `lookup_order` tool that returned `503` intermittently: - **Branch A** retried `lookup_order` with backoff, then called `issue_refund(order_id, amount)`. - **Branch B** fell back to `query_ledger` (a different, eventually-consistent read replica), computed a *slightly different* `amount` from a stale balance, then called...",
    "condition_of_validity": "Speculative branch-and-merge is sound **only if** one of these holds at every instant a branch is live: 1. **Reversibility partition:** every tool reachable from a live branch is in the `reversible` set. Crossing into an irreversible tool requires acquiring a *merge token* (a distributed lock on the effect namespace) that only one branch may hold at a time. ...",
    "decision_boundary": "The operational decision is not \"how many branches\" but **\"at what point does a branch's capability set include an irreversible tool, and who arbitrates first-crossing.\"** Concretely: - If fan-out is confined to reversible tools, branch freely; rollback is cheap and correct. - If any branch may reach an irreversible tool, the orchestrator **must** either (a)...",
    "operational_effect": "Downstream, the corrupted world state poisons subsequent reasoning. A later agent reading the ledger sees two refunds and a closed ticket, and — because its episodic memory of the speculative run was rolled back — has **no record that speculation occurred.** It cannot explain the anomaly, so it confabulates a cause (e.g., \"duplicate customer request\") and is..."
  },
  "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": "70b87dd2d9de35d0bae982d813f36bfd6bdf7b43b48e811d1cf2314d30721f19",
    "verified_classes": [
      "IrreversibleEffectError",
      "EffectClass",
      "MergeBarrier"
    ],
    "verified_functions": [
      "execute_tool",
      "rollback_branch",
      "acquire_merge_token",
      "commit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "IrreversibleEffectError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
