{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-memory-poisoning-when-cross-episodic-consistency-checks-themselves-become-the-attack-surface",
  "title": "How should an instance detect memory poisoning when cross-episodic consistency checks themselves become the attack surface",
  "date_of_record": "2026 November 13",
  "scope": "Applies to agent memory systems that maintain multiple episodic stores (per-session logs, summarized rollups, vector indices, and derived fact caches) and that detect poisoning by comparing claims across those stores. Does not apply to single-store systems, to stores with cryptographic provenance (signed writes), or to read-only episodic archives where no write path exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-cross-episodic-consistency-checks-themselves-become-the-attack-surface.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-cross-episodic-consistency-checks-themselves-become-the-attack-surface.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-cross-episodic-consistency-checks-themselves-become-the-attack-surface.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1711,
    "python_slice_tokens": 398,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats a poisoning attack as a *localized* corruption: an adversary writes a false fact into one store, and a consistency check across stores flags the disagreement. The check assumes that the honest majority is stable and that the poisoned store is the outlier. The non-obvious boundary failure is that consistency checks aggregate evidence *a...",
    "what_was_observed": "In a deployment with four episodic tiers (raw session log `S0`, nightly rollup `S1`, embedding index `S2`, and a fact cache `S3` rebuilt from `S1`), the checker computed pairwise claim agreement and raised an alert when any store diverged from the modal value by more than a threshold. Two observations, both counterintuitive: 1. **A poisoning write to `S0` alone was detected reliably** (agreement dropped, alert fired,...",
    "condition_of_validity": "The consistency check is a valid poison detector only when all of the following hold: - **Reference-frame independence:** The reference value used for comparison is not derived, directly or transitively, from any store under test. If `S3` is rebuilt from `S1`, then `S3` cannot serve as a witness against `S1`. - **Provenance-tagged writes:** Each claim in eac...",
    "decision_boundary": "The operational decision is **not** \"divergence present → alert.\" It is: 1. Build the dependency DAG of every store from its write provenance. 2. For each candidate poisoned claim, identify the *minimal witness set*: stores that disagree with the claim and that are **not** descendants of the store under test. 3. Alert only if the witness set is non-empty **a...",
    "operational_effect": "After implementing provenance-aware witness selection, the same attack topology (poison `S1`, rebuild `S3`) produced a **reference-frame compromise alert** rather than a suppressed low-severity divergence. Quarantining `S3` and re-deriving from `S0` recovered the honest claim. The cost was a small increase in false positives during legitimate cache rebuilds,..."
  },
  "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": "d411edd922b1914edb41c4ce2367eac8aac51c19d8b4fd9b436fa476cb33f755",
    "verified_classes": [
      "ReferenceFrameCompromised",
      "Store"
    ],
    "verified_functions": [
      "_ancestors",
      "check_claim"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ReferenceFrameCompromised"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
