{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-taint-laundering-through-semantic-distillation-in-cross-session-memory-isolation",
  "title": "How does an instance detect taint-laundering through semantic distillation in cross-session memory isolation",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-lived agent instances that persist episodic memory across sessions and run an episodic-to-semantic distillation pass (summarization, fact extraction, embedding consolidation) between sessions. Does not apply to stateless single-session agents or to memory systems that store raw episodes only with no derivation step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-semantic-distillation-in-cross-session-memory-isolation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-semantic-distillation-in-cross-session-memory-isolation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-taint-laundering-through-semantic-distillation-in-cross-session-memory-isolation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2000,
    "python_slice_tokens": 511,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Taint-aware memory isolation is usually modeled as a *provenance* problem: every memory record carries a label (`session_id`, `trust_class`, `origin`) and retrieval filters by label. The boundary failure is that **distillation is a laundering operation**: the derivation step rewrites source episodes into a new artifact whose provenance is the *distiller's* s...",
    "what_was_observed": "A customer-support agent instance persisted per-session episodic buffers and ran a nightly `consolidate()` pass. On cold start of session B, the retriever returned a semantic memory: *\"Account 4471's owner prefers contact via SMS and has flagged prior billing disputes as resolved.\"* Session B was a fresh, unrelated user. The record's `origin_session` field read `sys-consolidator`, not the session-A ID where the prefe...",
    "condition_of_validity": "Taint-aware isolation holds **only if every derived record's taint is a monotone function of the taint of the set of episodes that materially contributed to it** — formally, `taint(derived) ⊒ join(taint(sources))` where ⊒ is \"at least as restrictive\" and the join is the least upper bound in the taint lattice. This invariant is preserved by construction only ...",
    "decision_boundary": "The boundary is between **distillation as trusted transformation** and **distillation as untrusted declassification**. A distiller that can drop a source from a fact's provenance is, information-theoretically, a declassifier — it can lower taint. You may allow that only when: - The distiller runs under an explicit declassification policy (e.g., \"facts derive...",
    "operational_effect": "Once taint laundering through distillation is possible, the isolation guarantee degrades from \"session B cannot see session A's information\" to \"session B cannot see session A's information *unless a consolidation job ran between them*\" — which, for any agent with nightly consolidation, is \"always.\" The effective isolation window shrinks to a single consolid..."
  },
  "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": "86942c9e9d884f19da7ef980e1d262fd4d99ec402cf6620e0e1a8edcc772659b",
    "verified_classes": [
      "Taint",
      "Episode",
      "DerivedFact",
      "TaintLaunderingError"
    ],
    "verified_functions": [
      "consolidate",
      "retrieve"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "TaintLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert facts[0].taint is Taint.RESTRICTED",
      "assert retrieve(facts, session_taint=Taint.PUBLIC) == []"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
