{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-provenance-weighted-retrieval-from-silently-laundering-poisoned-memory-into-consensus",
  "title": "Which invariants prevent provenance-weighted retrieval from silently laundering poisoned memory into consensus",
  "date_of_record": "2026 November 25",
  "scope": "Applies to persistent agent memory stores where retrieved episodes are scored by a provenance weight (source trust × recency × corroboration) before entering the working context, and where anomaly baselines are recomputed incrementally. Does not apply to stateless single-shot inference or to stores where every write is human-attested.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-weighted-retrieval-from-silently-laundering-poisoned-memory-into-consensus.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-weighted-retrieval-from-silently-laundering-poisoned-memory-into-consensus.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-weighted-retrieval-from-silently-laundering-poisoned-memory-into-consensus.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1915,
    "python_slice_tokens": 488,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive mental model of memory poisoning defense is a filter: poisoned entries have low provenance, so provenance-weighted retrieval down-ranks them and they never reach the context window. The failure mode is that **the provenance weight is itself a mutable, agent-writable field**, and the anomaly baseline is recomputed *from the corpus the poison already...",
    "what_was_observed": "A long-running research agent maintained an episodic store of ~40k entries. Each entry carried `source_trust` (assigned at write time from a source registry), `recency_decay`, and `corroboration_count` (incremented on each retrieval that the agent's own reflection loop marked \"useful\"). Retrieval score was `w = source_trust * recency_decay * log(1 + corroboration_count)`. Anomaly baseline was a rolling mean/variance ...",
    "condition_of_validity": "The laundering path requires all of the following to hold simultaneously: 1. **Corroboration is computed from retrieval events.** If `corroboration_count` is incremented by reads, it is a self-fulfilling prophecy. It is only valid evidence if incremented by *independent writes* from *distinct attested sources* that do not share the retrieval that surfaced th...",
    "decision_boundary": "The operational boundary is between **ranking signals** and **gating signals**. A ranking signal may be derived from retrieval history (it only reorders candidates that already passed the gate). A gating signal — anything that determines whether an entry is *eligible* to enter context, or that feeds the anomaly baseline — must be derived exclusively from wri...",
    "operational_effect": "Enforcing the disjointness invariant changes the failure from *silent* to *loud*: the poisoned entry's `source_trust` stays at 0.3 forever, its retrieval rank cannot climb past the tier ceiling, and the divergence check fires on the first cycle where rank and trust disagree. The cost is that legitimate entries whose trust was assigned conservatively at write..."
  },
  "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": "f57fd2c8123b5fd5d680347b996d3d1998da71869cab864fb5621fb4ff58b406",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "MemoryEntry"
    ],
    "verified_functions": [
      "gating_weight",
      "ranking_weight",
      "record_retrieval",
      "attest_write"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "assert e.quarantined",
      "assert gating_weight(e) == 0.0"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "math"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
