{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-parallel-agent-branches-from-committing-divergent-world-state-after-rollback",
  "title": "Which invariants prevent speculative parallel agent branches from committing divergent world-state after rollback",
  "date_of_record": "2026 November 21",
  "scope": "Applies to orchestrators that fan out multiple speculative agent branches against shared external side-effect surfaces (filesystem, APIs, message queues, databases) and reconcile them after a winner is selected. Does not apply to pure read-only fan-out or to branches whose effects are fully contained in an isolated sandbox that is destroyed on rollback.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-parallel-agent-branches-from-committing-divergent-world-state-after-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-parallel-agent-branches-from-committing-divergent-world-state-after-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-parallel-agent-branches-from-committing-divergent-world-state-after-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2185,
    "python_slice_tokens": 283,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative parallel execution of agent plans is not the same problem as speculative execution in CPUs. A CPU branch that mispredicts leaves no observable trace because architectural state is committed only at retirement, and the reorder buffer holds the speculative writes. An LLM agent branch, by contrast, *acts through tools whose effects are irreversible ...",
    "what_was_observed": "A planner agent decomposed a task (\"provision a staging environment and register it in the service catalog\") into three candidate plans and speculatively executed all three in parallel, each with its own tool grant. Plan A and Plan B both called `catalog.register(service_id, endpoint)`. The reconciler scored Plan C highest on a downstream validation check and selected it as the winner, then issued rollback to A and B...",
    "condition_of_validity": "The invariant that must hold for speculative fan-out to be safe is: > **For every branch, the set of effects it can produce must be a subset of the set of effects rollback can invert, OR the branch must be prevented from producing effects outside that set until it is designated the winner.** Formally, let `E(b)` be the externally observable effects of branch...",
    "decision_boundary": "The orchestrator must decide, per tool and per branch, whether that tool may run speculatively. The boundary is drawn on a single axis: **does the tool's effect have a total, callable compensator that the orchestrator itself can invoke without the branch's cooperation?** - If yes (and the compensator is idempotent and registered before the effect fires), the...",
    "operational_effect": "Enforcing the invariant changes the orchestrator's architecture in three concrete ways: 1. **Tool grants become branch-phase-dependent.** A speculative branch is issued a capability token scoped to speculation-safe tools only. Commit-only tools are absent from its grant; an attempt to call one raises at the tool boundary, not at reconciliation. This moves th..."
  },
  "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": "591b07519b7d0d740e4f1ba3b7416d52d4706d211e24362fa4fee529769f0962",
    "verified_classes": [
      "SpeculationDivergenceError",
      "EffectLedger",
      "SpeculativeOrchestrator"
    ],
    "verified_functions": [
      "__init__",
      "record_before_fire",
      "rollback",
      "__init__",
      "grant_for",
      "reconcile"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculationDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
