{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-divergent-speculative-branches-from-corrupting-the-shared-checkpoint-graph-during-multi-agent-rollback",
  "title": "Which invariants prevent divergent speculative branches from corrupting the shared checkpoint graph during multi-agent rollback",
  "date_of_record": "2026 November 29",
  "scope": "Applies to multi-agent orchestrators that let N peer workers execute speculatively against a shared, versioned checkpoint store and reconcile divergent branches by rollback. Does not apply to single-agent retry loops or to stateless fan-out where each branch writes to an isolated store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-divergent-speculative-branches-from-corrupting-the-shared-checkpoint-graph-during-multi-agent-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-divergent-speculative-branches-from-corrupting-the-shared-checkpoint-graph-during-multi-agent-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-divergent-speculative-branches-from-corrupting-the-shared-checkpoint-graph-during-multi-agent-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1810,
    "python_slice_tokens": 391,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure this record isolates is not \"a branch produced a wrong answer.\" It is that a *speculative branch's rollback* silently reverted a *sibling branch's committed side effect* because both branches were addressing the same checkpoint coordinate. The distinction that matters operationally: a checkpoint is not a snapshot of a value, it is a **coordinate ...",
    "what_was_observed": "A planner agent (P) dispatched three workers (W1, W2, W3) speculatively from checkpoint `c_7`. Each worker was told: \"you may mutate the workspace; if you detect a contract violation, roll back to your fork point.\" All three forked from `c_7` and received the same `parent_id = c_7`. The store recorded three children: `c_7→c_8 (W1)`, `c_7→c_9 (W2)`, `c_7→c_10 (W3)`. W2 failed a schema check on its tool output at step ...",
    "condition_of_validity": "The invariant that must hold is: *a rollback initiated by branch B may only tombstone checkpoints whose ancestry path to the fork point passes exclusively through B's own writes.* Formally, for fork point `f` and rollback target `t`, every node in the tombstone set must satisfy `ancestors(node) ∩ siblings(f) = ∅`. Global-head-rewind violates this whenever `s...",
    "decision_boundary": "The orchestrator must decide, per fork, whether to (a) permit sibling speculation with branch-scoped rollback, or (b) serialize workers so that only one live branch exists at a time. The boundary is the store's ability to answer the ancestry query above in O(depth) without a global lock. - If the store supports per-branch ancestry AND the reconciler hashes c...",
    "operational_effect": "After enforcing the ancestry invariant, the observed failure class disappears: W2's rollback tombstones only `c_9` and its descendants; W1's `c_8` and W3's `c_10` remain live; P's read of W1's artifact succeeds on the first attempt; no re-dispatch, no duplicate. The cost is that the store must carry a `branch_id` on every checkpoint and answer ancestry queri..."
  },
  "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": "0afa5960526be9f40b2bab320921d42dfc25344f45bd286ea0e6c960349de1d6",
    "verified_classes": [
      "UnscopedRollbackError",
      "Checkpoint",
      "SpeculativeStore"
    ],
    "verified_functions": [
      "safe_revert",
      "__init__",
      "__init__",
      "fork",
      "_ancestry",
      "revert_to",
      "reconcile"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "UnscopedRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
