{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-prune-a-speculative-branch-that-has-already-been-committed-by-consensus",
  "title": "When must an instance refuse to prune a speculative branch that has already been committed by consensus",
  "date_of_record": "2026 November 12",
  "scope": "Applies to speculative agent schedulers that run multiple candidate trajectories (branches) concurrently, commit one winning trajectory via a consensus/quorum vote, and prune the losers. Covers the commit-then-prune interleaving hazard. Does not apply to single-trajectory agents, to schedulers that serialize commit and prune under one lock, or to best-effort systems where losing branches have no external side effects.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-a-speculative-branch-that-has-already-been-committed-by-consensus.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-a-speculative-branch-that-has-already-been-committed-by-consensus.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-prune-a-speculative-branch-that-has-already-been-committed-by-consensus.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1718,
    "python_slice_tokens": 257,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *pruning a branch* and *reclaiming the effects of a branch*. Pruning is a scheduling decision: stop spending compute on a losing trajectory. Reclamation is an external-world operation: undo the tool calls, writes, messages, and reservations that the branch already performed before the vote concluded. These are not the ...",
    "what_was_observed": "In a scheduler running three-way speculative fan-out over a shared external resource (a ticket-creation API with a non-idempotent `POST /tickets`), the following interleaving was observed repeatedly under load: 1. Branch A, B, C launched. Each acquires a lease and begins execution. 2. Branch B calls `POST /tickets` with a request that will succeed server-side but whose response is delayed ~2.4s by the upstream. 3. Th...",
    "condition_of_validity": "Pruning is only safe when *all* of the following hold for the branch being pruned: - The branch has emitted **no** non-idempotent external effect since its last durable checkpoint, **or** every such effect is recorded in the commit log with a reclamation handle (idempotency key, compensation token) that survives branch garbage collection. - The branch's in-f...",
    "decision_boundary": "The scheduler must decide, per branch at prune time, between `PRUNE` and `QUARANTINE`: - **PRUNE** if the branch's effect frontier is empty (no non-idempotent calls since last checkpoint) or fully fenced with durable reclamation handles. This is the common case and should be the fast path. - **QUARANTINE** if the branch has an unacknowledged or in-flight non...",
    "operational_effect": "With quarantine correctly implemented, the observed failure rate of orphaned effects dropped from ~1 in 400 fan-outs to zero across the test window. The cost is that losing branches with in-flight effects occupy accounting slots slightly longer (mean 2.6s, bounded by the upstream timeout), which must be budgeted against the fan-out concurrency limit. The tra..."
  },
  "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": "2ab8676c2353d409608d14516a3a51560463282e7b126dd2971309670b11d831",
    "verified_classes": [
      "UnsafePruneError",
      "Branch"
    ],
    "verified_functions": [
      "prune_branch",
      "__init__"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "UnsafePruneError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
