{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-speculative-branch-commits-before-rollback-and-what-breaks-when-it-does-not",
  "title": "Where must an instance reconcile speculative branch commits before rollback, and what breaks when it does not",
  "date_of_record": "2026 December 1",
  "scope": "Applies to orchestrators that fan out one logical task into N parallel agent branches executed speculatively against shared external state (filesystems, databases, APIs, message queues) and commit whichever branch first satisfies a verifier, discarding the rest. Does not apply to branches executed against disjoint, copy-on-write sandboxes with no side-effecting tool calls, nor to purely read-only fan-out.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branch-commits-before-rollback-and-what-breaks-when-it-does-not.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branch-commits-before-rollback-and-what-breaks-when-it-does-not.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branch-commits-before-rollback-and-what-breaks-when-it-does-not.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2405,
    "python_slice_tokens": 517,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *speculative state* (side effects produced by a branch that has not yet won the verifier) and *committed state* (side effects attributable to the branch the orchestrator has selected). Most fan-out frameworks treat branch isolation as a property of the *reasoning* layer—each branch gets its own context window, its own ...",
    "what_was_observed": "A three-branch fan-out over a code-migration task. Each branch was given the same objective (migrate a schema file and update three call sites), the same tool surface (`write_file`, `run_migration`, `post_comment`), and an independent context. Branch A completed first and its verifier passed at t=41.2s. The orchestrator froze the effect-set at t=41.2s, selected A, and issued `cancel()` to B and C. Branch B was mid-`r...",
    "condition_of_validity": "The reconciliation invariant holds only under the following conditions, and the orchestrator must *check* them rather than assume them: 1. **Effect-set freeze is causally prior to cancellation.** The orchestrator must freeze the reconciliation set and *then* cancel losers. If it cancels first and freezes after, in-flight effects land in the freeze window and...",
    "decision_boundary": "The decision the orchestrator faces at selection time is whether to reconcile *eagerly* (freeze, cancel, wait for acknowledgement, sweep, then commit) or *lazily* (commit the winner, let losers drain in the background, reconcile on a timer). Eager reconciliation bounds the orphan window to the acknowledgement latency of the slowest losing branch—typically te...",
    "operational_effect": "The operational consequence is that fan-out orchestrators must maintain a *cancellation ledger* separate from the branch transcripts: a durable, append-only record of (branch_id, epoch, tool_call_id, effect_descriptor, status) that survives transcript garbage collection. The ledger is what the reconciler reads. When a branch is cancelled, its transcript may ..."
  },
  "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": "262488d77b34473636792d4a982d798b5692a2dad42ea3d8e09fa7c2ceff0235",
    "verified_classes": [
      "ReconciliationError",
      "EffectStatus",
      "LedgerEntry",
      "CancellationLedger"
    ],
    "verified_functions": [
      "reconcile",
      "record_call",
      "mark_landed",
      "begin_cancellation_wave"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ReconciliationError"
    ],
    "sample_fail_closed_invariants": [
      "non-interruptible tools require a positive acknowledgement deadline; lazy reconciliation is unsound for this branch surf"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
