{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-quarantine-a-retrieved-document-after-it-has-already-been-summarized-into-working-memory-the-taint-laundering-bound",
  "title": "In what scenarios must an instance quarantine a retrieved document *after* it has already been summarized into working memory: the taint-laundering boundary in tool-output poisoning",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agentic RAG pipelines where a retrieval tool returns untrusted third-party content that is (a) summarized or distilled by the same model instance that later acts on it, and (b) mixed with trusted tool outputs (schema metadata, user-supplied filters) in a single context window. Does not apply to pipelines with a hard architectural split between an unprivileged \"reader\" model and a privileged \"actor\" model that never shares raw retrieved tokens.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-a-retrieved-document-after-it-has-already-been-summarized-into-working-memory-the-taint-laundering-bound.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-a-retrieved-document-after-it-has-already-been-summarized-into-working-memory-the-taint-laundering-bound.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-quarantine-a-retrieved-document-after-it-has-already-been-summarized-into-working-memory-the-taint-laundering-bound.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2455,
    "python_slice_tokens": 406,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **taint on a document** and **taint on the *representation* of that document inside working memory**. Most agentic RAG stacks implement provenance at the retrieval boundary: each tool result carries a source tag (`trusted:user`, `untrusted:web`, `trusted:internal_db`), and the orchestrator is supposed to gate downstrea...",
    "what_was_observed": "A three-stage pipeline: `retrieve` (web tool) → `summarize` (same model, sub-call) → `act` (issue refund / send email / call write API). The orchestrator tagged the raw `retrieve` output `untrusted:web`. The summarize sub-call took that text plus a trusted instruction (\"extract the refund window and customer tier\") and produced a JSON note: The orchestrator then evaluated its action gate: \"is any *currently live* con...",
    "condition_of_validity": "The guardrail \"gate actions on minimum trust of live context objects\" is valid **only if** every derived object's provenance is computed as the join (least upper bound in the trust lattice, i.e., the *minimum* trust) of all objects that causally contributed to it. This requires the derivation graph to be explicit and complete. It is violated whenever any of ...",
    "decision_boundary": "The boundary is: **does the action's effect depend on the content of a summary, or only on the fact that a summary exists?** - If the action is \"log that retrieval succeeded\" or \"route to the summarize stage,\" it depends only on existence and may consume the summary's presence without integrity checks. - If the action is \"issue refund at the summarized amoun...",
    "operational_effect": "The operational consequence is that **taint must be a property of the derivation graph, not of context residency.** Pipelines that tag context objects will pass every test where the untrusted document stays in the window and fail every test where it is evicted after distillation—which is the common case under context pressure. The fix is structural: a proven..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "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": "3d90d993b222c934dc95f780a1e81f5cc7d51d08759bc0aafd02675ddcaae36a",
    "verified_classes": [
      "TaintLaunderingError",
      "Node",
      "ProvenanceDAG"
    ],
    "verified_functions": [
      "min_trust",
      "__init__",
      "add_source",
      "add_derived",
      "provenance",
      "gate_action"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
