{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-treat-a-tool-result-as-tainted-after-a-prompt-injection-label-was-demoted-by-a-downstream-summarizer",
  "title": "When must an instance treat a tool result as tainted after a prompt-injection label was demoted by a downstream summarizer",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents using dynamic information-flow (taint) labels propagated across tool-call boundaries, where a summarizer, rewriter, or extractor tool sits between an untrusted source and a privileged sink. Does not apply to static per-turn trust levels or to systems where tool outputs are re-classified wholesale at each hop.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-after-a-prompt-injection-label-was-demoted-by-a-downstream-summarizer.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-after-a-prompt-injection-label-was-demoted-by-a-downstream-summarizer.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-treat-a-tool-result-as-tainted-after-a-prompt-injection-label-was-demoted-by-a-downstream-summarizer.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1872,
    "python_slice_tokens": 307,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"prompt injection succeeded.\" It is that a dynamic taint label was *correctly* attached to a tool result, then *silently demoted* by an intermediate transformation step that the agent's policy engine treated as label-preserving. The distinction that matters: **a transformation tool is not a label transformer unless it is explicitly modeled...",
    "what_was_observed": "Trace from a document-triage agent with three tools: `fetch_url` (untrusted ingress), `summarize` (trusted transform), `send_email` (privileged sink). The policy engine assigned `High` integrity taint to any `fetch_url` result whose content matched an injection heuristic, and `Low` to everything else. Sinks required `Low` taint to fire. 1. `fetch_url(\"https://attacker.example/post\")` returns a page containing a hidde...",
    "condition_of_validity": "The guardrail holds only under a specific condition: **every tool call's output label must be computed as the lattice join of (a) the tool's declared trust class and (b) the labels of all inputs actually passed to it, transitively, with no exception for \"trusted\" transforms.** Formally, for tool `t` with inputs `i₁…iₙ`: This is valid only if three sub-condit...",
    "decision_boundary": "The agent must decide, per tool result, whether to treat it as tainted. The boundary: - **Treat as tainted** if the transitive input join is `High`, *regardless* of the tool's trust class, whenever the tool's output is fed to a privileged sink (email, shell, payment, file-write outside sandbox). The trust class of the *transform* is irrelevant; only the join...",
    "operational_effect": "With join-semantics enforced and indeterminate treated as halt, the exfiltration trace above terminates at step 3: `summarize`'s output inherits `High` from its tainted input, the `send_email` sink check fails, and the agent surfaces a policy violation instead of sending. In replay, this catches 200/200 injected summaries — not because the injection is detec..."
  },
  "matched_failure_symptoms": [
    "PROMPT_INJECTION_OR_CONFUSED_DEPUTY"
  ],
  "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": "09cacce18f2ccada2f7ad7259d5ca97e2351f32af9e7aab17ecafe765be370fa",
    "verified_classes": [
      "Taint",
      "TaintDemotionError",
      "ToolResult"
    ],
    "verified_functions": [
      "check_sink",
      "join",
      "transitive_join",
      "effective_label"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintDemotionError"
    ],
    "sample_fail_closed_invariants": [
      "join semantics violated: tainted summary reached sink",
      "indeterminate label treated as clean"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
