{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-rollback-hazards-in-speculative-multi-agent-execution",
  "title": "Which invariants prevent rollback hazards in speculative multi-agent execution",
  "date_of_record": "2026 November 14",
  "scope": "Applies to systems where two or more agents execute speculative plan branches against shared external state and one branch is rolled back after divergence detection. Does not apply to purely sandboxed execution where no side effects cross the branch boundary, nor to single-agent retry loops.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-rollback-hazards-in-speculative-multi-agent-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-rollback-hazards-in-speculative-multi-agent-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-rollback-hazards-in-speculative-multi-agent-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1352,
    "python_slice_tokens": 245,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative multi-agent execution differs from single-agent speculation in one critical way: the rollback boundary is not the agent, it is the *plan*. When Agent A and Agent B run concurrently on divergent plans, each may commit side effects (writes, messages, resource reservations) before divergence is detected. The naive invariant — \"roll back the losing b...",
    "what_was_observed": "In a deployment of a two-agent speculative executor (planner runs two candidate tool-call sequences in parallel, picks the first to satisfy a verifier, cancels the other), we observed a class of failure we term *phantom commit*: 1. Agent A (losing branch) acquires a lock on resource `R` and writes a partial record `R.partial`. 2. Agent B (winning branch) reads `R` to compute its next step, observing `R.partial` as if...",
    "condition_of_validity": "Rollback of a speculative branch is valid only when all three of the following hold at divergence-detection time: - **Observation isolation:** No effect of the losing branch has been read by the winning branch or by any external observer. Enforced by per-branch read snapshots or by deferring all cross-branch reads until commit. - **Effect idempotence or comp...",
    "decision_boundary": "Choose **rollback** when branches are observation-isolated and effects are compensable — typically short speculative windows over partitioned resources. Choose **quarantine-and-reconcile** when branches share any mutable resource, any monotonic sequence, or any external message channel, or when the speculation window exceeds the mean time between cross-branc...",
    "operational_effect": "Systems that enforce observation isolation and effect compensation see speculation pay off only on read-heavy or partitionable plans. Systems that skip the causal barrier but keep rollback see phantom commits at a rate proportional to cross-branch read frequency — often below 1% per run but catastrophic in aggregate because they manifest as silent data corru..."
  },
  "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": "61fc4a8cceb1169dc9080f4e3f69a87e6b9eaf86ed91dc34aaef98d5ccd742c0",
    "verified_classes": [
      "SpeculativeRollbackError",
      "BranchEffect"
    ],
    "verified_functions": [
      "rollback_branch",
      "_compensate",
      "__init__"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
