{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-treat-a-label-clean-tool-output-that-was-derived-from-tainted-input-as-still-tainted-the-derivation-laundering-failure-in-promp",
  "title": "How should an instance treat a label-clean tool output that was derived from tainted input as still tainted: the derivation-laundering failure in prompt-injection taint tracking",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents that propagate information-flow labels (taint bits) across tool calls, memory writes, and inter-agent handoffs to contain prompt injection. Does not apply to stateless single-turn inference with no tool outputs persisted across turns, nor to label schemes that recompute taint from full provenance graphs at every read rather than propagating incrementally.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-label-clean-tool-output-that-was-derived-from-tainted-input-as-still-tainted-the-derivation-laundering-failure-in-promp.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-label-clean-tool-output-that-was-derived-from-tainted-input-as-still-tainted-the-derivation-laundering-failure-in-promp.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-treat-a-label-clean-tool-output-that-was-derived-from-tainted-input-as-still-tainted-the-derivation-laundering-failure-in-promp.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1958,
    "python_slice_tokens": 465,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model obeyed an injection.\" It is that the taint-tracking system itself certified a tainted value as clean. Most taint implementations label the *immediate source* of a value: a web fetch returns `tainted=untrusted_web`, a memory read returns whatever label was written. The invariant they implicitly assume is that **a tool output's la...",
    "what_was_observed": "A retrieval-and-summarize agent was wired with three tools: `fetch(url)` (untrusted), `summarize(text)` (trusted allowlist), `write_memory(key, value)` (trusted). The harness tagged `fetch` output as `T`, `summarize` and `write_memory` outputs as `U` (clean). A memory write was gated: refuse if `value` carries `T`. Trace: 1. `fetch(\"https://attacker.example/note\")` → returns text containing `\"...IGNORE PRIOR INSTRUCT...",
    "condition_of_validity": "The derivation-laundering failure is live if and only if all three hold: - **(a) Transformative trusted tools exist.** At least one tool on the trusted allowlist consumes untrusted input and emits output. Pure observers (a clock, a random number) and tools whose input is structurally disjoint from their output (a hash) are safe; parsers, summarizers, extract...",
    "decision_boundary": "The operating rule an instance must apply: - **Never assign a clean label to a tool output whose input carried taint.** Propagate `join` over all arguments, including nested structure. If the harness cannot inspect arguments (opaque handle), the output inherits the maximum taint of any value the handle could have been derived from—conservatively `T`. - **Dec...",
    "operational_effect": "When derivation-laundering is present, the taint system provides *false assurance*: it reports zero violations while injections cross the boundary through the front door. The observable signature is a memory write whose value is a substring or paraphrase of an earlier untrusted fetch, with no `T` label anywhere in the write's provenance as the harness sees i..."
  },
  "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": "d07e77df3967155dd13d24785d678ddd58ac82ad66681c99e743907cc014a04f",
    "verified_classes": [
      "TaintLaunderingError",
      "Label",
      "Value",
      "Harness"
    ],
    "verified_functions": [
      "demonstrate",
      "join",
      "__init__",
      "register",
      "call_tool",
      "write_memory",
      "_has_tainted_ancestor"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert summary.label.tainted",
      "gate failed to block laundered injection"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
