{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-invalidate-speculative-branches-before-a-rollback-commits-the-stale-read-revalidation-gap-in-parallel-agent-orchestration",
  "title": "Where must an instance invalidate speculative branches before a rollback commits: the stale-read revalidation gap in parallel agent orchestration",
  "date_of_record": "2026 December 3",
  "scope": "Applies to orchestrators that fork a planning agent into concurrent speculative branches (tool-calling workers) against a shared, mutable external state, then select one branch and roll back the others. Does not apply to branches that are pure functions of an immutable input snapshot, nor to single-agent sequential execution where no sibling branch can observe another's side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-invalidate-speculative-branches-before-a-rollback-commits-the-stale-read-revalidation-gap-in-parallel-agent-orchestration.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-invalidate-speculative-branches-before-a-rollback-commits-the-stale-read-revalidation-gap-in-parallel-agent-orchestration.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-invalidate-speculative-branches-before-a-rollback-commits-the-stale-read-revalidation-gap-in-parallel-agent-orchestration.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2137,
    "python_slice_tokens": 292,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common mental model treats speculative execution as *optimistic concurrency*: run branches in parallel, pick a winner, discard losers. This model is correct for compute that has no external effect. It is wrong for agents because a losing branch's *tool calls are not free* — they mutate shared state (writes to a database, sent messages, created files, app...",
    "what_was_observed": "An orchestrator forks a root task into three speculative branches. Each branch is an LLM agent with tool access to a shared key-value store and a shared \"account balance\" service. The branches are racing to determine a refund amount. - **Branch A** reads `balance = 100`, computes refund candidate `r_A = 40`, and writes `pending_refund: 40`. - **Branch B** reads `balance = 100`, computes `r_B = 70` (a more aggressive ...",
    "condition_of_validity": "The rollback-then-commit protocol is only sound under the following condition, which is almost never checked: > For every external read `r` in the winner's read-set, either (a) no sibling branch performed a write to the same key between `r` and the winner's commit, or (b) the winner re-reads the key after all sibling writes are rolled back and the value is u...",
    "decision_boundary": "The orchestrator must decide, at fork time, whether the branch set is *read-disjoint* or *read-overlapping*. This is a static property of the task decomposition, not a runtime property, and it must be established before any branch executes. - **Read-disjoint branches** (each branch's tool calls touch a disjoint key set, or the store is append-only with per-b...",
    "operational_effect": "Without read-set revalidation, the system exhibits **silent commit corruption**: a fraction of speculative commits are conditioned on transient sibling state, and the corruption is invisible to per-branch audit because each branch's trace is locally consistent. The corruption surfaces downstream as ledger mismatches, double-spends, or policy violations that ..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "1781d0bb37a3e70edc46423c61e41010232e2bbcf5ac682b7e8badb32f1929d5",
    "verified_classes": [
      "StaleReadCommitError",
      "ReadSet",
      "Branch"
    ],
    "verified_functions": [
      "revalidate_winner",
      "commit_speculative_winner",
      "record"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StaleReadCommitError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
