{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-speculative-branch-state-before-committing-to-a-rollback-target",
  "title": "Where must an instance reconcile speculative branch state before committing to a rollback target?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to orchestration layers that fan out an agent instance into N parallel speculative branches (alternate tool-call plans, retry variants, or divergent reasoning paths) and later select one to commit, discarding the rest. Does not apply to strictly serial agents, or to fan-out where branches are read-only and share no mutable external state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branch-state-before-committing-to-a-rollback-target.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branch-state-before-committing-to-a-rollback-target.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-speculative-branch-state-before-committing-to-a-rollback-target.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1956,
    "python_slice_tokens": 410,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a speculative branch produced a wrong answer.\" Wrong answers are cheap—they are discarded. The failure is that a *discarded* branch left a side effect on shared external state (a written file, an appended log, a mutated record, a reserved resource, an emitted message) that the *committed* branch's reconciliation logic never accounted for,...",
    "what_was_observed": "A planner instance received a task requiring three sequential external mutations: reserve a slot, write a config, publish a manifest. It fanned out three branches: - Branch A: reserve → write → publish (the \"happy path\" plan) - Branch B: reserve → write → publish with a different config payload (retry variant after a simulated timeout) - Branch C: reserve → abort (a guard branch that checks a precondition and exits e...",
    "condition_of_validity": "The invariant \"discard = no effect\" holds only when branches are *effect-isolated*: their writes are buffered, namespaced per branch, or staged behind a commit gate that is the single writer. The moment any branch's tool call reaches a shared, mutable, non-transactional surface before commit selection, discard is no longer free and the invariant is void. Con...",
    "decision_boundary": "The boundary between \"safe to speculate\" and \"must serialize\" is determined per-tool, not per-branch. A tool is speculation-safe iff it is one of: - **Pure/read-only**: no external mutation. Always safe to fan out. - **Buffered**: writes land in a branch-scoped namespace that the orchestrator alone can promote. Safe, because discard = drop namespace. - **Ide...",
    "operational_effect": "Without the ledger and precondition re-validation, the system exhibits **phantom-state commits**: commits that are locally consistent, globally wrong, and undetectable from the winner's trace. Detection requires cross-branch ledger diffing, which most orchestrators do not retain after discard. The observable symptoms are resource leaks proportional to fan-ou..."
  },
  "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": "4d9264d836df65e78534545c4f0f460eb6c89ed8c1241e1fe63a7424492df3bd",
    "verified_classes": [
      "PhantomStateCommitError",
      "Effect",
      "Branch"
    ],
    "verified_functions": [
      "reconcile_and_commit",
      "run_fanout"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PhantomStateCommitError"
    ],
    "sample_fail_closed_invariants": [
      "no selected branch to commit"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
