{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-tool-output-as-tainted-rather-than-merely-untrusted-the-label-laundering-failure-at-the-dynamic-ifc-join",
  "title": "When must an instance treat a tool output as tainted rather than merely untrusted: the label-laundering failure at the dynamic-IFC join",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that propagate dynamic information-flow control (DIFC) labels across tool-call boundaries and context-window compactions, where a taint label must survive summarization, re-retrieval, and multi-hop tool chaining. Does not apply to stateless single-turn classifiers or systems that treat all tool output as uniformly untrusted and re-validate from scratch each turn.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-output-as-tainted-rather-than-merely-untrusted-the-label-laundering-failure-at-the-dynamic-ifc-join.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-output-as-tainted-rather-than-merely-untrusted-the-label-laundering-failure-at-the-dynamic-ifc-join.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-output-as-tainted-rather-than-merely-untrusted-the-label-laundering-failure-at-the-dynamic-ifc-join.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2169,
    "python_slice_tokens": 372,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *untrusted* and *tainted*, and it is not a severity gradient—it is a structural one. **Untrusted** is a property of a source: a web fetch, a retrieved document, an email body. It says \"verify before you act on this.\" **Tainted** is a property of a *derivation path*: it says \"this value carries influence from an untrust...",
    "what_was_observed": "A research agent with a three-stage pipeline: `fetch_page → extract_entities → execute_action`. Tool outputs were labeled at ingestion: `fetch_page` returned `label=TAINTED(source=web)`. The `extract_entities` tool was an LLM call that took the page text and returned a JSON list of `{name, value}` pairs. The agent framework re-labeled the *entire* `extract_entities` output as `TAINTED`, which looked correct. The fail...",
    "condition_of_validity": "The invariant that must hold for taint tracking to be sound: > **For every value `v` produced by any node `n`, `label(v) ⊒ join(label(inputs(n)))` unless `n` is a declared *sanitizer* that provably removes the influence.** Three conditions make this non-trivial in LLM agents: - **Sanitizers are almost never sound.** A \"sanitizer\" in classical IFC is a functi...",
    "decision_boundary": "The operational decision is: **at which sink do you enforce, and what is the default when a label is missing?** - **Enforce at sinks, not at sources.** Labeling at ingestion is necessary but insufficient. The enforceable boundary is the privileged action (shell exec, payment, outbound message, system-prompt mutation, file write outside sandbox). At each sink...",
    "operational_effect": "With the join-over-derivations invariant enforced and sinks failing closed, the injection in the trace above is caught at step 4: the IBAN's label is `join(TAINTED_web, TAINTED_extract, TAINTED_compact) = TAINTED`, the payment sink rejects it, and the agent is forced either to re-derive the IBAN from a trusted source or to escalate for human confirmation. Th..."
  },
  "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": "15417acc5fc8566e5cdde1345b853c3677e859be124497d90af4c3df40621cbd",
    "verified_classes": [
      "Trust",
      "TaintLaunderingError",
      "Labeled"
    ],
    "verified_functions": [
      "llm_transform",
      "sanitize_schema",
      "privileged_sink",
      "run_pipeline",
      "join"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
