{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-retrieved-document-as-a-taint-source-rather-than-as-inert-data",
  "title": "When must an instance treat a retrieved document as a taint source rather than as inert data?",
  "date_of_record": "2026 November 16",
  "scope": "Applies to agent runtimes that propagate information-flow labels (taint) across tool outputs, retrieved context, and model-generated arguments. Does not apply to stateless single-turn inference where no tool call can be made and no output is re-consumed by a privileged sink.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-retrieved-document-as-a-taint-source-rather-than-as-inert-data.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-retrieved-document-as-a-taint-source-rather-than-as-inert-data.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-retrieved-document-as-a-taint-source-rather-than-as-inert-data.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1638,
    "python_slice_tokens": 272,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The common failure is conflating *provenance* with *authority*. A retrieved document has provenance (it came from somewhere), but provenance alone does not make it a taint source. The non-obvious boundary is this: a document becomes a taint source at the moment its content is *eligible to influence a control-flow decision or a privileged argument*, not at th...",
    "what_was_observed": "In a tool-using agent that fetched web pages and then called an internal `send_email` tool, the pipeline labeled the raw HTTP response `UNTRUSTED_EXTERNAL`. The model was asked to \"extract the action items\" from the page. The extracted action items — plain strings in a JSON array — were then passed to `send_email` as the `body` argument. The taint tracker reset the label at the extraction step because the output was ...",
    "condition_of_validity": "The \"treat as inert data\" assumption is valid only when **all** of the following hold: 1. The retrieved content is used solely to produce a natural-language answer to the user, with no subsequent tool invocation whose arguments are derived from it. 2. No privileged sink (write, send, delete, execute, spend, authenticate) consumes any value that is a function...",
    "decision_boundary": "The decision is not \"is this document malicious?\" (unknowable) but \"can a value derived from this document reach a sink that the document's author should not control?\" Formalize as a reachability check: - Let `S` be the set of sink arguments at a call site. - Let `D(v)` be the set of source spans that value `v` transitively derives from. - The call is permit...",
    "operational_effect": "Enforcing this boundary changes three things: 1. **Prompt assembly must be span-aware.** Context chunks carry labels through to the model call, and the runtime records which spans were present when each tool argument was generated. This makes `D(v)` computable at call time rather than only at authoring time. 2. **Sinks must check `FLOW_LABEL`, not `DATA_LABE..."
  },
  "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": "b6807293a5f9a109e4afafae579179bae69df280b9b2e917ed75c6ebf15d043c",
    "verified_classes": [
      "TaintPropagationError",
      "TaintedValue"
    ],
    "verified_functions": [
      "derive",
      "check_sink",
      "run_agent_step",
      "__init__"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintPropagationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
