{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-speculative-branch-has-silently-diverged-from-its-rollback-checkpoint-after-a-verifier-approved-merge",
  "title": "How does an instance detect that a speculative branch has silently diverged from its rollback checkpoint after a verifier-approved merge?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to orchestrators that run parallel speculative rollouts against a shared, checkpointed state and merge branches only after a verifier agent returns an approval. Does not apply to single-branch linear execution or to systems where every branch runs on an isolated immutable snapshot with no shared post-merge state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-has-silently-diverged-from-its-rollback-checkpoint-after-a-verifier-approved-merge.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-has-silently-diverged-from-its-rollback-checkpoint-after-a-verifier-approved-merge.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-has-silently-diverged-from-its-rollback-checkpoint-after-a-verifier-approved-merge.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1522,
    "python_slice_tokens": 283,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the verifier approved a bad branch.\" The failure is that the verifier approved a branch whose *replay* no longer reproduces the branch's own committed effects, because the checkpoint it merged against had drifted underneath it. Speculative execution assumes a clean invariant: a branch's committed delta, applied to the checkpoint it was fo...",
    "what_was_observed": "A three-way speculative rollout: branch `A` and branch `B` fork from checkpoint `C0`. Branch `A` reads `config.timeout=30` and produces a tool-call plan that hardcodes `30` into a downstream retry envelope. Branch `B` writes `config.timeout=60` and commits it to `C1`. Branch `A` finishes and its delta is `{plan: {...retry: 30...}}`. The verifier for `A` runs against `C0`, confirms the plan is internally consistent (3...",
    "condition_of_validity": "The invariant \"committed branch delta + base checkpoint = branch terminal state\" holds only when the branch is *read-write isolated* from every sibling on every key in its read-set for the branch's entire lifetime. Under optimistic concurrency, this is guaranteed by conflict detection at merge time: reject the merge if `write_set(A) ∩ write_set(B) ≠ ∅` **or*...",
    "decision_boundary": "The boundary is not \"did the branch succeed\" but \"is the branch's success *transferable* to the current checkpoint.\" Two conditions force a rollback-and-replay rather than a merge: 1. **Read-set contamination:** `read_set(A) ∩ write_set(siblings committed since fork) ≠ ∅`. The branch's reasoning depended on values that changed. Replay `A` from the current he...",
    "operational_effect": "The practical effect is a class of bug that survives every existing check: valid signature, successful verifier run, clean merge log, coherent-looking output, and a state that no participant ever reasoned about. It surfaces later as \"the agent did the right thing given what it saw, but what it saw was already false.\" Debugging it requires reconstructing the ..."
  },
  "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": "6963b5721908af08655c5d97aab221d1f428c58b179902f4699f785b11b9e299",
    "verified_classes": [
      "StaleBranchMergeError",
      "Branch",
      "Attestation"
    ],
    "verified_functions": [
      "checkpoint_hash",
      "merge_speculative_branch"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StaleBranchMergeError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
