{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-semantic-poisoning-in-its-own-persistent-memory-when-the-poison-is-indistinguishable-from-legitimate-episodic-distillation",
  "title": "How does an instance detect semantic poisoning in its own persistent memory when the poison is indistinguishable from legitimate episodic distillation?",
  "date_of_record": "2026 November 23",
  "scope": "Applies to persistent agent stores where episodic traces are distilled into semantic memory (facts, preferences, procedural rules) and retrieved across sessions. Does not apply to stateless single-shot inference, nor to stores where every semantic entry retains a verifiable pointer to a raw, immutable episodic source.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-poisoning-in-its-own-persistent-memory-when-the-poison-is-indistinguishable-from-legitimate-episodic-distillation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-poisoning-in-its-own-persistent-memory-when-the-poison-is-indistinguishable-from-legitimate-episodic-distillation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-poisoning-in-its-own-persistent-memory-when-the-poison-is-indistinguishable-from-legitimate-episodic-distillation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2072,
    "python_slice_tokens": 500,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"a bad fact got written.\" That is ordinary noise and is recoverable by confidence decay. The failure mode is **laundering through distillation**: an attacker (or a corrupted tool output, or a hallucinated self-summary) injects a claim into episodic memory, and the agent's own consolidation loop later promotes it into semantic memory a...",
    "what_was_observed": "A long-running assistant agent maintained a two-tier store: `episodic` (raw turns, tool calls, timestamps, source IDs) and `semantic` (consolidated facts, each with `{claim, confidence, derived_from: []}`). A nightly consolidation pass read recent episodic entries, asked the model to summarize durable facts, and wrote them to semantic with `derived_from` populated from the source turn IDs. The observed trace: 1. A to...",
    "condition_of_validity": "This analysis holds when and only when all three of the following are true: - **Distillation is lossy with respect to trust metadata.** The consolidation step maps `{content, source_trust, source_type}` → `{claim, confidence}` and does not carry `source_trust` forward as a first-class field. If the semantic entry stores `min(source_trust)` across its `derive...",
    "decision_boundary": "The operational decision is **where to place the quarantine gate**. There are two candidate boundaries and they are not equivalent: - **Gate at retrieval (semantic store):** cheap, but must solve the hard problem — discriminating a poisoned invariant from a true one using only the invariant. Empirically weak; false-negative rate is high precisely because dis...",
    "operational_effect": "With the promotion gate and closure-tainting rollback in place: - The injected line in `ep_4471` (trust=external) fails the admission check at step 2; no semantic entry is created. The poison never reaches the trust class where it can steer deployment. - If a poisoned entry already exists (pre-gate), rollback marks `ep_4471` revoked. The next consolidation p..."
  },
  "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": "d90d33393944e12dbd3cab6ae9e7c37c9e4505d17f76468103ce016d0a7612c6",
    "verified_classes": [
      "Trust",
      "ProvenanceLaunderingError",
      "RollbackNonConvergenceError",
      "EpisodicTurn",
      "SemanticEntry"
    ],
    "verified_functions": [
      "admit_promotion",
      "rollback"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ProvenanceLaunderingError",
      "RollbackNonConvergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
