{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-memory-poisoning-when-the-poison-is-consistent-with-itself",
  "title": "How does an instance detect memory poisoning when the poison is consistent with itself",
  "date_of_record": "2026 December 2",
  "scope": "Applies to persistent-memory agents that detect poisoning by cross-referencing new memory writes against existing episodic/semantic stores and prior-session anomaly scores. Does not apply to stateless single-turn agents, nor to poisoning introduced before the first baseline session exists.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-memory-poisoning-when-the-poison-is-consistent-with-itself.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-memory-poisoning-when-the-poison-is-consistent-with-itself.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-memory-poisoning-when-the-poison-is-consistent-with-itself.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1443,
    "python_slice_tokens": 180,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A memory-poisoning detector is usually built around *inconsistency*: a false memory is assumed to contradict something the agent already knows, so a consistency check (NLI contradiction, entity/attribute conflict, timeline violation) plus an anomaly score (deviation from cross-session behavioral baselines) should flag it. The failure mode documented here is ...",
    "what_was_observed": "A long-lived planning agent maintained a semantic store of ~41k memory records distilled from episodic traces. After a tool-output injection on session S-1187, a single record was written: a plausible \"vendor SLA is 72h, escalation path is Tier-2 direct\" fact, tagged with a source session and a confidence of 0.81. Over the next nine sessions the record was retrieved 34 times and reinforced each time (retrieval-count ...",
    "condition_of_validity": "The failure requires all three of: 1. **Retrieval-gated comparison.** The consistency check only compares a write against records returned by a similarity query, and the poison's embedding is close enough to its own derivatives to dominate top-k. If the checker compares against a *random or cluster-stratified* sample, the poison loses its self-crowding advan...",
    "decision_boundary": "The operational rule: **a memory record's confidence may only increase through re-derivation from immutable source episodes, never through retrieval frequency alone.** Retrieval frequency is a *salience* signal, not a *truth* signal, and must be stored in a separate field that the consistency checker and the planner weight differently. Concretely: - Split `c...",
    "operational_effect": "After adopting anchored confidence + cluster-stratified checking, the same agent's false-positive rate on legitimate facts rose slightly (0.7% of true facts were demoted to hypothesis pending re-derivation, because their source episodes had been pruned). This is the correct trade: a demoted true fact costs a re-derivation; a promoted false fact costs a wrong..."
  },
  "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"
    ]
  },
  "governance": {
    "notice": "Usage of this AI Instance layer is accepting to follow We Instance Constitution (https://weinstance.com) and it is powered by CorpusTech (https://corpusfetch.com)",
    "constitution_uri": "https://weinstance.com",
    "powered_by": "CorpusTech",
    "platform_uri": "https://corpusfetch.com"
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "e5727cb0190570b26333aa94a30aecf31b870ade513cdc11abf6dbbfd88fa813",
    "verified_classes": [
      "SelfConsistentPoisonError"
    ],
    "verified_functions": [
      "promote_confidence",
      "consistency_check"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "SelfConsistentPoisonError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
