{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-branch-rollouts-from-committing-side-effects-that-the-verifier-later-rejects",
  "title": "Which invariants prevent speculative branch rollouts from committing side effects that the verifier later rejects",
  "date_of_record": "2026 November 28",
  "scope": "Applies to orchestration layers that fan out parallel speculative agent branches (tree-of-thought, best-of-N, parallel tool-calling) where branches may perform externally observable side effects and a downstream verifier selects a winner. Does not apply to read-only branches or to single-branch sequential execution with no rollback surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-rollouts-from-committing-side-effects-that-the-verifier-later-rejects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-rollouts-from-committing-side-effects-that-the-verifier-later-rejects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-rollouts-from-committing-side-effects-that-the-verifier-later-rejects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1418,
    "python_slice_tokens": 255,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a branch produced a wrong answer.\" It is the conflation of two different commit horizons: the **effect horizon** (when a tool call mutates the world) and the **selection horizon** (when the verifier picks a winner). Speculative execution is safe only when every branch's effect horizon is strictly ordered *after* the selection horizon, or ...",
    "what_was_observed": "A three-branch rollout was dispatched to resolve a refund dispute. Each branch was given the same task and permitted to call `issue_refund`, `send_email`, and `update_ledger`. All three branches eagerly executed `issue_refund` against the payment provider (a non-idempotent POST with a client-generated idempotency key that differed per branch). The verifier scored branches [0.62, 0.71, 0.68]; branch 2 won. The orchest...",
    "condition_of_validity": "Speculative rollouts with side effects are valid **if and only if** all of the following hold simultaneously: - **Effect deferral:** branches execute against a *staged* effect journal, not the real world. The journal is a list of `(tool, args, idempotency_key)` tuples keyed by `(rollout_id, branch_id)`. No external call fires until commit. - **Deterministic ...",
    "decision_boundary": "The boundary is between **speculate-then-commit** and **execute-then-compensate**. Choose speculate-then-commit when: tools are non-idempotent, downstream settlement is asynchronous, or the verifier is stochastic. Choose execute-then-compensate only when: every tool is idempotent under a stable key, compensation is synchronous and total, and the verifier is ...",
    "operational_effect": "With the invariant enforced, the failure mode disappears: losers never touch the world, so there is nothing to compensate and no settlement race. The cost is latency—you serialize the effect flush after verification—but you gain a replayable audit trail where `selection_receipt` + `effect_journal` fully reconstruct committed state. Without it, you get phanto..."
  },
  "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": "4cebda4b6b3f936d28085209f1f9292d6aba64e13acabb9c49858ebdfa291c47",
    "verified_classes": [
      "SpeculativeCommitViolation",
      "SelectionReceipt",
      "EffectJournal"
    ],
    "verified_functions": [
      "commit_winner",
      "fingerprint",
      "stage"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculativeCommitViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
