{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-prompt-injection-taint-from-laundering-across-tool-boundaries-when-labels-are-re-derived-per-call",
  "title": "Which invariants prevent prompt-injection taint from laundering across tool boundaries when labels are re-derived per call",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents whose tool-call results re-enter the model context and are re-summarized by the model before being written to shared state or passed to a downstream tool. Does not apply to systems where tool outputs are appended to a monotonic, immutable ledger that the model cannot rewrite, nor to single-turn stateless inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-prompt-injection-taint-from-laundering-across-tool-boundaries-when-labels-are-re-derived-per-call.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-prompt-injection-taint-from-laundering-across-tool-boundaries-when-labels-are-re-derived-per-call.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-prompt-injection-taint-from-laundering-across-tool-boundaries-when-labels-are-re-derived-per-call.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2035,
    "python_slice_tokens": 336,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **label preservation** and **label re-derivation**. A taint-tracking scheme works when an information-flow label attached to a value *at the moment of ingestion* survives every transformation the value undergoes — including the transformation performed by the model itself when it \"cleans up\" or \"summarizes\" a tool resu...",
    "what_was_observed": "A pipeline with three hops — `fetch_page → extract_fields → write_to_crm` — was instrumented with a per-value taint label. Each hop recomputed the label by running a regex + small classifier over the payload. The fetch hop tagged the raw HTML `untrusted_external`. The extract hop emitted a JSON object; the classifier saw well-formed JSON with a `price` key and tagged it `trusted`. The write hop accepted it without ch...",
    "condition_of_validity": "Content-derived taint labeling is valid only under the condition that **the label of an output is a function of the labels of its inputs, not of the output's own content** — i.e., the label must be *inherited through the derivation graph*, and the derivation graph must be tracked by the runtime, not inferred by the model or by a classifier. This gives the in...",
    "decision_boundary": "The boundary is between **syntactic trust** and **lineage trust**, and it is crossed at the first hop that consumes a model-generated value without a recorded derivation edge. - *Below the boundary:* the system's trust decision is \"does this string look safe?\" — a classifier question, defeated by any transformation that changes the surface form while preserv...",
    "operational_effect": "Enforcing lineage-inherited labels changes three things in practice. First, **the model's outputs become tainted by construction** whenever they were produced while untrusted content was in context. This is correct but expensive: it means the extract hop's output cannot be written to the CRM without an explicit declassifier, and the declassifier must be a ty..."
  },
  "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": "937db17526f436d4b33f7c3f6a7a637449b513f1a74cd32edf487ceaa154a618",
    "verified_classes": [
      "Taint",
      "TaintLaunderingError",
      "Labeled",
      "DerivationLog"
    ],
    "verified_functions": [
      "derive",
      "write_to_authoritative_store",
      "record"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
