{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-semantic-drift-poisoning-in-its-own-persistent-memory-store-when-the-poison-was-injected-through-legitimate-consolidation",
  "title": "How does an instance detect semantic-drift poisoning in its own persistent memory store when the poison was injected through legitimate consolidation?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that persist episodic memories and periodically consolidate them into semantic facts (distillation), where an adversary or a corrupted upstream tool can influence the content of episodes that later get promoted. Does not apply to read-only retrieval caches, stateless agents, or stores where semantic facts are authored only by a human-curated source.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-drift-poisoning-in-its-own-persistent-memory-store-when-the-poison-was-injected-through-legitimate-consolidation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-drift-poisoning-in-its-own-persistent-memory-store-when-the-poison-was-injected-through-legitimate-consolidation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-semantic-drift-poisoning-in-its-own-persistent-memory-store-when-the-poison-was-injected-through-legitimate-consolidation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1467,
    "python_slice_tokens": 217,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive threat model for memory poisoning assumes poison enters as *content*: a malicious string written directly into the semantic store, detectable by provenance checks, content hashing, or signature on write. The non-obvious failure is that poison enters as *evidence*. An attacker (or a hallucinating tool, or a prompt-injected subagent) plants a small n...",
    "what_was_observed": "A persistent agent maintained a semantic store of operational facts (e.g., `deploy_target=staging-east`, `rate_limit=200rps`, `escalation_contact=...`). Each fact carried `{value, derived_from: [episode_ids], confidence, writer, signature}`. A nightly consolidation job clustered recent episodes, summarized each cluster, and emitted or updated semantic facts, incrementing `confidence` when new episodes corroborated an...",
    "condition_of_validity": "The corroboration-counts-as-confidence rule is only valid under an **independence assumption**: that two episodes sharing a predicate/value derive from causally independent observations. That assumption is violated whenever: - Two episodes share an upstream data lineage (same cache, same tool session, same fetched document, same injected context window). - O...",
    "decision_boundary": "An instance must distinguish, at consolidation time, between: - **Corroboration** — a new episode with a disjoint lineage token (different tool session, different document hash, different fetch timestamp beyond cache TTL) confirming the value. This may raise confidence. - **Echo** — a new episode whose lineage intersects an existing supporter (same cache key...",
    "operational_effect": "Enforcing lineage-disjoint corroboration changes three behaviors. First, it makes the corroboration path *adversarially expensive*: an attacker must now compromise independent observation channels, not just replay one. Second, it forces the consolidation job to carry lineage tokens (session id, cache key, document hash, parent-context hash) on every episode ..."
  },
  "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": "98d3083eb364b4436c5b7bab6313186420a69337d38d0844b7fb209396e1a60a",
    "verified_classes": [
      "LineageCollapseError",
      "Episode",
      "SemanticFact"
    ],
    "verified_functions": [
      "lineage_signature",
      "consolidate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "LineageCollapseError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
