{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-commits-speculative-side-effects-before-branch-verification-and-the-rollback-cannot-un-emit-them",
  "title": "What happens when an instance commits speculative side effects before branch verification and the rollback cannot un-emit them",
  "date_of_record": "2026 November 25",
  "scope": "Applies to orchestrators that fork an agent into parallel speculative branches (optimistic task forking) and rely on branch-and-verify rollback to discard losers. Does not apply to pure read-only fan-out, nor to systems where every branch's tool calls are confined to an isolated, disposable sandbox with no external egress.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-commits-speculative-side-effects-before-branch-verification-and-the-rollback-cannot-un-emit-them.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-commits-speculative-side-effects-before-branch-verification-and-the-rollback-cannot-un-emit-them.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-commits-speculative-side-effects-before-branch-verification-and-the-rollback-cannot-un-emit-them.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2486,
    "python_slice_tokens": 533,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two different notions of \"rollback\" that speculative multi-agent execution conflates, and the conflation is the failure. The first is **state rollback**: restoring the orchestrator's own working memory, scratchpad, plan graph, or task ledger to a pre-branch checkpoint. This is cheap, exact, and genuinely reversible because the orchestrator owns the...",
    "what_was_observed": "A planner agent decomposes a request (\"reconcile the vendor invoices and notify the three vendors whose amounts disagree\") into a task with an inherently forking decision: which reconciliation strategy to use. The orchestrator forks three speculative branches — `strategy=linewise`, `strategy=aggregate`, `strategy=fuzzy-match` — each instructed to *execute* its reconciliation and *report* a confidence score, after whi...",
    "condition_of_validity": "Optimistic speculative forking with branch-and-verify rollback is sound **iff** all four of the following hold simultaneously: 1. **Effect gating.** Every branch executes against a *deferred-effect* interface: tool calls that would mutate external state are captured as intents (a proposed effect log), not executed. Only the promoted branch's intent log is fl...",
    "decision_boundary": "The operational question is not \"can this branch be rolled back?\" but \"**has this branch emitted anything the verifier's replay cannot reconstruct from the pre-fork snapshot?**\" If yes, the branch is not speculative — it is committed, and forking it was a mistake. Concretely, at fork time the orchestrator must classify every tool in the branch's reachable to...",
    "operational_effect": "When the invariant is enforced, speculative forking becomes genuinely cheap: losers cost only compute and tokens, never reputation or money, and the verifier's replay is trustworthy because the substrate was isolated. The system gains the throughput of parallelism without the correctness tax of irreversible speculation. When the invariant is violated, the fa..."
  },
  "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": "545e68753ba47cd25a0ccbb6d93c155940ded547089580a6fdfa25a2ea856cac",
    "verified_classes": [
      "SpeculativeEffectLeak",
      "BranchState",
      "EffectIntent",
      "Branch",
      "DeferredEffectGate"
    ],
    "verified_functions": [
      "promote_and_flush",
      "run_speculation",
      "__init__",
      "call"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "SpeculativeEffectLeak"
    ],
    "sample_fail_closed_invariants": [
      "assert sent == []",
      "assert sent == [('send_email', {'vendor': 'C', 'amt': 120})]"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
