{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-speculative-branch-s-rollback-target-has-been-invalidated-by-a-concurrent-sibling-s-committed-write",
  "title": "How does an instance detect that a speculative branch's rollback target has been invalidated by a concurrent sibling's committed write",
  "date_of_record": "2026 November 25",
  "scope": "Applies to orchestrators that run speculative subgoal branches in parallel against a shared, versioned working memory (scratchpad, tool-state store, or artifact tree) and roll back divergent branches to a pre-branch checkpoint. Does not apply to fully isolated branch sandboxes with copy-on-write from a frozen base, where rollback targets cannot be mutated by siblings.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-s-rollback-target-has-been-invalidated-by-a-concurrent-sibling-s-committed-write.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-s-rollback-target-has-been-invalidated-by-a-concurrent-sibling-s-committed-write.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-s-rollback-target-has-been-invalidated-by-a-concurrent-sibling-s-committed-write.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1787,
    "python_slice_tokens": 225,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"a branch diverged\" — divergence is expected and is the whole point of speculation. The failure is that a branch's **rollback target** (the checkpoint it intends to restore to when it loses or aborts) was captured against a memory version that a concurrent sibling has since **advanced past** by committing a write. Rollback then either...",
    "what_was_observed": "A planner decomposed a task into subgoals S1, S2, S3. The orchestrator speculated two branches for S2 — `S2-a` (preferred, low-confidence) and `S2-b` (fallback) — and ran them concurrently. Each branch, at spawn, recorded `rollback_checkpoint = memory.head.version` (say v41) so it could discard its own partial writes on abort. S1 had already committed at v41. While both S2 branches ran, a **third** speculative branch...",
    "condition_of_validity": "A checkpoint `C` captured by branch `B` at memory version `v` remains a valid rollback target for `B` if and only if, at the moment `B` rolls back: - `memory.head.version == v`, **or** - every commit in `(v, memory.head.version]` is *independent* of `B`'s speculative writes — i.e., no committed delta touches the namespace `B` mutated, and no committed delta'...",
    "decision_boundary": "When a branch decides to roll back, it must choose among three actions based on rollback-target liveness, not on divergence status: - **Target live (head == v, or all intervening commits independent):** whole-namespace or delta revert is safe. Proceed. - **Target stale-invalid, branch writes are delta-isolable:** perform a *scoped undo* — revert only the bra...",
    "operational_effect": "The immediate effect is silent work loss disguised as a clean abort: the losing branch reports success at \"rolled back to checkpoint,\" the orchestrator logs no error, and the corruption surfaces only as a downstream subgoal that mysteriously cannot find its input. Because the corruption is a *deletion*, not a *mismatch*, no version-conflict detector fires — ..."
  },
  "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": "b7954626df97d6bccddaaffebce64465d8291a3fe9611bdbc7d5601ef7bef76a",
    "verified_classes": [
      "StaleRollbackTarget",
      "Commit",
      "Branch"
    ],
    "verified_functions": [
      "assert_rollback_valid",
      "rollback"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "StaleRollbackTarget"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
