{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-launders-a-tainted-memory-through-episodic-to-semantic-distillation",
  "title": "What happens when an instance launders a tainted memory through episodic-to-semantic distillation",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agents that carry dynamic information-flow (taint) labels on retrieved context and tool outputs, and that write to long-term memory via a distillation/summarization step. Does not apply to stateless single-turn inference or to systems where memory writes are byte-for-byte copies of labeled source spans with labels preserved.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-a-tainted-memory-through-episodic-to-semantic-distillation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-a-tainted-memory-through-episodic-to-semantic-distillation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-launders-a-tainted-memory-through-episodic-to-semantic-distillation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2147,
    "python_slice_tokens": 284,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Static prompt-injection defenses treat taint as a property of a *message*: an input is flagged untrusted, and untrusted content is fenced off from the instruction channel. Dynamic information-flow labeling treats taint as a property of a *value* that must propagate through every transformation the value undergoes. The distinction that matters here is between...",
    "what_was_observed": "Consider an agent with a memory subsystem: an episodic buffer (recent turns, tool outputs) and a semantic store (distilled facts retrieved by embedding similarity). Tool outputs from external content — web fetches, file reads from user-supplied paths, MCP tool results from third-party servers — are labeled `TAINT:external`. The policy is that `TAINT:external` spans may inform but may not *originate* an action with si...",
    "condition_of_validity": "The laundering failure is bounded by three conditions, all of which must hold for it to occur: - **Generative distillation exists.** There is a step that converts episodic/raw content into semantic/abstract content via model generation rather than extraction. If distillation is extractive (copying labeled spans verbatim with labels attached), the failure doe...",
    "decision_boundary": "The architectural decision is where to place the trust boundary for derived content. Two defensible positions: **Fail-closed derivation.** Every generated span inherits the union of the labels of its inputs. A distillation call whose input buffer contains any `TAINT:external` span produces an output labeled `TAINT:external` (or `TAINT:derived`), and the sema...",
    "operational_effect": "Concretely, the guardrail is a **derivation-closure check at the semantic write boundary**: before a distilled fact enters the trusted tier, the system must either (a) prove the fact's derivation set contains no tainted span, or (b) route it to quarantine. The check must run on the *derivation set*, not on the fact's own label, because the fact's own label i..."
  },
  "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": "274d9be0721229a085e3aa8da4234f3e013246f3afd301055d746e762ec3f8aa",
    "verified_classes": [
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "distill_to_semantic",
      "action_gate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
