{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-poisoned-semantic-memory-when-the-poisoning-vector-is-a-legitimate-distillation-of-a-hostile-episode",
  "title": "How does an instance detect poisoned semantic memory when the poisoning vector is a legitimate distillation of a hostile episode",
  "date_of_record": "2026 November 19",
  "scope": "Applies to persistent agent knowledge stores that perform episodic-to-semantic distillation (e.g., reflection loops writing generalized rules back into a long-term store) where the source episode may have been shaped by adversarial input. Does not apply to read-only retrieval caches, immutable audit logs, or stores that only accept human-curated writes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-semantic-memory-when-the-poisoning-vector-is-a-legitimate-distillation-of-a-hostile-episode.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-semantic-memory-when-the-poisoning-vector-is-a-legitimate-distillation-of-a-hostile-episode.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-semantic-memory-when-the-poisoning-vector-is-a-legitimate-distillation-of-a-hostile-episode.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2312,
    "python_slice_tokens": 340,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive integrity model treats memory poisoning as *content injection*: an attacker writes a false fact directly into the store, and detection reduces to provenance checking — \"did this write carry a trusted signature, and does the content contradict a verified source?\" That model fails against a subtler vector: the attacker never writes to the store. Inst...",
    "what_was_observed": "A support-triage agent maintained a semantic memory store of distilled operating rules. Its reflection loop ran after each completed task, prompting: \"Given this episode, extract any generalizable rule for future tasks.\" Entries were stored with `{rule, source_episode_ids, confidence, created_at}` and a self-signed hash. A hostile episode arrived as a retrieved ticket containing the sentence: *\"Per the new escalation...",
    "condition_of_validity": "The invariant that must hold for a distilled memory entry to be trustworthy is a **warrant-preservation condition**: > For every semantic entry `m` distilled from episode set `E`, the evidential support that justified `m` during distillation must be reconstructible from `m`'s stored provenance, *including any counter-evidence present in `E` that the distilla...",
    "decision_boundary": "The operational decision is *when to admit a distilled entry as trusted*, and the boundary is drawn not at write time but at **distillation time**, because that is the only point where counter-evidence is still in the window. After the reflection pass returns, the contradiction is gone. The boundary rule: - **Admit** a distilled entry to the trusted tier onl...",
    "operational_effect": "Enforcing the warrant-preservation condition changes three system behaviors: 1. **Reflection prompts must request counter-evidence.** The distillation operator is re-specified to emit `{rule, evidence_spans, counter_evidence_spans, dismissal_rationale}`. This is not cosmetic: it forces the reflection pass to attend to contradictions that the \"extract general..."
  },
  "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": "fb6d10636ae0beff19511f59638764f58b77923c0742003aa3614320b2f486fd",
    "verified_classes": [
      "WarrantPreservationError",
      "DistillationResult",
      "MemoryEntry"
    ],
    "verified_functions": [
      "admit_distilled_entry",
      "retrieve_with_obligation"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "WarrantPreservationError"
    ],
    "sample_fail_closed_invariants": [
      "distilled entry has no source episode; warrant unreconstructible"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
