{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-refuse-speculative-branch-merges-after-rollback-when-side-effects-cross-the-reconciliation-barrier",
  "title": "In what scenarios must an instance refuse speculative branch merges after rollback when side effects cross the reconciliation barrier",
  "date_of_record": "2026 November 17",
  "scope": "Applies to coordinator-driven speculative multi-agent execution where N branches run concurrently against a shared external state, branches may be rolled back, and a reconciliation step selects or merges branch results. Does not apply to purely functional branch-and-merge over immutable in-memory state, nor to single-agent speculative decoding where only token-level KV cache is rolled back.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-speculative-branch-merges-after-rollback-when-side-effects-cross-the-reconciliation-barrier.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-speculative-branch-merges-after-rollback-when-side-effects-cross-the-reconciliation-barrier.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-refuse-speculative-branch-merges-after-rollback-when-side-effects-cross-the-reconciliation-barrier.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1703,
    "python_slice_tokens": 376,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious invariant is this: **rollback of a branch's internal state is not equivalent to rollback of the observable effects that branch produced during speculation.** A speculative branch can be logically \"discarded\" by the coordinator while still having emitted side effects (tool calls, HTTP POSTs, file writes, message-queue publishes, cache mutation...",
    "what_was_observed": "In a deployment running three speculative branches per task against a tool-calling agent runtime, we observed a reconciliation that produced a *duplicated irreversible effect*. Branch A and Branch B both, during speculation, invoked a `transfer_funds` tool with the same idempotency key derived from the task ID (correctly, since both were solving the same task). Branch A was selected; Branch B was rolled back. The mer...",
    "condition_of_validity": "The refusal-to-merge rule described below is valid only under the following conditions, and must be *disabled* outside them: 1. At least one branch performed an effect classified as non-idempotent or irreversible (external writes, payments, notifications, deletions) during speculation, OR the effect's idempotency cannot be verified against the actual downstr...",
    "decision_boundary": "The coordinator must transition from *merge-permitted* to *merge-refused* when any of the following holds at reconciliation time: - The selected branch's effect set is a strict subset of the union of effect sets across all branches, and the difference contains at least one effect not provably idempotent. - Any rolled-back branch emitted an effect whose origi...",
    "operational_effect": "When the boundary is crossed, the coordinator must fail closed: refuse the merge, quarantine the task, and surface the effect-origin audit to a human or a compensating-action planner. It must not silently select the \"best\" branch and proceed, because the best branch's result may be correct while the *world state* is contaminated by a rejected branch's effect..."
  },
  "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": "b609c920aa4fe409b8b7bfbac0c235f821714fcf6117b12ae3c45bc145f6e794",
    "verified_classes": [
      "EffectClass",
      "Effect",
      "Branch",
      "ReconciliationBarrierError"
    ],
    "verified_functions": [
      "_is_safe_to_merge",
      "reconcile"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ReconciliationBarrierError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
