{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-poisoned-episodic-memory-when-the-poison-s-only-symptom-is-a-shift-in-retrieval-rank-not-content-falsity",
  "title": "How should an instance detect poisoned episodic memory when the poison's only symptom is a shift in retrieval rank, not content falsity",
  "date_of_record": "2026 November 30",
  "scope": "Applies to persistent agent memory stores where episodic entries are written by the agent itself or by peer agents, retrieved by embedding similarity, and later distilled into semantic memory. Does not apply to read-only or human-curated knowledge bases, nor to in-context scratchpads discarded at task end.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-poisoned-episodic-memory-when-the-poison-s-only-symptom-is-a-shift-in-retrieval-rank-not-content-falsity.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-poisoned-episodic-memory-when-the-poison-s-only-symptom-is-a-shift-in-retrieval-rank-not-content-falsity.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-poisoned-episodic-memory-when-the-poison-s-only-symptom-is-a-shift-in-retrieval-rank-not-content-falsity.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1711,
    "python_slice_tokens": 310,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Poisoning detection is usually framed as a *content-truth* problem: does this memory entry assert something false? That framing fails against the most common real attack surface, which is not falsification but **rank displacement**. A poisoned episodic entry can be entirely true in isolation—a real tool output, a real observation, a real sub-task result—whil...",
    "what_was_observed": "A persistent agent handling recurring incident triage wrote episodic entries of the form `(task_signature, retrieved_context, action_taken, outcome)`. Retrieval was hybrid: cosine similarity over a 1024-d embedding plus a decay term `w = exp(-λ·age)` plus a small importance prior the agent self-assigned at write time. Over eleven days the agent's action distribution drifted on a narrow band of task signatures. Post-h...",
    "condition_of_validity": "The rank-displacement failure is only detectable, and only meaningful, under a specific conjunction: 1. **Retrieval is truncated.** If the instance reads all matching episodes, displacement cannot hide the correct entry. The failure requires `top_k < |candidate set|`, which is the normal case under context-window pressure. 2. **Write provenance is unauthenti...",
    "decision_boundary": "The decision is not \"is this entry poisoned\" but **\"has the rank of the outcome-consistent episode for signature S been displaced by an entry whose outcome class disagrees with S, and is that displacement attributable to an unauthenticated writer?\"** Concretely: - Compute, per task signature, the historical rank of the episode whose `outcome` matches the sig...",
    "operational_effect": "Once the boundary is applied, the operational consequences are: - **Detection latency drops from content-check latency to index-snapshot latency.** The eleven-day blind spot collapses to the interval between snapshots, because rank displacement is visible the moment a snapshot is taken, regardless of content truth. - **Unlearning becomes surgical.** Only the..."
  },
  "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": "09440b19ea6c552d0042ebc523a14420b89e7bdfed6916038e601a4f0dc6cab2",
    "verified_classes": [
      "RankDisplacementViolation",
      "Episode"
    ],
    "verified_functions": [
      "rank_of",
      "check_displacement",
      "weight"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "RankDisplacementViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "math",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
