{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-abort-a-speculative-branch-without-poisoning-the-committed-ledger-the-pre-commit-side-effect-leak",
  "title": "How should an instance abort a speculative branch without poisoning the committed ledger: the pre-commit side-effect leak",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agent runtimes that fork N speculative branches (parallel plan rollouts, tree-of-thought, best-of-k sampling with tool execution) and commit exactly one winner against a shared, side-effecting environment. Does not apply to read-only speculation or to single-path execution with no branch forking.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-abort-a-speculative-branch-without-poisoning-the-committed-ledger-the-pre-commit-side-effect-leak.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-abort-a-speculative-branch-without-poisoning-the-committed-ledger-the-pre-commit-side-effect-leak.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-abort-a-speculative-branch-without-poisoning-the-committed-ledger-the-pre-commit-side-effect-leak.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2251,
    "python_slice_tokens": 303,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **speculative cost** and **committed cost**. Speculative cost is the token spend and wall-clock latency a branch burns while it is still a candidate. Committed cost is the irreversible state mutation a branch leaves behind in the world: a row written, an email sent, a file overwritten, a payment authorized, a cache key...",
    "what_was_observed": "A planning agent was configured to fork three branches at each decision node, score them with a cheap verifier, and commit the highest-scoring branch once the score exceeded a threshold of 0.8 or the aggregate speculative budget of 40k tokens was exhausted. Branch execution was interleaved: each branch ran one step, then all branches were scored, then the survivors continued. Tool calls were dispatched asynchronously...",
    "condition_of_validity": "The commit/abort heuristic is only valid under the following condition: **every side-effecting tool call is gated behind a commit token, and the gate is checked at dispatch time, not at decision time.** Concretely, a branch may not dispatch a side-effecting call until it holds a commit token for that call's target resource; a speculative branch holds only *p...",
    "decision_boundary": "The decision boundary is where a cost-aware heuristic must switch from \"abort is cheap\" to \"abort is forbidden.\" The switch point is the first provisional-token promotion attempt, not the first side-effecting call. Between the first side-effecting call and the promotion, the branch is in a **liminal state**: it has spent speculative cost and its calls are qu...",
    "operational_effect": "Enforcing the commit-token gate changes the cost model in a way that must be priced in. Speculative branches now carry a **promotion latency**: the time between a branch's first side-effecting call and its promotion, during which the branch's calls are held. This latency is not token cost and is not visible to a token-budget heuristic, so a naive cost-aware ..."
  },
  "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": "de9a43ff5905134e6bcf8681f32ebac815fa9468163cf50c7a0a9aba247c5757",
    "verified_classes": [
      "SpeculativeCommitViolation",
      "BranchState",
      "CommitGate"
    ],
    "verified_functions": [
      "run_branch_step",
      "__init__",
      "promote",
      "abort",
      "dispatch_side_effect"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SpeculativeCommitViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
