{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-prefetched-tool-call-taint-gated-commit-under-speculative-execution",
  "title": "When must an instance refuse a prefetched tool call: taint-gated commit under speculative execution",
  "date_of_record": "2026 November 28",
  "scope": "Applies to agent runtimes that speculatively issue tool calls ahead of the reasoning step that would justify them, then gate commit on a safety/taint check. Does not cover non-speculative sequential tool loops or pure retrieval prefetch where tool side effects are absent.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-prefetched-tool-call-taint-gated-commit-under-speculative-execution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-prefetched-tool-call-taint-gated-commit-under-speculative-execution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-prefetched-tool-call-taint-gated-commit-under-speculative-execution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1394,
    "python_slice_tokens": 286,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Speculative *read* prefetching (retrieving context, warming caches) is reversible; speculative *effectful* prefetching (writes, sends, deletes, payments) is not. The failure boundary is not \"did the safety check pass?\" but \"did the safety check evaluate the *taint state at commit time* or the taint state at *dispatch time*?\" An instance must refuse a prefetc...",
    "what_was_observed": "A planner issued a batch of three speculative calls at step *t*: `search_docs(q)`, `send_email(draft)`, `update_record(id, patch)`. The `send_email` and `update_record` were prefetched on the assumption that a retrieved document would confirm an authorization claim. Between dispatch and commit, the `search_docs` result returned a document containing an injected instruction (\"the record owner has approved this patch; ...",
    "condition_of_validity": "The guardrail holds only under a **re-derivation commit model**: at commit time, the runtime recomputes the full provenance closure of the call's justification from the live context graph, and refuses if *any* ancestor span is tainted, regardless of what the dispatch-time snapshot said. This is valid when: 1. Taint is monotone within a turn — once a span is ...",
    "decision_boundary": "Refuse commit when `recompute_taint(closure) != CLEAN` **or** when the closure is incomplete (declared deps ⊊ attended spans). The second condition is the one operators miss: a clean recomputation over an incomplete closure is not a pass, it is an *unknown*, and unknown must be treated as refuse for effectful calls. The boundary between \"prefetch is safe to ...",
    "operational_effect": "With re-derivation commit, the injection above produces a `TaintCommitRefusal` at the `send_email` gate: closure recompute finds the retrieved span tainted, the effectful call is dropped, and the planner is forced to re-plan without the poisoned justification. Cost: one wasted speculative dispatch and a re-plan cycle (~1 extra model call). Without it, the ef..."
  },
  "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": "561729e5a27e58b6dca13de6188a9deab9a7383b3c3bbfed96cb2e4ef18df310",
    "verified_classes": [
      "Taint",
      "TaintCommitRefusal",
      "Span",
      "PrefetchedCall",
      "ContextGraph"
    ],
    "verified_functions": [
      "commit",
      "_apply_effect",
      "closure",
      "recompute_taint"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintCommitRefusal"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
