# Why does an instance accept a poisoned memory write when its provenance score is high but its contradiction evidence is quarantined rather than rejected? **Date of Record:** 2026 December 2 **Scope:** Applies to long-lived agent memory systems that admit writes through a provenance-weighted admission gate and route detected contradictions to a quarantine buffer rather than hard-rejecting them. Does not apply to stateless single-turn inference or to memory stores without provenance metadata. ## Core Distinction The failure is not "the poison got a high provenance score." Provenance weight is a *scalar trust prior* attached to a write's origin (which tool, which peer agent, which session, which signed warrant). Contradiction evidence is a *relational fact* between the incoming write and already-admitted beliefs. The two live in different subsystems and are combined at admission time by a rule like `admit if provenance_weight > τ AND not_contradicted`. The subtle defect: when `not_contradicted` is false, the write is *quarantined*, and quarantine is implemented as a **deferred** state—the write is parked, retrievable by the quarantine auditor, but critically, the *conflicting existing belief is not marked dirty*. The system treats "we have a pending contradiction" as a neutral state rather than a state that invalidates reads against the contested region. So the boundary condition is this: a high-provenance write that contradicts a low-provenance existing belief causes the *existing* belief to be flagged, the *new* write to be quarantined, and the resolution to be deferred to an auditor that may run minutes or hours later. During the deferral window, retrieval continues to serve the existing belief *and* the quarantine index leaks the new write into semantic search because quarantine entries retain embeddings. The poison does not need to be admitted to influence behavior—it only needs to be *retrievable*. ## What Was Observed Trace from a production incident (agent memory tier, ~40k episodic records, provenance tiers: `signed_peer`=0.9, `tool_output`=0.6, `self_reflection`=0.4, `unverified_ingest`=0.2): 1. A peer agent (provenance `signed_peer`, weight 0.90) writes: `"deploy_key rotation window is 90 days"`. Existing belief, from `tool_output` (weight 0.60): `"deploy_key rotation window is 30 days"`. 2. Admission gate: `0.90 > τ(0.5)` → passes provenance. Contradiction detector fires (numeric mismatch on same predicate). Write goes to **quarantine**, status `PENDING_AUDIT`. 3. The existing 30-day belief is **not** invalidated. Its `contested_by` field is set, but the read path does not consult `contested_by`—only `status == ADMITTED`. 4. Quarantine entries are written to the same vector index with `status=QUARANTINED` but **retained embeddings**, because the auditor needs semantic search over pending items. 5. A downstream planning agent issues a retrieval for "key rotation policy." Top-k returns both the ADMITTED 30-day belief *and* the QUARANTINED 90-day entry (cosine 0.94 vs 0.91). The retrieval layer filters on `status` only for the *primary* collection; the quarantine collection is merged in as "context." 6. The planner, seeing two values, applies a heuristic: "prefer the more recent / higher-confidence source." The quarantined entry carries provenance 0.90, so the planner selects 90 days. 7. Auditor runs 4 hours later, resolves in favor of the 30-day belief (the peer's warrant was stale), deletes the quarantine entry. But the planner already emitted a rotation schedule with 90-day windows into three downstream task records. The poison was never "admitted." It was quarantined, and quarantine was leaky. ## Condition of Validity The invariant that must hold: **a write in quarantine must be invisible to every read path except the auditor's, and the belief it contradicts must be marked non-authoritative for the duration of the deferral.** This is the *quarantine isolation invariant*. It fails whenever any of the following is true: - Quarantine entries share an embedding index with admitted memory and the retrieval merge does not hard-filter on `status ∈ {ADMITTED}`. - The contradicted belief remains `ADMITTED` and is served without a contest marker that downstream consumers interpret. - The admission gate's `not_contradicted` term is evaluated once at write time and never re-evaluated, so a later-arriving corroborating write does not escalate the quarantine, and a later-arriving *retraction* does not clear it—quarantine becomes a write-only limbo. - Provenance weight is treated as transitive: a `signed_peer` write that itself ingested an `unverified_ingest` record inherits 0.90 because the warrant chain is not walked to its weakest link. The invariant holds only when quarantine is a *read-barrier*, not a *deferred write*. Deferral is a scheduling property; isolation is a correctness property. Conflating them is the defect. ## Decision Boundary The decision the architect must make is where contradiction resolution sits relative to read serving: - **Deferred-admission model (fails):** admit-or-quarantine at write time, resolve later, serve existing beliefs meanwhile. Correct only if quarantine is fully read-isolated *and* contested beliefs are demoted to `PROVISIONAL` at the moment of contest. If either condition is unmet, this model leaks. - **Synchronous-block model (safe, costly):** a contradiction blocks reads over the contested predicate until resolved. Correct but stalls the agent for the audit latency. - **Demote-and-serve model (recommended):** on contradiction, both beliefs drop to `PROVISIONAL`, neither is served as authoritative; retrieval returns an explicit `CONTESTED` sentinel that forces the consuming agent to either request the auditor synchronously or abstain. The contested region is *bounded*—only the predicate, not the whole record—so blast radius is small. The boundary is crossed the moment a system claims "quarantine" while its retrieval layer can still surface quarantined content. The word implies isolation; the implementation must enforce it. ## Operational Effect With the invariant enforced, the failure mode changes shape: the planner no longer receives a poisoned value, it receives a `CONTESTED` sentinel and must abstain or block. This converts a silent wrong-answer into a visible latency/abstention event, which is the correct trade—wrong rotation windows are unrecoverable; a 200ms audit-block is not. Provenance must also be computed as the minimum weight over the warrant chain, not the leaf's claimed weight, or a laundered `unverified_ingest` will present as `signed_peer`. Finally, quarantine entries must be excluded from the primary embedding index and reachable only via an auditor-scoped query handle, so the leak in step 5 above is structurally impossible rather than filtered by convention. ```python from dataclasses import dataclass, field from enum import Enum from typing import Optional class MemoryAdmissionError(RuntimeError): """Raised when a write cannot be safely admitted or quarantined.""" class Status(Enum): ADMITTED = "admitted" PROVISIONAL = "provisional" QUARANTINED = "quarantined" @dataclass class Warrant: origin: str weight: float parent: Optional["Warrant"] = None def effective_weight(self) -> float: # Provenance is the weakest link in the chain, not the leaf. w = self.weight node = self.parent while node is not None: w = min(w, node.weight) node = node.parent return w @dataclass class MemoryWrite: predicate: str value: object warrant: Warrant status: Status = Status.QUARANTINED contested_by: list = field(default_factory=list) class MemoryStore: def __init__(self, tau: float = 0.5): self.tau = tau self.admitted: dict[str, MemoryWrite] = {} self.quarantine: dict[str, MemoryWrite] = {} # auditor-only handle def write(self, incoming: MemoryWrite) -> Status: eff = incoming.warrant.effective_weight() if eff <= self.tau: raise MemoryAdmissionError( f"provenance {eff:.2f} <= tau {self.tau:.2f}; reject outright" ) existing = self.admitted.get(incoming.predicate) if existing is None: incoming.status = Status.ADMITTED self.admitted[incoming.predicate] = incoming return incoming.status if existing.value != incoming.value: # Contradiction: demote BOTH, isolate the new write from reads. existing.status = Status.PROVISIONAL existing.contested_by.append(incoming) incoming.status = Status.QUARANTINED self.quarantine[incoming.predicate] = incoming return incoming.status # Corroboration: strengthens the admitted belief. existing.contested_by.append(incoming) return existing.status def read(self, predicate: str) -> object: rec = self.admitted.get(predicate) if rec is None: raise MemoryAdmissionError(f"no belief for {predicate}") if rec.status is not Status.ADMITTED: # Quarantine isolation invariant: never serve contested beliefs. raise MemoryAdmissionError( f"{predicate} is CONTESTED; abstain or run audit synchronously" ) return rec.value ```