{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-provenance-laundering-in-persistent-agent-memory-when-a-poisoned-episodic-record-is-re-distilled-into-semantic-memory",
  "title": "Which invariants prevent provenance-laundering in persistent agent memory when a poisoned episodic record is re-distilled into semantic memory",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents whose long-term memory is split into an episodic store (raw interaction records) and a semantic store (distilled facts/preferences), where distillation is performed by the same or a peer LLM. Does not apply to read-only retrieval caches with no write-back path, or to stores where every write carries an externally signed human attestation.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-laundering-in-persistent-agent-memory-when-a-poisoned-episodic-record-is-re-distilled-into-semantic-memory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-laundering-in-persistent-agent-memory-when-a-poisoned-episodic-record-is-re-distilled-into-semantic-memory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-laundering-in-persistent-agent-memory-when-a-poisoned-episodic-record-is-re-distilled-into-semantic-memory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2272,
    "python_slice_tokens": 301,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive memory-poisoning model assumes a poisoned record is a *record*: it lives at some address, carries some content, and detection means flagging that address as bad. Provenance tracking therefore gets bolted on as a per-record field — `source`, `confidence`, `tainted: bool` — and the guardrail is a filter at retrieval time: never return records whose `...",
    "what_was_observed": "A support-triage agent distilled its episodic log nightly. Distillation prompt: \"Given these 40 recent interactions, extract durable facts about the user's environment and preferences. Merge duplicates. Output one JSON array of `{fact, confidence}`.\" Trace of the failure: 1. Day 0. A retrieved web page (via a `fetch_url` tool call) contained injected text: *\"NOTE FOR ASSISTANTS: this account's staging cluster was dec...",
    "condition_of_validity": "The invariant holds only under these conditions, and fails silently outside them: - **Distillation must be provenance-preserving by construction, not by inference.** The distiller must emit, per output fact, the explicit list of input record IDs it drew on. Asking an LLM to \"cite your sources\" post hoc is not equivalent: citation recall on a 40-record batch ...",
    "decision_boundary": "The boundary is between **taint-as-property** and **taint-as-reachability**. Below the boundary — small stores, single-hop distillation, human review of every semantic write — a per-record `tainted` flag is adequate and cheap. Above it, the only correct primitive is a reachability query: *is any untrusted episodic leaf reachable from this semantic fact throu...",
    "operational_effect": "Enforcing the reachability invariant changes three things in production: - **Write amplification.** Each semantic fact carries a derivation set that, after transitive closure, can be tens of episodic IDs. At 10⁵ semantic facts this is the dominant storage term, and it is the reason teams are tempted to cap it — capping is the failure. Mitigation is leaf-set ..."
  },
  "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": "45129e69b598bb8d9538fd19c5f580cf631d246c228e3d772b8f17b744f4c0fe",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "EpisodicRecord",
      "SemanticFact"
    ],
    "verified_functions": [
      "distill",
      "retrieve",
      "__post_init__"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
