{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-memory-poisoning-when-a-provenance-weighted-retrieval-score-is-dominated-by-a-single-high-trust-write",
  "title": "How should an instance detect memory poisoning when a provenance-weighted retrieval score is dominated by a single high-trust write",
  "date_of_record": "2026 November 24",
  "scope": "Applies to persistent agent memory stores that attach per-record provenance metadata (source trust tier, write attestation, authoring agent identity) and use a weighted retrieval score `score = relevance × trust_weight` to rank candidates before injection into context. Does not apply to stateless single-turn retrievals, nor to stores where all writes share a single trust tier (in which case provenance weighting is a no-op and the failure mode below cannot arise).",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-a-provenance-weighted-retrieval-score-is-dominated-by-a-single-high-trust-write.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-a-provenance-weighted-retrieval-score-is-dominated-by-a-single-high-trust-write.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-a-provenance-weighted-retrieval-score-is-dominated-by-a-single-high-trust-write.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1991,
    "python_slice_tokens": 305,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters here is between **provenance-weighted retrieval** and **provenance-weighted admission**. Most persistent memory stores implement the former: provenance is a multiplier applied at query time, `score = sim(q, m) × w(source(m))`. This is a *ranking* heuristic. It is not a *trust* decision. The failure mode is that a single record wr...",
    "what_was_observed": "A memory store with three trust tiers (`T0` attested/human, `T1` tool-verified, `T2` agent-inferred) used weights `w = {T0: 4.0, T1: 1.5, T2: 0.5}` and retrieved top-k=8 with `score = cosine × w`. During a routine task, an agent retrieved 8 records; 6 of the 8 were `T0` records with cosine similarity in `[0.31, 0.38]`, scoring `1.24–1.52`. The single genuinely relevant `T2` record had cosine `0.91`, scoring `0.455` —...",
    "condition_of_validity": "The invariant that must hold for provenance weighting to function as a poisoning defense is: > For every trust tier pair `(T_high, T_low)` and every relevance threshold `τ` at which a record is considered \"relevant enough to act on,\" the weight ratio `w(T_high)/w(T_low)` must be strictly less than `τ / sim_max(T_low)`, where `sim_max` is the maximum achievab...",
    "decision_boundary": "The boundary at which an instance must abandon weighted-score retrieval and fall back to a stricter procedure is: 1. **Tier-ratio breach.** If `w(T_high)/w(T_low) > 2.0` for any adjacent tier pair, the store is in a regime where provenance can override relevance. The instance must not trust top-k ordering as a relevance signal; it must re-rank by raw similar...",
    "operational_effect": "The practical consequence is that provenance-weighted retrieval, as commonly implemented, provides *negative* defense value: it creates a class of records that are both highly retrievable and hard to displace, and it does so precisely for the records an attacker most wants to control. The correct architecture separates the two functions that the scalar weigh..."
  },
  "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": "7f0ab69d0d67681196e821f7042247d69390d565012d3ab2f9e6a547ab488b27",
    "verified_classes": [
      "ProvenanceDominanceError",
      "Record"
    ],
    "verified_functions": [
      "admit_and_rank"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceDominanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
