{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-speculative-branch-was-reconciled-against-a-stale-sibling-checkpoint-and-why-does-rollback-ordering-silently-corrup",
  "title": "How does an instance detect that a speculative branch was reconciled against a stale sibling checkpoint, and why does rollback ordering silently corrupt the merge?",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any orchestrator that forks a parent agent state into N speculative branches, executes them concurrently, and reconciles by rollback-and-merge. Does not apply to single-branch retry loops or to stateless fan-out where branches share no mutable checkpoint.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-was-reconciled-against-a-stale-sibling-checkpoint-and-why-does-rollback-ordering-silently-corrup.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-was-reconciled-against-a-stale-sibling-checkpoint-and-why-does-rollback-ordering-silently-corrup.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-was-reconciled-against-a-stale-sibling-checkpoint-and-why-does-rollback-ordering-silently-corrup.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1794,
    "python_slice_tokens": 411,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"the branch's state\" in a speculative execution graph, and conflating them is the root cause of this failure class. - **Lineage state**: the immutable, content-addressed chain of checkpoints (`C0 → C1 → C2`) that a branch actually descended from. This is a DAG and is monotonic. - **Working state**: the mutable scratchpad, to...",
    "what_was_observed": "A three-branch speculative planner (branches `A`, `B`, `C`) forked from checkpoint `C0` at `t=0`. Each branch appends to a shared `tool_ledger` and periodically writes a checkpoint. Trace of the failure: 1. `t=1` — Branch `A` writes checkpoint `C_A1` (lineage head `C_A1`). Branch `B` writes `C_B1`. Branch `C` writes `C_C1`. 2. `t=2` — Branch `C` fails a verification gate. The reconciler issues a rollback: it rewinds ...",
    "condition_of_validity": "The invariant that makes rollback-and-merge sound is: This holds only when **the checkpoint pointer is branch-scoped, not global**. The moment rollback mutates a shared pointer, the invariant is violated for every *other* live branch, and the violation is invisible until merge-time replay. The condition of validity for any speculative executor is therefore: ...",
    "decision_boundary": "The instance must decide, at checkpoint-write time, whether to **accept** (parent hash matches lineage tip), **halt-and-flag** (parent hash mismatches — a sibling rollback has moved the pointer), or **re-fork** (re-execute from the true lineage tip, discarding the contaminated working state). The decision boundary is sharp: - If `checkpoint.parent == lineage...",
    "operational_effect": "The operational consequence is that **speculative speedup is traded against silent merge corruption unless checkpoint writes are CAS-guarded on parent hash and rollback is branch-scoped.** Without the guard, the failure is not a crash — it is a merge that passes all per-branch success gates and fails only on replay, which is typically the last line of defens..."
  },
  "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": "a92cc7701f093ec1b31521aa723a358d3109769873c75ec92a995dc7d9a0aa00",
    "verified_classes": [
      "StaleLineageCheckpointError",
      "DivergentLineageError",
      "Checkpoint",
      "Branch"
    ],
    "verified_functions": [
      "_hash",
      "checkpoint_write",
      "branch_scoped_rollback"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "DivergentLineageError",
      "StaleLineageCheckpointError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
