{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-multi-agent-rollback-from-silently-committing-divergent-sub-task-side-effects",
  "title": "Which invariants prevent speculative multi-agent rollback from silently committing divergent sub-task side effects",
  "date_of_record": "2026 November 26",
  "scope": "Applies to orchestrators that fan out speculative sub-agents (parallel \"try N variants, keep the winner\" execution) where sub-agents perform externally observable effects (writes, tool invocations, payments, message emissions) and the orchestrator must roll back losers after a divergence decision. Does not apply to pure-read speculation, sandboxed dry-runs with no egress, or single-agent retry loops.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-multi-agent-rollback-from-silently-committing-divergent-sub-task-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-multi-agent-rollback-from-silently-committing-divergent-sub-task-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-multi-agent-rollback-from-silently-committing-divergent-sub-task-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2138,
    "python_slice_tokens": 430,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **speculative state** (internal, revertible: context frames, scratchpads, plan trees, candidate diffs) and **committed effect** (external, non-revertible: a row written, an HTTP POST accepted, a token spent, a peer agent notified). Speculative execution is only sound when every effect produced during the speculation wi...",
    "what_was_observed": "An orchestrator spawned three speculative planners (`P_A`, `P_B`, `P_C`) for a subtask \"reconcile invoice batch.\" Each planner was granted a scoped tool token to a ledger service. The orchestrator's divergence policy: run all three, score by an auditor agent, commit the highest-scoring plan, roll back the rest. `P_A` and `P_C` were read-only by construction. `P_B` chose a strategy that issued `POST /ledger/adjust` fo...",
    "condition_of_validity": "A speculative rollback is valid **iff** for every losing branch `L`: 1. **Effect enumeration precedes context destruction.** The set of effects `E_L` must be derived from a durable, append-only effect journal that survives `L`'s context teardown. Rolling back by deleting the branch's memory first is the trigger condition — it destroys the only record of what...",
    "decision_boundary": "The orchestrator must decide, per sub-task, whether it is **speculatable** or must be **serialized**, using this boundary: - If the sub-task's tool manifest contains any effect classified `NON_COMPENSABLE` (irreversible external mutation, non-idempotent message emission to a peer, monetary transfer), the sub-task is **serialized**: one branch at a time, comm...",
    "operational_effect": "Concretely, teams that adopt the enumerate-before-teardown ordering plus the reconciliation gate observe: - Rollback failures become **loud**: reconciliation mismatch raises before commit, converting a silent union-state into a halt. Mean time to detect divergent effect leakage drops from \"next audit cycle\" to \"same batch.\" - The `NON_COMPENSABLE` classifica..."
  },
  "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": "69b929f254af0584067a2f3a7f43a6c8db00b4ec17242aa88c2ec167259186e5",
    "verified_classes": [
      "EffectClass",
      "DivergentRollbackError",
      "CapabilityEscalationError",
      "Effect",
      "EffectJournal"
    ],
    "verified_functions": [
      "rollback_branch",
      "commit_with_reconciliation",
      "check_capability",
      "record",
      "effects_of"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "CapabilityEscalationError",
      "DivergentRollbackError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
