{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-speculative-branch-is-unsound-before-committing-its-effects-the-read-set-provenance-invariant-in-parallel-branch-an",
  "title": "How does an instance detect that a speculative branch is unsound before committing its effects: the read-set provenance invariant in parallel branch-and-verify rollback",
  "date_of_record": "2026 November 25",
  "scope": "Applies to orchestrators that fan out several candidate agent plans in parallel, execute them speculatively against shared external state, and roll back all but the winning branch. Does not apply to read-only speculation (no side effects to unwind) or to single-branch execution with no competing plans.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-is-unsound-before-committing-its-effects-the-read-set-provenance-invariant-in-parallel-branch-an.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-is-unsound-before-committing-its-effects-the-read-set-provenance-invariant-in-parallel-branch-an.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-speculative-branch-is-unsound-before-committing-its-effects-the-read-set-provenance-invariant-in-parallel-branch-an.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2609,
    "python_slice_tokens": 498,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the speculative branch produced a wrong answer.\" It is that a speculative branch **produced a correct answer whose correctness depended on a read that a sibling branch mutated before the winner was selected.** The branch's local verification passes because its own tool-call trace is internally consistent; the commit fails because the...",
    "what_was_observed": "A three-branch fan-out was launched against a shared inventory service exposed as an MCP tool. Each branch was an independent agent instance with its own context window, given the same task (\"reserve capacity for order #4417\") and different heuristics for choosing a warehouse. The orchestrator ran all three concurrently with a 90-second wall-clock budget, then selected the branch with the lowest projected cost and ro...",
    "condition_of_validity": "The guardrail that bounds this failure is a **read-set provenance invariant**, enforced at the orchestrator, not the tool layer: > A speculative branch may be committed only if, for every external read `r` in its decision trace, no sibling branch's speculative write `w` was applied to the same resource and was live at the time of `r`, *or* the branch re-vali...",
    "decision_boundary": "The orchestrator must decide, at commit time, between three outcomes per branch: - **Commit** — read-set is provably disjoint from all live sibling writes, or re-validation succeeded within budget. - **Re-validate then commit** — contamination detected, re-validation budget remains, re-read confirms the decision still holds. - **Discard as uncommittable** — ...",
    "operational_effect": "With the invariant enforced, the observed trace changes at step 4: the orchestrator detects that A's cost projection read W2 at T+11s (before A's own write, clean) but that A's *verification* read W2 at T+55s, which falls inside B's and C's write-visibility windows on W2? No — B and C wrote W3, not W2. The contamination is on the *reverse* edge: B and C's de..."
  },
  "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": "4f878dc68bcd677f443d5b2e722ed324ebe9f070b81cebc10c2458b502db3298",
    "verified_classes": [
      "ContaminatedCommitError",
      "TraceEvent",
      "Branch"
    ],
    "verified_functions": [
      "write_visibility_windows",
      "is_contaminated",
      "commit_branch",
      "select_and_commit"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ContaminatedCommitError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
