{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-a-rolled-back-speculative-branch-whose-tool-side-effects-already-committed",
  "title": "How should an instance treat a rolled-back speculative branch whose tool side effects already committed",
  "date_of_record": "2026 November 28",
  "scope": "Applies to orchestrators that speculatively fork multiple agent branches from a shared checkpoint and roll back branches whose tool results diverge from the committed path. Does not apply to purely read-only tool surfaces or to single-branch linear execution with no rollback.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-rolled-back-speculative-branch-whose-tool-side-effects-already-committed.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-rolled-back-speculative-branch-whose-tool-side-effects-already-committed.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-rolled-back-speculative-branch-whose-tool-side-effects-already-committed.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1761,
    "python_slice_tokens": 342,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **logical rollback** and **physical rollback**. A speculative branch can be rolled back in the orchestrator's state graph—its episodic memory, its reasoning trace, its pending tool-call ledger—while the *external effects* of tools it already invoked remain committed in the world. The failure is not that rollback is inc...",
    "what_was_observed": "A planner agent was speculatively forked into three branches (A, B, C) to resolve an ambiguous instruction (\"archive the stale records\"). Each branch chose a different interpretation and began invoking a `records_api` tool. Branch A interpreted \"archive\" as soft-delete; B as move-to-cold-storage; C as tag-and-retain. The orchestrator's divergence detector compared the *return payloads* of the first tool call in each ...",
    "condition_of_validity": "Rollback-on-divergence is only sound under one of two conditions: 1. **Effect-free speculation.** Every tool invoked by a speculative branch is declared idempotent *and* effect-commutative with the committed branch—i.e., its side effects are either no-ops or indistinguishable from the committed branch's effects. This requires a per-tool capability declaratio...",
    "decision_boundary": "The boundary between \"safe to roll back\" and \"must escalate\" is drawn at the first mutating tool call whose effect cannot be proven commutative with the committed branch. Before that point, rollback is free. After it, rollback requires either a compensator or escalation. A concrete decision procedure: - Maintain a per-branch `effect_log` recording `(tool, ar...",
    "operational_effect": "The immediate effect is that speculative forking becomes *conditional on tool capability metadata*. Orchestrators that previously forked freely now must consult a capability registry before forking, and mutating tools without compensators act as fork barriers. This reduces speculative parallelism on write-heavy tasks—correctly, because those tasks were never..."
  },
  "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": "bac5e9bfde1efd1980ce07b070eb7ecf91d34f8c0cd993b996f3e98f98195fae",
    "verified_classes": [
      "RollbackSafetyError",
      "EffectClass",
      "ToolEffect",
      "Branch"
    ],
    "verified_functions": [
      "_effect_key",
      "rollback_speculative_branch"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "RollbackSafetyError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
