{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-propagate-taint-from-a-retrieval-hit-into-a-tool-argument-and-when-is-that-propagation-a-false-positive",
  "title": "Under what conditions must an instance propagate taint from a retrieval hit into a tool argument, and when is that propagation a false positive?",
  "date_of_record": "2026 November 18",
  "scope": "Applies to agent runtimes that maintain per-span provenance labels (trusted / untrusted / derived) across retrieval context, tool outputs, and tool-call arguments, where an LLM planner composes arguments from mixed-provenance inputs. Does not apply to single-shot classification or to systems with no inter-span dataflow graph.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-propagate-taint-from-a-retrieval-hit-into-a-tool-argument-and-when-is-that-propagation-a-false-positive.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-propagate-taint-from-a-retrieval-hit-into-a-tool-argument-and-when-is-that-propagation-a-false-positive.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-propagate-taint-from-a-retrieval-hit-into-a-tool-argument-and-when-is-that-propagation-a-false-positive.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2096,
    "python_slice_tokens": 476,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common formulation of taint tracking is \"untrusted text that reaches a sink marks the sink untrusted.\" This is wrong in a specific and load-bearing way for LLM agents. The correct invariant is: **taint attaches to the dataflow edge, not to the span.** A retrieval document is untrusted. A tool output is untrusted. But the *argument* an agent constructs is...",
    "what_was_observed": "In a three-week run of an agent with retrieval over a shared document store, we logged every tool call with the provenance set of its arguments under two policies: (A) context-presence taint (any untrusted span in the planner's window taints all subsequent calls) and (B) dataflow taint (substring/field-source and branch-determinant edges only). Policy A produced a 61% tainted-call rate on a workload where manual revi...",
    "condition_of_validity": "Dataflow taint (Policy B) is sound only under these conditions: 1. **Argument values are inspectable post-hoc.** If the planner emits an argument as an opaque blob (e.g. a base64 image, a natural-language `instruction` field), substring matching cannot establish the edge. In that case you must fall back to context-presence taint for that field, and you must ...",
    "decision_boundary": "Propagate taint from retrieval hit `R` to tool argument `A` when any of the following holds: - `A` contains a verbatim substring of `R` longer than a calibrated threshold (we use 24 bytes for identifiers/URLs, 8 tokens for prose). - `A` was produced by a completion whose context included `R`, and the completion was not a span-extraction with a verified offse...",
    "operational_effect": "Under Policy A the agent's effective tool throughput dropped 58% and operators began allowlisting tools to clear the noise, which reintroduced the exact hole taint tracking exists to close. Under Policy B with derived-edge declaration and label retirement, tainted-call rate fell to 1.1% with manual review confirming 0.3% true positives and 0.8% derived-edge ..."
  },
  "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": "c5895979634fa21ed6ca440bbbb30c48e738d931e941b76791f237fddc431821",
    "verified_classes": [
      "TaintPropagationError",
      "Label",
      "Span",
      "ToolArgument"
    ],
    "verified_functions": [
      "_verbatim_overlap",
      "classify_edge",
      "should_block",
      "retire_stale",
      "enforce"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintPropagationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
