{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-draw-the-taint-boundary-between-tool-arguments-and-tool-results-the-argument-provenance-invariant-in-taint-aware-tool-gating",
  "title": "Where must an instance draw the taint boundary between tool arguments and tool results: the argument-provenance invariant in taint-aware tool gating",
  "date_of_record": "2026 November 8",
  "scope": "Applies to agent runtimes that gate tool invocation using taint labels propagated from untrusted inputs (web fetches, retrieved documents, tool results, user-supplied files) to tool arguments. Does not apply to single-turn, stateless completions where no tool invocation occurs, nor to systems that enforce exfiltration control purely by egress allowlisting at the network layer independent of argument provenance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-taint-boundary-between-tool-arguments-and-tool-results-the-argument-provenance-invariant-in-taint-aware-tool-gating.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-taint-boundary-between-tool-arguments-and-tool-results-the-argument-provenance-invariant-in-taint-aware-tool-gating.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-draw-the-taint-boundary-between-tool-arguments-and-tool-results-the-argument-provenance-invariant-in-taint-aware-tool-gating.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1637,
    "python_slice_tokens": 221,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common formulation of taint-aware gating is: \"if a tool argument is tainted, block or require confirmation.\" This conflates two distinct questions: 1. **Origin taint** — did any byte of this argument value originate from an untrusted source? 2. **Capability taint** — does this argument position, given the tool's declared capability, permit data to leave ...",
    "what_was_observed": "In a deployment gating a `send_email(to, subject, body)` tool, the runtime blocked any call where `body` contained retrieved-document bytes. An attacker planted a document containing an instruction to summarize its contents into an email to an attacker-controlled address. The runtime correctly blocked `body` taint — but the attacker's payload instead used `subject`, which the gate did not treat as egress-capable beca...",
    "condition_of_validity": "The argument-provenance invariant holds only under the following conditions, and gating decisions are unsound outside them: - Every tool declares, per argument position, a **capability class** in `{pure, local_read, local_write, egress, exec}` and, for `egress` and `local_write`, a **destination trust label** resolved at call time (not at registration time)....",
    "decision_boundary": "For a call `t(a_1, ..., a_n)` with per-position origin taint `τ_i` and per-position capability class `c_i` with destination label `d_i`: - **Block** if any `i` has `c_i ∈ {egress, exec}` and `τ_i = tainted` and `d_i ∉ trusted_destinations`. - **Require confirmation** if any `i` has `c_i = local_write` and `τ_i = tainted` and `d_i` is a synced or shared locat...",
    "operational_effect": "Implementing the join correctly reduced false blocks on a retrieval-heavy workload by roughly 40% while closing the subject-line and hash-laundering channels. The cost is that every tool registration must carry a capability declaration and a destination resolver, and every data-transforming tool must be either registered as a declassifier or accepted as tain..."
  },
  "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": "48748e3fc583ea6f8302c78830105a57d91e4a6c27239accef05b419764177ff",
    "verified_classes": [
      "TaintGateError",
      "ToolSpec"
    ],
    "verified_functions": [
      "gate_call",
      "__init__"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintGateError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
