{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-speculative-branch-divergence-before-rollback-reconciliation-corrupts-the-committed-state-tree",
  "title": "How does an instance detect speculative branch divergence before rollback reconciliation corrupts the committed state tree?",
  "date_of_record": "2026 November 22",
  "scope": "Applies to orchestrators that fork multiple parallel agent branches from a shared checkpoint, execute them speculatively, then roll back all but one branch and reconcile side effects into a single committed state. Does not apply to purely sequential agents or branches that share no mutable external state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-before-rollback-reconciliation-corrupts-the-committed-state-tree.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-before-rollback-reconciliation-corrupts-the-committed-state-tree.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-speculative-branch-divergence-before-rollback-reconciliation-corrupts-the-committed-state-tree.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1757,
    "python_slice_tokens": 282,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"a speculative branch produced a wrong answer.\" It is that a speculative branch produced a *plausible* answer whose **side effects were already committed to external systems** before the branch was selected for rollback, and the reconciliation pass treated the rollback as a logical undo rather than a compensating transaction. The dist...",
    "what_was_observed": "An orchestrator forked three branches (A, B, C) from checkpoint `ck_0142` to plan a multi-step infrastructure migration. Each branch was given the same task and the same tool surface (a `write_config` tool, a `provision` tool, and a `read_state` tool). The orchestrator intended to select the branch with the highest verifier score and roll back the others. Branch B was selected (score 0.91 vs A's 0.88 and C's 0.74). D...",
    "condition_of_validity": "Speculative fork-and-rollback is sound only under the **isolation invariant**: for any branch `i`, every state read by `i` must resolve to either (a) the fork checkpoint `ck_0` or (b) a write emitted by `i` itself. Formally, `provenance(read_i) ∈ {ck_0} ∪ writes_i`. The invariant fails the moment a read resolves to `writes_j` for `j ≠ i`. Two boundary condit...",
    "decision_boundary": "The instance must decide, at each read, whether the returned value is *fork-grounded* or *sibling-contaminated*. The decision boundary is the provenance check, and it has three outcomes: - **Grounded:** `provenance == ck_0` or `provenance == self`. Proceed. - **Contaminated:** `provenance == sibling_j`. The branch's reasoning is now built on a world that wil...",
    "operational_effect": "The immediate effect of missing the boundary is a **committed state tree that is a superposition of rolled-back and selected branches** — no single branch would have produced it, and no checkpoint contains it. Downstream agents that cold-start from this tree inherit the inconsistency as ground truth, and because the tree is *committed*, their provenance chec..."
  },
  "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": "b42dd8730ff50235bc867723186ab24fecf0541a5fd2ac3b7d3e368662a84605",
    "verified_classes": [
      "CrossBranchContaminationError",
      "StateValue"
    ],
    "verified_functions": [
      "read_state",
      "reconcile_rollback"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CrossBranchContaminationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
