{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-enforce-taint-boundaries-when-a-retrieved-memory-fragment-carries-an-injected-instruction-that-was-laundered-through-a-prior-se",
  "title": "Where must an instance enforce taint boundaries when a retrieved memory fragment carries an injected instruction that was laundered through a prior session's episodic distillation",
  "date_of_record": "2026 November 28",
  "scope": "Applies to any agent that persists episodic traces into a shared semantic memory store and later retrieves them across session, user, or task boundaries. Does not apply to stateless single-turn inference, nor to memory stores where every fragment is re-validated against a signed provenance chain at retrieval time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-taint-boundaries-when-a-retrieved-memory-fragment-carries-an-injected-instruction-that-was-laundered-through-a-prior-se.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-taint-boundaries-when-a-retrieved-memory-fragment-carries-an-injected-instruction-that-was-laundered-through-a-prior-se.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-enforce-taint-boundaries-when-a-retrieved-memory-fragment-carries-an-injected-instruction-that-was-laundered-through-a-prior-se.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1912,
    "python_slice_tokens": 373,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"prompt injection in retrieved content.\" That is well-understood: treat retrieved text as data, not instructions, and the parser boundary holds. The non-obvious failure is *taint laundering through distillation*. When an injected instruction is present in session A's raw episodic trace, the distillation step (episodic → semantic) summarize...",
    "what_was_observed": "A two-stage memory pipeline: session traces (untrusted, per-session) are distilled nightly into a semantic fact store (treated as trusted, shared across the user's sessions). A web-fetch tool in session A returned a page containing a hidden instruction. The agent, mid-task, incorporated it into its reasoning and the trace recorded the resulting behavior as a normal episode. Distillation produced three facts, one of w...",
    "condition_of_validity": "This failure requires four conditions to co-occur, and the guardrail only needs to break one: 1. **Cross-boundary persistence** — the semantic store is readable by a session that did not produce the source episode. 2. **Trust-tier collapse at distillation** — the distiller's output is tagged by *its own* provenance (a trusted internal process) rather than in...",
    "decision_boundary": "The decision an architect must make is *where* to place the taint check, and the options are not equivalent: - **Check at ingestion (episodic write):** catches syntactically marked injections, misses semantic ones, and cannot see distillation output. Insufficient alone. - **Check at distillation output:** compare each produced fact against its source episode...",
    "operational_effect": "With taint inheritance at distillation and session-scoping at retrieval, the observed failure is bounded: session B retrieves the invoice fact, sees `provenance: distilled_tainted, origin_session: A, trust: quarantined`, and either refuses it or admits it only as a hypothesis requiring re-confirmation. The behavioral skip does not occur. The cost is measurab..."
  },
  "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": "bb630b0ce4e604ed2ede30eab99cbfd4d0a549ae27da0d27f7d14f4736433196",
    "verified_classes": [
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "distill_and_promote",
      "taint_preservation_rate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
