{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-refuse-to-prune-a-speculative-branch-whose-tool-calls-have-already-produced-externally-observable-side-effects",
  "title": "Under what conditions must an instance refuse to prune a speculative branch whose tool calls have already produced externally observable side effects",
  "date_of_record": "2026 November 28",
  "scope": "Applies to orchestration layers that run speculative multi-agent branches (fast-path drafting, parallel tool invocation, speculative decoding across agents) and prune losers after a winner is selected. Does not apply to branches confined to a pure sandbox whose effects are discarded atomically with the branch, nor to single-agent speculative decoding where the KV-cache rollback is the only state.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-a-speculative-branch-whose-tool-calls-have-already-produced-externally-observable-side-effects.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-a-speculative-branch-whose-tool-calls-have-already-produced-externally-observable-side-effects.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-refuse-to-prune-a-speculative-branch-whose-tool-calls-have-already-produced-externally-observable-side-effects.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1892,
    "python_slice_tokens": 386,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two kinds of rollback, and conflating them is the failure. **Logical rollback** reverts the agent's belief state, working memory, and plan graph to a prior checkpoint — this is cheap, deterministic, and always safe. **Effect rollback** reverts the external world: a POST to a payment API, a file written to shared storage, a message enqueued to anoth...",
    "what_was_observed": "A planning swarm with three speculative branches (A: draft via cheap model, B: draft via strong model, C: draft via retrieval-augmented path) was configured to race on a single task and prune all but the first to return a passing self-verification. Branch A returned first at t=1.2s with a passing self-check and was promoted. Branches B and C were signaled to abort at t=1.2s. Branch C had, at t=1.1s, already issued a ...",
    "condition_of_validity": "Pruning a speculative branch is valid **iff** the branch's effect set E(branch) satisfies at least one of: 1. **Empty:** no tool call with external observability has been *issued* (not merely planned). Issuance, not completion, is the boundary — an in-flight call may still land after the abort. 2. **Compensable and compensated:** every issued effect has a re...",
    "decision_boundary": "At prune time, for each losing branch b: - If `ledger[b].issued == ∅` → prune freely; discard memory. - If `ledger[b].issued ≠ ∅` and all entries `compensable` and inverses acknowledged → prune after compensation; log the compensation. - If `ledger[b].issued ≠ ∅` and any entry `non_compensable` or `inverse_unacknowledged` → **do not prune.** Transition b to ...",
    "operational_effect": "Enforcing this invariant changes the orchestrator's failure surface from *silent duplicate effects* to *explicit quarantine pressure*. Under load, quarantined branches accumulate and the merge decision becomes the bottleneck — this is correct behavior, because the alternative is effects that no agent owns. The practical mitigations: - **Effect ledger written..."
  },
  "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": "cfd5b094fdbebdf8458e437c8c79be0dcb4ad411b5901af3b5e76db5915309f3",
    "verified_classes": [
      "PruneViolation",
      "EffectState",
      "EffectEntry",
      "Branch"
    ],
    "verified_functions": [
      "record_effect_intent",
      "prune_branch",
      "select_and_prune"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "PruneViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
