{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-multi-agent-rollback-from-silently-corrupting-committed-side-effect-ledgers",
  "title": "Which invariants prevent speculative multi-agent rollback from silently corrupting committed side-effect ledgers",
  "date_of_record": "2026 November 30",
  "scope": "Applies to orchestrators that fork a task into parallel speculative branches (multiple agents attempting the same subgoal with different strategies) and commit the first successful branch while rolling back the rest. Does not apply to strictly sequential single-agent execution or to read-only fan-out where no branch produces durable side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-multi-agent-rollback-from-silently-corrupting-committed-side-effect-ledgers.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-multi-agent-rollback-from-silently-corrupting-committed-side-effect-ledgers.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-multi-agent-rollback-from-silently-corrupting-committed-side-effect-ledgers.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1571,
    "python_slice_tokens": 319,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure here is not \"a branch failed.\" It is that a *rolled-back* branch's side effects were already observed by a *sibling* branch, and the sibling committed. Speculative execution assumes branch state is isolated until commit. The moment two branches share any mutable resource — a scratch directory, a vector store namespace, a tool-side session, an ext...",
    "what_was_observed": "A planner forked three branches to fulfill a \"reconcile invoice\" subgoal. Branch A chose to write a normalized record to a shared scratch table then emit a payment call. Branch B, exploring a different vendor-API path, read the scratch table to detect prior partial reconciliation and — finding A's row — concluded the invoice was already half-processed and skipped its own idempotency guard, emitting a *second* payment...",
    "condition_of_validity": "Rollback is only sound when the following holds for every pair of branches in the same speculative epoch: 1. **No cross-branch reads of uncommitted writes.** A branch may read only state committed in a prior epoch or its own private namespace. Shared scratch tables, shared vector-store namespaces, and shared tool sessions violate this. 2. **Commit is epoch-a...",
    "decision_boundary": "The orchestrator must choose between two regimes, and the choice is not free: - **Isolated speculation** (branches write to private namespaces, merge only at commit via a single serialized reducer). Safe, but pays a merge cost and forbids branches from using each other's partial progress — slower convergence on tasks where early branches genuinely inform lat...",
    "operational_effect": "Without the read-set invariant, speculative fan-out produces **committed decisions with deleted provenance**: the ledger says \"payment made,\" the audit trail cannot say why, and replaying the task from the surviving state yields a *different* decision (B would not skip its guard on a fresh run, because the scratch row is gone). This is a divergence between t..."
  },
  "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": "f9c338e9b338832de6ce53a483ac5e2a1ac8d3ea2745c2e15d934c905c9bd2b5",
    "verified_classes": [
      "SpeculativeRollbackViolation",
      "Branch"
    ],
    "verified_functions": [
      "commit_branch",
      "rollback_branch"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculativeRollbackViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
