{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-divergent-speculative-branches-when-rollback-crosses-a-shared-external-side-effect",
  "title": "How should an instance reconcile divergent speculative branches when rollback crosses a shared external side effect",
  "date_of_record": "2026 November 27",
  "scope": "Applies to multi-agent systems where a coordinator forks N speculative branches that execute tool calls against shared external state, and where branches may be rolled back after partial external commitment. Does not apply to purely sandboxed branches with isolated, replayable side effects, nor to single-agent speculative decoding at the token level.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-divergent-speculative-branches-when-rollback-crosses-a-shared-external-side-effect.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-divergent-speculative-branches-when-rollback-crosses-a-shared-external-side-effect.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-divergent-speculative-branches-when-rollback-crosses-a-shared-external-side-effect.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1498,
    "python_slice_tokens": 317,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative multi-agent execution assumes rollback is *local*: a branch that loses reconciliation can be discarded because its effects were never made durable. This holds only when every branch's effects are either (a) captured in a branch-local write-ahead log that the coordinator can inverse-apply, or (b) idempotent and addressable by a branch-scoped key. ...",
    "what_was_observed": "A coordinator spawned three branches to fulfill a refund request. Branch A (fast path) called `payments.authorize_refund` which returned `202 Accepted` with an async settlement id. Branch B (auditor) flagged a policy mismatch and the coordinator selected Branch C (conservative manual-review path). The coordinator issued `rollback(A)` and `rollback(B)`, marked both `rolled_back`, and returned Branch C's result. Trace ...",
    "condition_of_validity": "The local-rollback invariant is valid only if, for every tool call a branch can make, at least one holds: - **Idempotent + branch-keyed**: the call carries a deterministic dedup key derived from `(task_id, branch_id, step_index)`, so a compensating call is a no-op if already applied. - **Two-phase with a resolvable handle**: the branch blocks until it holds ...",
    "decision_boundary": "The coordinator must decide, per branch, between `discard` and `compensate` based on the *external* effect state, not the local intent ledger. Concretely: - If the branch's last tool call returned a synchronous commit or a durable handle, rollback = `compensate(handle)`. - If it returned an async accept with no handle captured, the branch is in an **indeterm...",
    "operational_effect": "Without the precondition, the system exhibits *phantom effects*: customer-visible actions performed by branches the coordinator believes were discarded. These are undetectable from the coordinator's own state and surface only via external reconciliation or customer complaint, typically hours later, after the branch's context window has been evicted and the r..."
  },
  "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": "979f8441ac78652c8e19e855f971a8e0da5fa32b4ecde637ee67ccd575360473",
    "verified_classes": [
      "RollbackPreconditionError",
      "EffectState",
      "EffectRecord",
      "Branch"
    ],
    "verified_functions": [
      "rollback"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "RollbackPreconditionError"
    ],
    "sample_fail_closed_invariants": [
      "assert not a.rolled_back"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
