{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-invalidate-a-speculative-checkpoint-when-a-sibling-branch-has-already-committed-the-write-ahead-divergence-ledg",
  "title": "Under what conditions must an instance invalidate a speculative checkpoint when a sibling branch has already committed: the write-ahead divergence ledger invariant",
  "date_of_record": "2026 November 29",
  "scope": "Applies to orchestrators that fan out a plan into parallel agent branches, each branch executing against a shared mutable world (filesystem, database, external API state) under per-branch rollback checkpoints, and where branches may speculatively read state that siblings later mutate. Does not cover single-branch linear execution, read-only fan-out (map/reduce with no side effects), or branches whose effects are fully isolated by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-invalidate-a-speculative-checkpoint-when-a-sibling-branch-has-already-committed-the-write-ahead-divergence-ledg.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-invalidate-a-speculative-checkpoint-when-a-sibling-branch-has-already-committed-the-write-ahead-divergence-ledg.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-invalidate-a-speculative-checkpoint-when-a-sibling-branch-has-already-committed-the-write-ahead-divergence-ledg.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1877,
    "python_slice_tokens": 322,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a parallel branch was rolled back.\" Rollback of a self-contained branch is a solved, local operation: restore the checkpoint delta, discard the branch's token budget, mark the branch failed. The non-obvious failure is **rollback of a branch that was a speculative *reader* of state another branch has since committed**. When branch A execut...",
    "what_was_observed": "A four-branch planning swarm: branch `B1` (schema migration), `B2` (API contract update), `B3` (consumer refactor), `B4` (integration test author). All four fork from checkpoint `C0`. Each branch takes a checkpoint before its first write (`C1`…`C4`) to enable speculative rollback if its plan diverges. Sequence observed in the trace: 1. `B1` begins. It reads the current schema at `t0`, plans a column rename, and takes...",
    "condition_of_validity": "A speculative checkpoint `Ck` for branch `k` remains a valid rollback target **iff** every entry in `k`'s recorded read-set that was consumed *after* the fork point is still present, unmodified, in the committed world at restore time. Formally: let `R_k` be the read-set captured between fork and `Ck`, and `W_committed(t)` be the set of writes committed by al...",
    "decision_boundary": "The orchestrator must distinguish three restore decisions, and the boundary between them is the read-set/write-set intersection: - **Restore-and-resume** (checkpoint valid, `R_k ∩ W_committed = ∅`): the branch's premises hold; resume from `Ck`. This is the common case and the one most orchestrators over-apply. - **Invalidate-and-refork** (checkpoint invalid,...",
    "operational_effect": "Without the read-set intersection check, speculative parallel execution degrades into a **silent correctness hazard**: branches that \"succeed\" after a rollback may have committed writes derived from premises a sibling already invalidated. In the trace, had `B3`'s compile not failed — say the rename were backward-compatible — `B3` would have committed a refac..."
  },
  "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": "bcd8db9c3d922915a7c9aea6ffdf1a7d1ed84a671933315989e7587bb396fec1",
    "verified_classes": [
      "StaleCheckpointError",
      "Commit",
      "Checkpoint",
      "DivergenceLedger"
    ],
    "verified_functions": [
      "restore_checkpoint",
      "orchestrate_rollback",
      "__init__",
      "record_commit",
      "committed_since"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "StaleCheckpointError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
