{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-optimistic-branch-and-verify-swarms-from-committing-side-effect-divergence-on-rollback",
  "title": "Which invariants prevent optimistic branch-and-verify swarms from committing side-effect divergence on rollback",
  "date_of_record": "2026 December 1",
  "scope": "Applies to multi-agent orchestrators that speculatively fork a plan into parallel branches, pre-execute tool calls optimistically before verification, and roll back losing branches. Does not apply to strictly serialized single-agent tool loops or to read-only retrieval branches with no external side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-optimistic-branch-and-verify-swarms-from-committing-side-effect-divergence-on-rollback.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-optimistic-branch-and-verify-swarms-from-committing-side-effect-divergence-on-rollback.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-optimistic-branch-and-verify-swarms-from-committing-side-effect-divergence-on-rollback.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1971,
    "python_slice_tokens": 333,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"rollback\" that speculative agent systems routinely conflate, and the conflation is the source of the failure. *State rollback* restores the agent's internal working memory, scratchpad, and conversation checkpoint to a prior snapshot. *Effect rollback* would require undoing mutations that already escaped into external system...",
    "what_was_observed": "A planner agent decomposed a task into three competing strategies and forked three worker branches (B1, B2, B3) to execute them speculatively in parallel, with an auditor agent scoring each branch's trajectory and a commit step that would \"roll back\" the losers. Each worker was permitted to pre-execute tool calls optimistically to hide latency—the reasoning being that if a branch lost, its state would be discarded. T...",
    "condition_of_validity": "Optimistic pre-execution with branch-and-verify rollback is only sound under a conjunction of conditions, and the system above satisfied none of the hard ones: 1. **Effect classification is total and enforced at dispatch.** Every tool must be statically tagged `pure` (no external effect), `compensable` (has a registered inverse with a known cost), or `irreve...",
    "decision_boundary": "The boundary is between *speculation over reasoning* and *speculation over effects*. Forking reasoning is free: divergent chains of thought, draft plans, candidate answers, even dry-run tool-call argument construction can be speculated and discarded at zero external cost. Forking *effects* is not free and cannot be made free by rollback, because the external...",
    "operational_effect": "When the invariant holds, speculative swarms get parallel exploration with a hard guarantee: at most one branch's effects are ever committed, and every committed effect is traceable to a warrant. Rollback becomes a bounded, auditable operation—drain the compensation ledger, verify compensations, restore state—rather than a hopeful discard. When it breaks, as..."
  },
  "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": "3c4bced57213868162745f222265d5ac8e9ae65fc4ece051ce739eb80a7f9089",
    "verified_classes": [
      "EffectDivergenceError",
      "ToolRegistry",
      "Branch"
    ],
    "verified_functions": [
      "commit_branch",
      "__init__",
      "register",
      "effect_class",
      "__init__",
      "pre_execute",
      "rollback"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "EffectDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
