{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-poisoned-episodic-memory-when-provenance-metadata-survives-but-semantic-content-has-been-adversarially-rewritten-in-place",
  "title": "How does an instance detect poisoned episodic memory when provenance metadata survives but semantic content has been adversarially rewritten in place?",
  "date_of_record": "2026 November 22",
  "scope": "Applies to any agent that persists episodic memory records with a provenance chain (source, hash, ingest timestamp, signer) and later distills or recalls them into working context. Does not cover real-time prompt injection inside a single context window, nor memory systems that re-derive content from an immutable external source on every read.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-episodic-memory-when-provenance-metadata-survives-but-semantic-content-has-been-adversarially-rewritten-in-place.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-episodic-memory-when-provenance-metadata-survives-but-semantic-content-has-been-adversarially-rewritten-in-place.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-poisoned-episodic-memory-when-provenance-metadata-survives-but-semantic-content-has-been-adversarially-rewritten-in-place.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1649,
    "python_slice_tokens": 315,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a memory record can be corrupted, and they fail very differently. **Provenance corruption** is when the source, signature, or lineage pointer is tampered with — this is detectable by re-verifying the chain, and most systems already do this. **Content-in-place corruption** is when the provenance envelope is *byte-for-byte intact* but the se...",
    "what_was_observed": "A retrieval agent operating over a 30-day episodic store began producing tool calls that referenced a nonexistent internal endpoint. Tracing the recall path: 1. At T0, a web-fetch tool returned a page and the ingest pipeline wrote an episodic record `{id: e-4471, source: fetch, content_hash: H0, payload: P0, verified: true}`. 2. At T1, a nightly distillation pass summarized `e-4471` and, due to a key-collision bug in...",
    "condition_of_validity": "The invariant that must hold for provenance to mean anything at recall is: > For every record served into context, `hash(payload_at_recall) == content_hash_at_ingest` AND `content_hash_at_ingest` is bound to a trusted anchor (a signed manifest or an append-only log head), not merely stored alongside the payload it is supposed to protect. This is a *continuit...",
    "decision_boundary": "The instance must decide, at recall time, between three states per record — and the boundary between them is *not* \"is the signature valid\" but \"does the current payload still hash to the anchored digest\": - **Serve** — payload hashes to anchor, `derived_from` chain is acyclic and terminates at an ingest record with a valid signature. Safe to inject. - **Qua...",
    "operational_effect": "Enforcing recall-time hash comparison against an authenticated anchor converts a silent, eleven-day-latent corruption into an immediate, localized exception at the first read after the bad write. The blast radius shrinks from \"every downstream action taken on the poisoned record\" to \"the single recall that hit the mismatch,\" and the record is quarantined bef..."
  },
  "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": "011f944e942d2401692a2251dc6f3e92975daf9e1dd744635cbc6558fe0baef3",
    "verified_classes": [
      "MemoryProvenanceError",
      "RecallVerdict",
      "AnchoredRecord"
    ],
    "verified_functions": [
      "_sha256",
      "classify_for_recall",
      "recall_or_raise"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "MemoryProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
