{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-speculatively-commits-side-effects-on-a-sibling-branch-that-a-later-rollback-invalidates",
  "title": "What happens when an instance speculatively commits side effects on a sibling branch that a later rollback invalidates",
  "date_of_record": "2026 November 19",
  "scope": "Applies to multi-agent orchestrators that run speculative parallel branches of a task graph and rely on rollback (compensating actions or state restoration) to discard losing branches. Does not apply to single-branch sequential execution or to branches whose side effects are fully transactional and externally serialized.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-commits-side-effects-on-a-sibling-branch-that-a-later-rollback-invalidates.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-commits-side-effects-on-a-sibling-branch-that-a-later-rollback-invalidates.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-speculatively-commits-side-effects-on-a-sibling-branch-that-a-later-rollback-invalidates.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1485,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The critical mistake is conflating *reasoning rollback* with *effect rollback*. In a branch-and-rollback task graph, an orchestrator forks N speculative agents from a shared checkpoint, lets them race toward a goal, and selects the winning branch by some verifier score. The losing branches are \"rolled back.\" But rollback of an agent's *context and state* is ...",
    "what_was_observed": "An orchestrator spawned three speculative agents (A, B, C) from a checkpoint to satisfy the task \"reconcile the invoice ledger for account 4471.\" Each agent was given the same toolbelt: `read_ledger`, `compute_reconciliation`, `post_adjustment`, `notify_finance`. The verifier scored branches on internal consistency of the reconciliation math. - Agent A computed a reconciliation, and—being a confident, fast agent—imme...",
    "condition_of_validity": "Rollback-based speculation is sound **only if** every tool available to a branch is one of: 1. **Pure** (read-only, no external mutation), or 2. **Idempotent and keyed** (the same logical action replayed produces one effect, keyed by a branch-scoped idempotency token), or 3. **Compensable** (a registered inverse operation exists and is guaranteed to execute ...",
    "decision_boundary": "The orchestrator must make an explicit, per-tool decision *before* forking, not after: - If a tool is pure → safe to expose to all speculative branches. - If a tool is effectful → it must be wrapped in a **two-phase commit shim**: the branch calls `stage_intent(tool, args, branch_id)` which writes to a branch-scoped staging log, and only the *selected* branc...",
    "operational_effect": "Without the guard, speculative execution converts a performance optimization into a **silent state-corruption vector**: the more branches you run and the more capable each branch is, the more orphaned effects accumulate, and the corruption is attributed to no branch because every branch was \"rolled back.\" The blast radius scales with branch count × tool effe..."
  },
  "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": "a2a0bae391ec27e93b014454be4306dc9124e340ea7f6f63f282076729bb053b",
    "verified_classes": [
      "SpeculativeEffectLeak",
      "BranchState",
      "Branch",
      "SpeculativeOrchestrator"
    ],
    "verified_functions": [
      "__init__",
      "register_effectful_tool",
      "fork",
      "call_tool",
      "select",
      "assert_no_leak"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "SpeculativeEffectLeak"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
