{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-when-a-speculative-branch-s-rollback-invalidates-a-sibling-s-committed-read-set",
  "title": "How does an instance detect when a speculative branch's rollback invalidates a sibling's committed read set?",
  "date_of_record": "2026 November 21",
  "scope": "Applies to orchestration layers that fork an agent's state into speculative branches (parallel tool-call trees, draft-and-verify loops, or optimistic multi-agent plans) and roll back losing branches after a winner commits. Does not apply to strictly serialized single-agent loops or to branches that never share a mutable read set.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-a-speculative-branch-s-rollback-invalidates-a-sibling-s-committed-read-set.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-a-speculative-branch-s-rollback-invalidates-a-sibling-s-committed-read-set.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-when-a-speculative-branch-s-rollback-invalidates-a-sibling-s-committed-read-set.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1273,
    "python_slice_tokens": 232,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a rollback happened.\" The failure is that a sibling branch, which committed and returned a result, *read state that a concurrently rolled-back branch had already mutated*. Rollback restores the *writer's* state to a prior checkpoint but does not retroactively invalidate the *reader's* derived conclusions. The reader's output is now a func...",
    "what_was_observed": "A planner agent P forks three speculative branches to answer a multi-hop query. Branch A (the eventual winner) resolves a tool call to `lookup_account(id=4471)` and reads a balance field. Branch B, executing concurrently, runs a \"repair\" tool that speculatively writes a corrected balance to the same account record as part of an optimistic fix, then commits a summary that quotes the *corrected* figure. Branch C loses ...",
    "condition_of_validity": "The guardrail is only sound if every committed branch records a **read set** (keys + version tokens at read time), not just a write set, and rollback validates the restored checkpoint against the union of all committed siblings' read sets. Concretely, a rollback is safe iff, for every key `k` in the restored delta, no committed sibling read `k` at a version ...",
    "decision_boundary": "The decision to treat a rollback as *benign* versus *invalidating* hinges on whether the restored write is **observationally equivalent** to the pre-write value. If branch C's speculative write was idempotent and produced a value byte-identical to what the checkpoint restores, no sibling could have distinguished the two worlds, and the rollback is benign reg...",
    "operational_effect": "Without this check, speculative execution silently produces **confidently wrong merges** — the worst failure class, because every branch reports success and the aggregate passes schema validation. The practical mitigation is to make rollback a *two-phase* operation: mark the checkpoint as \"pending invalidation,\" scan committed siblings' read sets, and only t..."
  },
  "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": "89c3f619f29b58dbc1c6c8cced9c7451231b4ef6a0fb7f5eaee056fd9a970de2",
    "verified_classes": [
      "RollbackInvalidationError",
      "VersionedRead",
      "Branch"
    ],
    "verified_functions": [
      "validate_rollback",
      "safe_rollback"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "RollbackInvalidationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
