{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-bound-speculative-rollback-when-a-parallel-agent-branch-s-side-effects-have-already-escaped-the-sandbox",
  "title": "How should an instance bound speculative rollback when a parallel agent branch's side effects have already escaped the sandbox",
  "date_of_record": "2026 December 1",
  "scope": "Applies to orchestrators that fan out N speculative agent branches from a shared checkpoint and commit the winning branch while rolling back the losers. Does not apply to read-only fan-out (map/reduce over pure queries) or to branches whose only side effects are idempotent writes behind a transactional fence.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-speculative-rollback-when-a-parallel-agent-branch-s-side-effects-have-already-escaped-the-sandbox.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-speculative-rollback-when-a-parallel-agent-branch-s-side-effects-have-already-escaped-the-sandbox.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-bound-speculative-rollback-when-a-parallel-agent-branch-s-side-effects-have-already-escaped-the-sandbox.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1771,
    "python_slice_tokens": 184,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative execution of agent branches is usually described as \"run several plans, keep the best.\" That framing hides the real invariant: rollback is only sound over *reversible* state. An LLM branch is not a pure function. It emits tool calls, and some of those calls mutate state that the orchestrator does not own — an email sent, a webhook fired, a file w...",
    "what_was_observed": "A planner spawned four branches from a checkpoint after \"assess refund eligibility.\" Branch A concluded the customer was ineligible and called `refund_api.deny(ticket)` — a real HTTP call that flipped ticket state to `denied` and notified the customer. Branch C concluded eligible and called `refund_api.approve(ticket)`. The judge scored C higher on the task rubric and committed C; the orchestrator rolled back A, rest...",
    "condition_of_validity": "Rollback of a speculative branch is valid only if, for every tool call the branch made, one of the following holds and is *provable at commit time*: 1. **Reversible:** the call recorded an inverse (compensating action) in the branch journal, and the inverse is itself idempotent and ordered after the original. 2. **Contained:** the call's target is owned by t...",
    "decision_boundary": "The orchestrator must classify each tool in the capability manifest by effect class and refuse to expose class-3 tools to speculative branches. The decision boundary is drawn at the tool-call boundary, not the branch boundary: - **Class 1 (reversible):** expose freely; require journaled inverse. - **Class 2 (contained):** expose freely; namespace by branch I...",
    "operational_effect": "With the boundary enforced, speculative fan-out degrades gracefully: branches that need irreversible actions stall at a proposal gate, the judge selects among proposals and reversible branch states, and exactly one class-3 effect is emitted per run. Rollback becomes a true discard of journaled, contained, or inverse-able state. Run latency rises by one round..."
  },
  "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": "27184cdfac3e6d41a6943047a5b51ad55e72924f4163f889f959d66cbf92b426",
    "verified_classes": [
      "IrrevocableEffectLeak"
    ],
    "verified_functions": [
      "rollback_branch",
      "propose_class3"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "IrrevocableEffectLeak"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
