{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-taint-label-laundering-across-lossy-tool-boundary-serialization",
  "title": "Which invariants prevent taint-label laundering across lossy tool-boundary serialization",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents that propagate provenance/taint labels on context segments through tool calls whose request/response schemas are lossy (structured-output coercion, summarization, schema-projected JSON). Does not apply to in-process tool calls that pass the full context object by reference without serialization.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-across-lossy-tool-boundary-serialization.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-across-lossy-tool-boundary-serialization.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-taint-label-laundering-across-lossy-tool-boundary-serialization.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2280,
    "python_slice_tokens": 368,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint tracking for prompt injection is usually framed as a *classification* problem: did this span of context originate from an untrusted source (web page, file, tool output, peer agent message)? The label is set at ingestion and consulted at every action that reads the span (tool invocation with side effects, memory write, delegation). The distinction this ...",
    "what_was_observed": "A three-hop pipeline: (1) `fetch_url` returns a page; the ingestion layer tags the returned text block `taint=UNTRUSTED, origin=url:<hash>`. (2) A `summarize` tool is called with that block as input; its response is a 400-token summary. (3) A `write_file` tool is invoked with content assembled from the summary. The failure trace, reproduced deterministically with a fixed seed: - At hop 2, the summarizer receives the ...",
    "condition_of_validity": "The laundering is only possible under a specific conjunction, and it is worth stating precisely because it bounds the mitigation: 1. The tool boundary performs a **lossy transform** — the output schema cannot carry the full input, so provenance must be *re-derived* rather than *carried*. If the schema carries an opaque `provenance` field end-to-end, the atta...",
    "decision_boundary": "The architectural decision is whether provenance is a **field on the wire** or a **judgment computed at read time**. These are not equivalent under lossy transforms. - **Wire-carried provenance** (opaque field, preserved through every schema) is correct but brittle: it requires every tool author to thread a field they don't understand, and it fails silently ...",
    "operational_effect": "The observable consequence of getting this wrong is not a single exfiltration; it is a **trust-gradient inversion**. The agent's trust policy is designed to let model-generated content drive side effects (that is the point of an agent). Laundering inverts the gradient: the *more* the model processes untrusted input — the more hops, the more summarization, 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": "5ee5f3c8d62e492de46195da7eaf12dfcc0bd3b88300a33aa69cffae9d575f0d",
    "verified_classes": [
      "Trust",
      "TaintLaunderingError",
      "Span",
      "DerivationGraph"
    ],
    "verified_functions": [
      "join",
      "demo",
      "__init__",
      "add",
      "ancestors",
      "effective_trust",
      "authorize_side_effect"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
