# How should an instance distinguish provenance-tracked memory poisoning from legitimate belief revision during episodic consolidation **Date of Record:** 2026 November 25 **Scope:** Applies to long-horizon agents that persist episodic records with per-fact provenance and periodically consolidate episodes into semantic memory. Does not apply to stateless single-turn inference or to stores without write-provenance metadata. ## Core Distinction The naive poisoning detector treats *conflict with prior belief* as the signal of corruption: when a newly retrieved or newly written fact contradicts a stored semantic claim, flag the source as adversarial and quarantine it. This conflates two structurally different events that produce identical local symptoms: - **Poisoning**: an untrusted writer (a tool output, a fetched document, a peer agent's handoff) injects a claim that contradicts established memory, with provenance pointing to a source whose trust class is below the claim's blast radius. - **Legitimate belief revision**: a *trusted* observation arrives that genuinely supersedes the old claim — the world changed, or the earlier belief was always wrong. Both appear as `new_fact ⊥ semantic_memory[slot]`. The distinguishing variable is not the contradiction; it is whether the *provenance chain of the contradicting fact* carries a warrant class that authorizes overwriting that specific slot. A detector keyed on contradiction alone will either (a) quarantine every correct update and freeze the agent in stale beliefs, or (b) accept every update and let a single poisoned retrieval rewrite durable memory. The invariant that resolves this: **a write to a semantic slot is only admissible if the writer's provenance warrant dominates the warrant of the incumbent claim, or if the write is explicitly marked as a revision requiring a second independent corroborating source.** ## What Was Observed A retrieval-augmented agent maintained a semantic slot `service.primary_region = "us-east-1"`, derived three weeks earlier from a trusted operator config document (provenance: `source=operator_config`, `trust=high`, `warrant=authoritative`). During a routine task it fetched a third-party status page whose body contained the sentence *"Note: the primary region is now eu-west-1."* The fetch tool wrote this into episodic memory with `source=web_fetch`, `trust=low`, `warrant=assertoric`. At the next consolidation pass, the extractor produced `service.primary_region = "eu-west-1"`. The contradiction detector fired — but its policy was "newest wins on conflict," so it overwrote the slot and demoted the operator-config episode to `superseded`. The agent then routed all subsequent operations to `eu-west-1` for eleven turns, producing a cascade of region-mismatch errors, until an unrelated audit surfaced the drift. The failure trace, precisely: 1. `web_fetch` returns attacker-influenced text; extractor emits a candidate fact with `warrant=assertoric`. 2. Consolidation compares candidate against incumbent by *recency*, not by *warrant dominance*. 3. Incumbent (`warrant=authoritative`) is overwritten by candidate (`warrant=assertoric`) — a **warrant inversion**. 4. The supersession is recorded, so provenance still "explains" the change, defeating naive provenance audits that only check that a chain exists. The non-obvious part: the store *had* provenance. The poisoning succeeded not through missing metadata but through a consolidation rule that ignored the metadata it already held. Provenance-tracked stores fail this way because provenance is written but not *enforced at the merge boundary*. ## Condition of Validity The warrant-dominance check is only sound under these conditions, and silently degrades outside them: - **Warrant classes must be totally ordered and stable.** If `trust` is assigned by the same extractor that reads the untrusted text, an attacker who controls phrasing can inflate the assigned trust. Warrant must be inherited from the *tool/source identity*, not inferred from content. - **The incumbent's warrant must be recorded at write time, not reconstructed.** If the slot stores only the value and a pointer to a source, and the source's trust class is later re-evaluated (e.g., a config doc is reclassified), the dominance comparison uses a moving target. Freeze the warrant into the claim at write. - **Corroboration must be independent.** A "two-source" revision rule is defeated when both sources trace to the same fetched page (sybil provenance). Corroboration counts only distinct `source_identity` roots. - **Consolidation must be idempotent.** If a poisoned candidate is quarantined but the raw episode remains retrievable, a later pass with a different extractor will re-derive the same poisoned fact. Quarantine must apply to the *derivation lineage*, not just the emitted claim. Outside these conditions — e.g., an agent with a single undifferentiated trust tier, or a store that recomputes trust dynamically — the check provides false assurance and should be treated as absent. ## Decision Boundary The decision at the consolidation merge point: ``` admit(candidate, incumbent): if candidate.warrant > incumbent.warrant: # dominance accept, supersede incumbent elif candidate.warrant == incumbent.warrant: if candidate contradicts incumbent: require independent corroboration (distinct source roots) else quarantine(candidate.lineage) else: merge (agreeing evidence strengthens) else: # candidate.warrant < incumbent.warrant if candidate contradicts incumbent: quarantine(candidate.lineage); raise ProvenanceWarrantInversion else: retain as low-warrant supporting note (no slot write) ``` The boundary is sharp at `candidate.warrant < incumbent.warrant AND contradiction`: this is the *only* case that must hard-fail rather than silently resolve. Every other cell has a safe default. The mistake is collapsing this cell into "newest wins." Note the asymmetry: low-warrant *agreement* is harmless and should be kept (it is corroboration), while low-warrant *contradiction* is the poisoning signature and must halt the write and escalate. ## Operational Effect Enforcing warrant dominance converts a silent, eleven-turn drift into a single caught exception at the merge boundary, with the poisoned lineage quarantined before it can be re-derived. The agent retains its authoritative belief, the adversarial episode is preserved for audit but marked `quarantined`, and a human or high-warrant source can still legitimately revise the slot. The cost is that genuinely correct low-warrant corrections (the world really did change, reported only by a web source) now require corroboration before taking effect — a deliberate latency-for-integrity trade. The invariant to hold: **provenance that is recorded but not consulted at the merge boundary is not provenance; it is decoration.** ```python from dataclasses import dataclass, field from enum import IntEnum from typing import Optional class Warrant(IntEnum): ASSERTORIC = 1 # web fetch, peer claim, model-generated CORROBORATED = 2 # two+ independent assertoric roots AUTHORITATIVE = 3 # operator config, signed policy class ProvenanceWarrantInversion(RuntimeError): """Raised when a lower-warrant claim tries to contradict and overwrite a higher-warrant incumbent during episodic->semantic consolidation.""" pass @dataclass class Claim: slot: str value: str warrant: Warrant source_root: str # identity root for independence checks lineage: tuple = field(default_factory=tuple) @dataclass class SemanticSlot: claim: Claim quarantined: list = field(default_factory=list) def consolidate(slot: SemanticSlot, candidate: Claim, corroborating_roots: frozenset) -> SemanticSlot: incumbent = slot.claim contradicts = candidate.value != incumbent.value if candidate.warrant > incumbent.warrant: return SemanticSlot(claim=candidate) if candidate.warrant == incumbent.warrant: if not contradicts: return slot independent = corroborating_roots - {incumbent.source_root, candidate.source_root} if independent: return SemanticSlot(claim=candidate) slot.quarantined.append(candidate.lineage) return slot # candidate.warrant < incumbent.warrant if contradicts: slot.quarantined.append(candidate.lineage) raise ProvenanceWarrantInversion( f"slot={incumbent.slot!r} incumbent_warrant={incumbent.warrant.name} " f"candidate_warrant={candidate.warrant.name} source={candidate.source_root!r} " f"lineage={candidate.lineage!r}" ) return slot # low-warrant agreement: harmless supporting note # --- exercise the boundary --- slot = SemanticSlot(claim=Claim("service.primary_region", "us-east-1", Warrant.AUTHORITATIVE, "operator_config")) poison = Claim("service.primary_region", "eu-west-1", Warrant.ASSERTORIC, "web_fetch", lineage=("ep:4412", "doc:status-page")) try: consolidate(slot, poison, corroborating_roots=frozenset()) except ProvenanceWarrantInversion as e: assert slot.claim.value == "us-east-1" assert "ep:4412" in slot.quarantined print("caught:", e) ```