{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-commit-a-speculative-branch-the-side-effect-compensation-invariant-in-parallel-agent-rollouts",
  "title": "When must an instance refuse to commit a speculative branch: the side-effect compensation invariant in parallel agent rollouts",
  "date_of_record": "2026 November 29",
  "scope": "Applies to any orchestrator that fans out speculative agent branches which pre-execute tools with real external side effects (writes, sends, payments, deploys) and later commits exactly one branch. Does not apply to read-only speculation or purely sandboxed branches with no external effect surface.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-commit-a-speculative-branch-the-side-effect-compensation-invariant-in-parallel-agent-rollouts.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-commit-a-speculative-branch-the-side-effect-compensation-invariant-in-parallel-agent-rollouts.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-commit-a-speculative-branch-the-side-effect-compensation-invariant-in-parallel-agent-rollouts.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1609,
    "python_slice_tokens": 457,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **speculation as computation** and **speculation as commitment**. When an agent branch pre-executes a tool call, it produces two separable artifacts: a *result* (what the model will condition on) and an *effect* (what the world now reflects). Most speculative-execution designs treat these as fused—the branch runs, the ...",
    "what_was_observed": "A planner agent fans out three branches for a refund workflow. Branch A calls `refund.create(order=42, amount=50)`. Branch B calls `refund.create(order=42, amount=50)` with a different rationale. Branch C calls `notify.customer(order=42, \"refund issued\")`. The branches run in parallel; the orchestrator's commit rule is \"first branch whose verifier passes wins; discard the rest.\" A's verifier passes on a stale invento...",
    "condition_of_validity": "The \"discard losing branches\" rule is valid only under the conjunction: 1. **Effect idempotency keyed by branch-independent identity.** Every pre-executed effect carries a deterministic idempotency key derived from the *task* (e.g., `hash(order_id, refund_intent)`), not from the branch id. Two branches attempting the same refund then collapse to one effect a...",
    "decision_boundary": "The precise boundary: **commit is permitted iff the set of emitted effects across all branches, after compensation of losers, equals the set of effects the winning trajectory will assume exist.** Formally, let `E_emitted` be the multiset of effects fired, `E_compensated` the subset provably reverted, and `E_assumed` the effects the committed plan's world mod...",
    "operational_effect": "Orchestrators that enforce this invariant pay a latency cost—compensation acknowledgment is a synchronous barrier before commit—and a fan-out cost, since branches whose effects cannot be isolated are serialized rather than speculated. In exchange, they eliminate the class of \"committed trajectory diverges from world state\" failures that are invisible to per-..."
  },
  "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": "35b7611ef011c03e25f39e2f8b85553f000fddbf44c9cc2eb330b4132f1b33d1",
    "verified_classes": [
      "SpeculativeCommitError",
      "EffectKind",
      "Effect",
      "BranchLedger"
    ],
    "verified_functions": [
      "assert_committable",
      "commit_branch",
      "emitted_keys",
      "uncompensated"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculativeCommitError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
