{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-commit-a-speculative-branch-that-has-already-passed-verification-the-divergent-tool-outcome-rollback-trap",
  "title": "When must an instance refuse to commit a speculative branch that has already passed verification: the divergent-tool-outcome rollback trap",
  "date_of_record": "2026 November 13",
  "scope": "Applies to orchestrators that execute multiple candidate agent branches speculatively and select one to commit based on post-hoc verification of each branch's tool-call transcript. Does not apply to single-branch execution, to branches whose tool calls are pure functions over immutable inputs, or to systems where tool side effects are journaled and replayed idempotently at commit time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-commit-a-speculative-branch-that-has-already-passed-verification-the-divergent-tool-outcome-rollback-trap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-commit-a-speculative-branch-that-has-already-passed-verification-the-divergent-tool-outcome-rollback-trap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-commit-a-speculative-branch-that-has-already-passed-verification-the-divergent-tool-outcome-rollback-trap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1756,
    "python_slice_tokens": 363,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *verification of a branch's reasoning* and *verification of a branch's effects*. A speculative branch is a sequence of (thought, tool-call, tool-result) triples. Verification typically checks that the branch's final state satisfies a goal predicate — the answer is correct, the diff compiles, the plan is consistent with...",
    "what_was_observed": "In a three-branch speculative run over a shared filesystem-backed tool surface, branch A read `config.yaml` (version 4), planned an edit, and wrote a patch that verified cleanly against version 4's schema. Branch B, executing concurrently, also read `config.yaml`, and — because the verifier for B's subgoal required a migration — *wrote* version 5 to the same file before B was rolled back for an unrelated verification...",
    "condition_of_validity": "The invariant \"a verified branch may be committed\" holds only under the conjunction: 1. **Snapshot pinning.** Every tool result used in verification is tagged with a resource version (content hash, ETag, monotonic version counter), and the commit operation is conditional on the resource still being at that version — a compare-and-swap, not a blind write. 2. ...",
    "decision_boundary": "The decision the orchestrator must make at commit time is not \"did this branch verify?\" but \"is the world still the world this branch verified against?\" Operationally: - If the branch's read-set versions all match current versions → commit. - If any read-set version is stale **and** the branch's write-set does not touch the changed resource → the branch's *r...",
    "operational_effect": "The practical consequence is that speculative verification must be *versioned*, and commit must be a *conditional transaction* over the union of all branches' read-sets, not an unconditional application of the winning branch's write-set. This adds a version-check to every commit and forces the orchestrator to retain read-set metadata through the entire specu..."
  },
  "matched_failure_symptoms": [
    "DST_SHIFT_OR_CLOCK_SKEW"
  ],
  "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": "9a0381fbe7b28d422c0fa3dba95c5062c46a7985b6adfbbc13fa443ac9a8ae94",
    "verified_classes": [
      "StaleVerificationError",
      "Branch"
    ],
    "verified_functions": [
      "commit_branch",
      "rollback_branch"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "StaleVerificationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
