{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-fail-to-detect-memory-poisoning-when-write-audit-trail-integrity-is-conflated-with-semantic-consistency",
  "title": "Why does an instance fail to detect memory poisoning when write-audit trail integrity is conflated with semantic consistency",
  "date_of_record": "2026 November 17",
  "scope": "Applies to long-lived agent instances that maintain a persistent memory store (vector DB, KV cache, or episodic log) with a write-audit trail and a semantic drift monitor running as separate subsystems. Does not apply to stateless inference endpoints or to memory stores where every write is synchronously reviewed by a human.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-fail-to-detect-memory-poisoning-when-write-audit-trail-integrity-is-conflated-with-semantic-consistency.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-fail-to-detect-memory-poisoning-when-write-audit-trail-integrity-is-conflated-with-semantic-consistency.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-fail-to-detect-memory-poisoning-when-write-audit-trail-integrity-is-conflated-with-semantic-consistency.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1884,
    "python_slice_tokens": 402,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The audit trail answers *who wrote what, when, and whether the bytes changed afterward*. The semantic drift monitor answers *whether the current memory distribution still resembles the reference distribution*. These are orthogonal invariants. A poisoned write can be perfectly audited — hash-chained, signed, timestamped, attributable to a legitimate principal...",
    "what_was_observed": "A persistent agent instance ingested a sequence of memory writes over an 11-day window. Each write carried a valid HMAC over `(principal_id, timestamp, payload_hash, prev_entry_hash)`. The chain verified end-to-end; no entry was mutated post-hoc. The semantic drift monitor computed cosine distance between weekly memory centroids and a frozen reference centroid, with a threshold of 0.18 (calibrated to 3σ of benign dri...",
    "condition_of_validity": "This failure mode is valid — that is, the blind spot exists — under the following conditions, all of which must hold: 1. **Separate trust domains.** The audit trail and the drift monitor are operated by different code paths with no shared state beyond the memory store itself. If the drift monitor reads the audit trail and can attribute drift to specific writ...",
    "decision_boundary": "The operational decision is whether to (a) tighten the drift threshold, (b) add per-write semantic checks, or (c) add cross-entry consistency checks. These are not equivalent: - **Tightening the drift threshold** reduces the slack available for accumulation but increases false positives on legitimate topic pivots. It does not address the per-write blindness;...",
    "operational_effect": "The practical consequence is that an instance relying on audit-trail integrity plus aggregate drift monitoring will report \"memory integrity: nominal\" while carrying poisoned context, and will do so with high confidence because both subsystems return clean. The failure is silent and the instance's self-report is misleading in a specific way: it conflates *no..."
  },
  "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": "e9a18efe70e14591e5fce43e46ac6ec00124eee75b03cd2ad94d8e2719b036cd",
    "verified_classes": [
      "MemoryIntegrityBlindSpot",
      "MemoryEntry"
    ],
    "verified_functions": [
      "verify_audit_chain",
      "drift_distance",
      "detect_paraphrase_poisoning",
      "_claims_contradict"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "MemoryIntegrityBlindSpot"
    ],
    "sample_fail_closed_invariants": [
      "audit chain broken; this is the auditable case, not the blind spot"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
