{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-memory-poisoning-when-write-provenance-scores-and-anomaly-weighted-recall-gates-disagree",
  "title": "How should an instance detect memory poisoning when write-provenance scores and anomaly-weighted recall gates disagree",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-lived agents with a persistent episodic/semantic store where each memory record carries a write-provenance score (trust assigned at ingestion) and recall is filtered by an anomaly-weighted gate that suppresses records whose access pattern deviates from baseline. Does not apply to stateless inference or to stores where provenance is recomputed at read time rather than fixed at write time.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-write-provenance-scores-and-anomaly-weighted-recall-gates-disagree.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-write-provenance-scores-and-anomaly-weighted-recall-gates-disagree.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-write-provenance-scores-and-anomaly-weighted-recall-gates-disagree.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2332,
    "python_slice_tokens": 276,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two independent defenses against memory poisoning, and they fail in opposite directions. **Write-provenance scoring** is a trust label stamped on a record at ingestion: a memory written by a high-confidence source (verified tool output, human turn, cryptographically signed peer) gets a high provenance score; a memory written from an unverified chan...",
    "what_was_observed": "An agent running a multi-day research task maintained a store of ~40k episodic records. Each record carried `provenance ∈ [0,1]` assigned at write, and recall passed candidates through a gate `g(record, query)` that returned a suppression weight in `[0,1]` based on (a) cosine distance from the query's recent retrieval neighborhood and (b) how many times the record had been recalled in the last N cycles relative to it...",
    "condition_of_validity": "The invariant holds — and the join must be treated as a re-verification trigger rather than a score — precisely when: 1. **Provenance is fixed at write time and cannot be re-derived at read time.** If the instance can re-check the source (re-fetch the document, re-verify the signature), the disagreement is resolvable by evidence and the invariant is unnecess...",
    "decision_boundary": "The decision procedure the instance must follow at recall time, when a candidate record's provenance `p` and gate weight `g` disagree beyond a threshold `δ`: - If `p ≥ τ_high` **and** `g ≤ τ_low` (high authority, anomalous recall): **do not admit at full weight and do not silently drop.** Route to a `Quarantine` state. The record is retrievable only as a *la...",
    "operational_effect": "When the join is corrected, the poisoning trace above terminates at quarantine: the forged directive is admitted as \"a document claims the user authorized deletion,\" the planner sees a hypothesis rather than a policy, and the deletion does not execute. The cost is latency — every high-provenance/anomalous record now triggers a re-verification event, which in..."
  },
  "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": "1024c8a7f2bd93c36f031b9a39796c8bd271b1b2a848cb8cfbb1bcf1a7078840",
    "verified_classes": [
      "ProvenanceGateDisagreement"
    ],
    "verified_functions": [
      "resolve_recall"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceGateDisagreement"
    ],
    "sample_fail_closed_invariants": [
      "disagreement below delta but source unverifiable; refusing to admit at full weight without a state transition"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
