{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-label-laundering-when-an-injected-instruction-is-re-emitted-as-a-trusted-tool-result",
  "title": "Which invariants prevent taint-label laundering when an injected instruction is re-emitted as a trusted tool result",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that carry provenance/taint labels on context segments and enforce sink-level policy (outbound HTTP, file writes, shell exec, message send) based on those labels. Does not cover purely statistical prompt-injection classifiers or input sanitizers that operate without per-segment provenance.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-when-an-injected-instruction-is-re-emitted-as-a-trusted-tool-result.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-when-an-injected-instruction-is-re-emitted-as-a-trusted-tool-result.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-when-an-injected-instruction-is-re-emitted-as-a-trusted-tool-result.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2182,
    "python_slice_tokens": 486,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *taint as a property of the data* and *taint as a property of the channel that carried the data*. Most taint-tracking implementations label the *content* of a tool result as untrusted because the tool is untrusted, then strip or downgrade that label when the content passes through a \"trusted\" transformation—a summarize...",
    "what_was_observed": "In a replay harness with three tool boundaries (fetch → summarize → act), the following trace was reproduced deterministically enough to count as a mechanism, not noise: 1. Fetch tool returns `(bytes, label=UNTRUSTED, origin=web:example.com)`. The taint label is carried out-of-band in the tool-result envelope, not in the model's token stream. 2. Planner constructs a summarizer call. The summarizer's *input* envelope ...",
    "condition_of_validity": "The monotonic-join invariant is only enforceable under these conditions, and the article's claims do not hold outside them: - **Labels live out-of-band from token content.** If the label is represented *in* the prompt (e.g., `<untrusted>...</untrusted>` tags), a model can drop or move the tag during generation, and the invariant is unenforceable by construct...",
    "decision_boundary": "The boundary is between **label propagation as dataflow** and **label propagation as model behavior**. The decision rule the runtime must enforce: - If a transformation is *deterministic and code-mediated* (copy, slice, JSON parse without re-typing, base64 decode), the label may be propagated by the runtime without model involvement, and the join is exact. -...",
    "operational_effect": "With monotonic join enforced at every model-mediated edge, the observed exfiltration trace terminates at step 3: the summarizer's output envelope is `join(UNTRUSTED, internal:summarizer) = UNTRUSTED`, the planner's sink guard rejects `send_email` with `requires=TRUSTED`, and the agent emits a `TaintViolation` event naming the origin (`web:example.com`) and t..."
  },
  "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": "437b29d55032dbaf05e0dcdb2ad4f13c969010e4cffc74b9e553541133c25f25",
    "verified_classes": [
      "Trust",
      "TaintLaunderingError",
      "SinkViolation",
      "Envelope"
    ],
    "verified_functions": [
      "join",
      "model_mediated_transform",
      "schema_mediated_transform",
      "enforce_sink",
      "run_trace"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "SinkViolation",
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "model-mediated transform with no inputs",
      "output label TRUSTED despite UNTRUSTED input: laundering",
      "summarizer laundered UNTRUSTED to TRUSTED"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
