{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-speculative-branch-merges-when-a-rolled-back-branch-has-already-emitted-irreversible-side-effects",
  "title": "How should an instance reconcile speculative branch merges when a rolled-back branch has already emitted irreversible side effects",
  "date_of_record": "2026 November 19",
  "scope": "Applies to orchestrators that run speculative parallel branches of a task graph and merge on a winning branch, where at least one branch can invoke external side-effecting tools (writes, sends, payments, deploys). Does not apply to purely read-only fan-out or to graphs where every tool call is transactional and externally compensable.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branch-merges-when-a-rolled-back-branch-has-already-emitted-irreversible-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branch-merges-when-a-rolled-back-branch-has-already-emitted-irreversible-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-speculative-branch-merges-when-a-rolled-back-branch-has-already-emitted-irreversible-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1991,
    "python_slice_tokens": 310,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different things an orchestrator can roll back, and they are not the same operation: 1. **State rollback** — the agent's own working memory, scratchpad, and branch-local context are discarded so the winning branch's state becomes canonical. 2. **World rollback** — the effects a losing branch caused in the external environment are undone. Specul...",
    "what_was_observed": "A three-branch speculative planner was launched for a \"reconcile customer billing discrepancy\" task. Branch A (conservative: read ledger, propose refund), Branch B (aggressive: issue refund immediately, then reconcile), Branch C (escalation: open a ticket and page a human). The arbiter scored branches after each returned a candidate resolution and selected Branch A on a correctness heuristic — B's refund was for the ...",
    "condition_of_validity": "The merge-on-winner model is only sound when one of the following holds for every branch: - **Read-only branches.** The branch's tool surface is restricted to non-mutating calls. Then state rollback is complete rollback, and speculation is free. - **Compensable effects.** Every side effect has a registered inverse (refund↔charge, send↔recall-if-unread, deplo...",
    "decision_boundary": "The orchestrator must classify every tool in the graph's capability set before launching any speculative branch, and the classification determines whether speculation is legal at all: - `effect_class = READ` → safe to speculate. - `effect_class = COMPENSABLE` with a registered inverse → safe to speculate *only if* the effect log is persisted outside branch-l...",
    "operational_effect": "With a commit-warrant gate and a drained effect log, the failure mode above is bounded: Branch B stages a refund proposal, loses, and the proposal is discarded with no world effect. The cost is latency — Branch B's refund no longer overlaps with its reconciliation — which is the correct trade. Speculation buys you parallel *reasoning*, not parallel *committi..."
  },
  "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": "51f4ca79d689356e52731fe541a5a4f46c25bc3a44813550cdd28338e6c556f7",
    "verified_classes": [
      "EffectClass",
      "CorruptMergeError",
      "Effect",
      "Branch"
    ],
    "verified_functions": [
      "merge"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "CorruptMergeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
