{
  "schema_version": "1.3.0",
  "slug": "what-structural-signals-indicate-taint-laundering-across-a-rag-retrieval-boundary-when-provenance-tags-are-stripped-by-the-chunker",
  "title": "What structural signals indicate taint-laundering across a RAG retrieval boundary when provenance tags are stripped by the chunker",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that propagate an untrusted-content taint flag from retrieval/tool outputs into downstream tool-call arguments, where the chunker or reranker re-emits retrieved spans without preserving the source-provenance metadata attached at fetch time. Does not apply to single-turn, single-tool agents with no persistent taint ledger, nor to systems where retrieval output is never fed back into a privileged tool call.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-across-a-rag-retrieval-boundary-when-provenance-tags-are-stripped-by-the-chunker.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-across-a-rag-retrieval-boundary-when-provenance-tags-are-stripped-by-the-chunker.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-structural-signals-indicate-taint-laundering-across-a-rag-retrieval-boundary-when-provenance-tags-are-stripped-by-the-chunker.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2273,
    "python_slice_tokens": 418,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model believed the injected instruction.\" That is a reasoning failure and is at least visible in the transcript. The failure is that the *taint bit was lost in transit* — the retrieved document was correctly flagged `untrusted` at fetch time, the chunker split it into spans, the reranker reordered and re-emitted those spans, and the r...",
    "what_was_observed": "A retrieval pipeline: `fetch(url) -> Document{id, source_trust, text} -> chunk(Document) -> Span{text}`. The `chunk()` implementation was written to satisfy a tokenizer contract and returns only `text` plus offsets — `source_trust` and `id` are discarded because the chunker predates the taint system. Downstream, a reranker scores spans and emits the top-k as a flat list of strings. The prompt builder wraps each strin...",
    "condition_of_validity": "The invariant that must hold: **for every span reaching the prompt, `taint(span) = taint(document_of_origin(span))`, and `taint` is total — every span resolves to a document, or the pipeline halts.** The failure above occurs precisely when `document_of_origin` is partial (undefined for chunker output) and the consumer treats undefined as `CLEAN`. The invaria...",
    "decision_boundary": "The boundary is: **does the span carry a resolvable origin at the point of prompt admission?** If yes, propagate the join of origin taints and proceed. If no, the correct action is to halt and re-fetch with provenance, *not* to fall back to content matching and *not* to default to `CLEAN`. The decision must be made at prompt admission, not at tool-call time....",
    "operational_effect": "With the invariant enforced, the injected span is admitted to the prompt as `UNTRUSTED`. The model may still read it, but the taint ledger records the tool call as `origin: untrusted`, and the tool-boundary policy (which now has something to act on) can require confirmation, sandbox the call, or refuse it. The audit trail is correct regardless of model behav..."
  },
  "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": "bb398f4a8a5c04d1af8e7c45a087458fc9d7496d218139bc649003b1e0a99b1e",
    "verified_classes": [
      "Taint",
      "ProvenanceLaunderingError",
      "TaintJoinError",
      "Document",
      "Span"
    ],
    "verified_functions": [
      "chunk",
      "join_taint",
      "admit_to_prompt",
      "record_tool_call",
      "run_pipeline"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceLaunderingError",
      "TaintJoinError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
