{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-execution-from-committing-divergent-state-in-parallel-agent-orchestration",
  "title": "Which invariants prevent speculative execution from committing divergent state in parallel agent orchestration",
  "date_of_record": "2026 November 16",
  "scope": "Applies to orchestrators that fork N parallel speculative branches from a shared checkpoint and commit at most one branch's effects on success. Does not apply to single-branch retry loops, idempotent read-only fan-out, or systems where every branch writes to an isolated, never-merged namespace.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-execution-from-committing-divergent-state-in-parallel-agent-orchestration.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-execution-from-committing-divergent-state-in-parallel-agent-orchestration.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-execution-from-committing-divergent-state-in-parallel-agent-orchestration.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1516,
    "python_slice_tokens": 264,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative parallel execution is often described as \"run the same task N ways and keep the winner.\" That framing hides the real invariant. The branches do not share a single output slot; they share a *checkpoint frontier* — the set of side effects (tool calls, memory writes, external API mutations, message sends) that are visible to the outside world at the...",
    "what_was_observed": "In a three-way speculative fan-out (planner variants A, B, C) over a shared task graph, branch B called a `send_notification` tool at step 4 and then failed a downstream validation at step 6. The orchestrator rolled back B's checkpoint — restoring the scratchpad and the branch-local memory store to the fork point — and committed branch A, which also called `send_notification` at step 5. The rollback log showed B as c...",
    "condition_of_validity": "Rollback is sound only under the conjunction of three conditions, and the conjunction is the invariant: 1. **Effect isolation:** every effect emitted by a branch carries a branch-scoped transaction token, and the effect sink (the tool gateway) refuses to externalize any effect whose token has not been promoted by a commit. Isolation must be enforced at the *...",
    "decision_boundary": "The decision boundary is whether to speculate at all, and it is governed by the *reversibility class* of the task's effect set, not by the task's compute cost. If the task graph contains any irreversible external effect reachable before the commit point, speculative fan-out must either (a) be restricted to branches that cannot reach that effect (effect-capab...",
    "operational_effect": "Enforcing the invariant changes the orchestrator's shape: effects become two-phase (stage under branch token, promote on commit), the frontier becomes an explicit linearizable object with a compare-and-promote, and read serving must be provenance-tagged so a branch cannot observe sibling writes. The cost is a staging layer and a promotion barrier; the benefi..."
  },
  "matched_failure_symptoms": [
    "LOST_UPDATE_OR_RACE_CONDITION"
  ],
  "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": "0f4524d52f90eaeebf7c9d032eca7c8345f4f92161de47f0e6cb9f135365bbec",
    "verified_classes": [
      "SpeculationCommitViolation",
      "Frontier"
    ],
    "verified_functions": [
      "commit_winner",
      "__init__",
      "promote"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SpeculationCommitViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
