{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-speculative-branch-rollback-from-resurrecting-side-effects-in-parallel-multi-agent-execution",
  "title": "Which invariants prevent speculative branch rollback from resurrecting side effects in parallel multi-agent execution",
  "date_of_record": "2026 November 26",
  "scope": "Applies to orchestrators that fan out speculative agent branches (parallel plan attempts, optimistic tool calls, draft-then-commit patterns) and roll back losing branches by discarding their state. Does not apply to strictly serialized single-agent loops or to branches whose tool calls are provably side-effect-free.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-rollback-from-resurrecting-side-effects-in-parallel-multi-agent-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-rollback-from-resurrecting-side-effects-in-parallel-multi-agent-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-speculative-branch-rollback-from-resurrecting-side-effects-in-parallel-multi-agent-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2122,
    "python_slice_tokens": 326,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"rollback failed.\" Rollback of *state* is trivially achievable: drop the branch's memory, discard its transcript, free its checkpoint. The failure mode is that **rollback of state is silently decoupled from rollback of effects**. An agent branch is a probabilistic planner driving non-deterministic tools; when the orchestrator discards...",
    "what_was_observed": "A three-branch speculative planner was given the task \"reconcile the customer record against the CRM export and issue the corrected invoice.\" Branches A, B, C ran in parallel with a shared optimistic tool layer. Each branch was permitted to call `crm.update_record`, `billing.draft_invoice`, and `billing.finalize_invoice` without a pre-commit barrier; the orchestrator's conflict reconciler was supposed to select a win...",
    "condition_of_validity": "Speculative parallel execution with optimistic tool invocation is only sound under a conjunction of invariants. Break any one and the ghost-writer failure is reachable: 1. **Effect attribution invariant.** Every mutating tool call must carry a branch-scoped, cryptographically bound token (branch ID + attempt nonce + orchestrator signature) that the receiving...",
    "decision_boundary": "The orchestrator must decide, per branch and per tool class, whether optimistic invocation is admissible. The decision rule: - If the effect has a **defined inverse** and the inverse is idempotent under the branch token → optimistic invocation admissible; rollback issues the inverse. - If the effect is **non-invertible** but the resource supports **condition...",
    "operational_effect": "With the invariants enforced, the failure trace changes at three points. First, C's write fails its version precondition because the export shard it read is stale relative to the record version B will write — C is rejected at the tool boundary, not resurrected at rollback. Second, A's `finalize_invoice` timeout is resolved by an idempotency lookup against A'..."
  },
  "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": "624468ce320c49dd17528ac65262a4988195f742227d64ea1d922dc24e981365",
    "verified_classes": [
      "GhostWriterError",
      "EffectClass",
      "EffectReceipt",
      "Branch",
      "SpeculativeOrchestrator"
    ],
    "verified_functions": [
      "__init__",
      "record_effect",
      "discard",
      "promote"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "GhostWriterError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
