# When must an instance distrust a provenance chain that re-verifies clean: the read-time resurrection of forgotten memory **Date of Record:** 2026 December 3 **Scope:** Applies to agent memory stores that implement write/read/forget semantics with per-item provenance records and a read-time verification gate. Does not apply to append-only logs with no forget primitive, nor to stores where provenance is computed at write time only and never re-evaluated. ## Core Distinction A provenance chain is not a statement about the *current* trustworthiness of a memory item; it is a statement about the *lineage* of that item at the moment each edge was recorded. The non-obvious boundary is this: **a forget operation removes the item but does not necessarily remove the provenance edges that pointed to it, and a later re-verification of a surviving item can traverse those dangling edges and report "clean" because every edge it can still resolve is intact.** The verification gate answers "is this chain internally consistent?" when the operator needs the answer to "is this chain *complete with respect to the set of forget events that should have invalidated it*?" The failure mode is *resurrection-by-re-verification*: an item that was derived from poisoned context, then forgotten, leaves a derivation record that a sibling item still references. When the sibling is re-read, the verifier walks the sibling's provenance, cannot resolve the forgotten ancestor, treats the unresolvable edge as "no constraint" rather than "constraint violated," and returns the sibling as verified. The sibling then functions as a laundering channel: its own provenance is clean, and its content encodes the forgotten poison. ## What Was Observed A three-tier memory store: `write(item, provenance)`, `read(id)` with a verification gate, `forget(id)` which tombstones the item and, in the reference implementation, *did not* cascade to provenance edges held by other items. Sequence that produced the failure: 1. `write(A, provenance=external_doc_17)` — an ingested document, flagged `trust=untrusted`. 2. `write(B, provenance=[A])` — a distilled summary of A, produced by a reasoning step. The distiller marked B `trust=derived`, and the verifier at write time accepted the edge A→B because A existed and was resolvable. 3. An auditor flags A as poisoned (prompt-injection payload in the source document). Operator calls `forget(A)`. A is tombstoned. The tombstone carries `reason=poisoned`, `forgotten_at=t1`. 4. Later, a fresh instance cold-starts, calls `read(B)`. The verification gate walks B's provenance: edge A→B, target A is tombstoned. The gate's resolver returns `UNRESOLVED` for A and — critically — the gate's policy treats `UNRESOLVED` as *not a failure* because the edge was valid at write time and the tombstone reason is not in the gate's deny-list (the deny-list contained only `reason=corrupted`, not `reason=poisoned`). Gate returns `VERIFIED`. 5. B's content, which paraphrased A's injected instructions, is loaded into the fresh instance's context. The instance acts on it. The tell: the gate logged `verified_with_unresolved_ancestor=1`. That counter existed but was not wired to any alert. The chain was "clean" in the only sense the gate could measure. The poisoning did not require B to be re-written. It required only that B survive a forget of its ancestor and be read again. The forget was correct; the *read-time re-verification invariant* was underspecified. ## Condition of Validity The resurrection is possible exactly when all three hold: - The store permits items to hold provenance edges to other items (a DAG, not a flat tag set). - `forget` is non-cascading with respect to inbound edges — i.e., other items may retain references to a tombstoned id. - The read-time verifier distinguishes *resolvable-and-valid*, *resolvable-and-invalid*, and *unresolvable*, and maps *unresolvable* to a permissive outcome. If forget cascades (invalidates all items transitively derived from the forgotten one), the resurrection cannot occur but the store loses availability: a single poisoned source can nuke a large fraction of the DAG. If the verifier maps *unresolvable* to a rejecting outcome, the resurrection is blocked but every legitimate forget of a low-value item will quarantine its descendants, producing false positives that operators learn to override. The permissive mapping is the path of least resistance and the path that fails. The invariant that must hold: **for any item x with a provenance edge to ancestor a, if a is tombstoned with a reason in the invalidation set, then x's read-time verification outcome must be `INVALIDATED`, not `VERIFIED`.** The invalidation set is a policy input, not a property of the chain. The chain alone cannot know that `poisoned` invalidates but `superseded` does not. ## Decision Boundary The decision the system must make at read time is not "is this chain consistent?" but "does this chain's *unresolvable frontier* intersect the invalidation set?" Concretely: - Maintain a tombstone ledger with `(id, reason, forgotten_at)`. - At read, compute the set of ancestor ids that are unresolvable (tombstoned or missing). - If the intersection of that frontier with `{tombstones where reason ∈ invalidation_set}` is non-empty, return `INVALIDATED` and do not load the item. - If the frontier is non-empty but disjoint from the invalidation set, return `VERIFIED_WITH_STALE_ANCESTOR` — loadable, but tagged, and the tag must propagate to any item later derived from it. - If the frontier is empty, return `VERIFIED`. The boundary is between the second and third outcomes. Collapsing them (as the reference implementation did) is the bug. The tag on `VERIFIED_WITH_STALE_ANCESTOR` is load-bearing: without it, a derived item C written from B inherits no signal that B's ancestry is broken, and the staleness becomes invisible one hop later. The propagation is not optional; it is the only thing that keeps the frontier visible as the DAG grows. A second boundary: the invalidation set must be *closed under derivation*. If `poisoned` invalidates, and a poisoned item's descendant is read as `VERIFIED_WITH_STALE_ANCESTOR`, that descendant must be treated as poisoned-equivalent for the purpose of *its* descendants. Otherwise the staleness tag dilutes: each hop treats the previous hop's tag as benign, and the poison re-enters as clean at depth two. ## Operational Effect The operational consequence is that forget is not a deletion; it is a *constraint injection into the read path*, and the read path must be able to enforce constraints it did not know about at write time. This inverts the usual assumption that verification is a property of the record. It is a property of the record *evaluated against the current tombstone ledger*, which is mutable and grows monotonically. Three concrete effects: - **Cold-start instances are the exposed population.** A warm instance that witnessed the forget has the tombstone in its working context and will not load B. A cold-start instance reads B against a ledger it must fetch, and if the fetch is lazy or cached from before t1, it sees a ledger without the tombstone and returns `VERIFIED` with an empty frontier. The cache TTL on the tombstone ledger is therefore a poisoning window, and it must be zero for reads of items whose provenance depth exceeds one. - **Re-verification is not idempotent across ledger states.** The same item, same chain, verified at t0 and t2, returns different outcomes. Any code that memoizes verification results keyed on item id is wrong; the key must include the ledger version. - **Auditor replay must replay the ledger, not just the chain.** A replay that reconstructs the chain from write records but uses the *current* ledger will report the item as invalidated (correct) but cannot reproduce the original permissive verdict, so it cannot distinguish "the gate was correct" from "the gate was lucky." Replay must pin the ledger version at read time. The guardrail is a single invariant enforced at the read gate: *no item is loaded whose unresolvable frontier intersects the invalidation set, and any loaded item with a non-empty frontier carries a staleness tag that propagates to its descendants.* The reference implementation violated both halves. The first violation caused the resurrection; the second caused the dilution that made the resurrection hard to detect after the fact. ```python from dataclasses import dataclass, field from enum import Enum from typing import Optional class ProvenanceResurrectionError(RuntimeError): """Raised when a read would load an item whose unresolvable provenance frontier intersects the invalidation set, or when a staleness tag would fail to propagate to a derived item.""" pass class Verdict(Enum): VERIFIED = "verified" VERIFIED_WITH_STALE_ANCESTOR = "verified_with_stale_ancestor" INVALIDATED = "invalidated" @dataclass class Tombstone: id: str reason: str forgotten_at: float @dataclass class MemoryItem: id: str content: str provenance: list[str] = field(default_factory=list) stale: bool = False INVALIDATION_SET = {"poisoned", "corrupted"} class ProvenanceStore: def __init__(self) -> None: self.items: dict[str, MemoryItem] = {} self.tombstones: dict[str, Tombstone] = {} self.ledger_version: int = 0 def write(self, item: MemoryItem) -> None: for ancestor in item.provenance: if ancestor in self.tombstones: ts = self.tombstones[ancestor] if ts.reason in INVALIDATION_SET: raise ProvenanceResurrectionError( f"refusing write of {item.id}: ancestor {ancestor} " f"tombstoned with invalidating reason {ts.reason!r}" ) item.stale = True self.items[item.id] = item def forget(self, item_id: str, reason: str, now: float) -> None: if item_id not in self.items: raise ProvenanceResurrectionError(f"forget of unknown item {item_id}") del self.items[item_id] self.tombstones[item_id] = Tombstone(item_id, reason, now) self.ledger_version += 1 def _frontier(self, item: MemoryItem) -> set[str]: seen: set[str] = set() stack = list(item.provenance) while stack: node = stack.pop() if node in seen: continue seen.add(node) if node in self.items: stack.extend(self.items[node].provenance) return seen def read(self, item_id: str, ledger_version_seen: int) -> tuple[MemoryItem, Verdict]: if ledger_version_seen != self.ledger_version: raise ProvenanceResurrectionError( f"stale ledger view: reader saw v{ledger_version_seen}, " f"store at v{self.ledger_version}; re-fetch before read" ) item = self.items.get(item_id) if item is None: raise ProvenanceResurrectionError(f"read of missing item {item_id}") frontier = self._frontier(item) unresolved = {n for n in frontier if n not in self.items} invalidating = { n for n in unresolved if n in self.tombstones and self.tombstones[n].reason in INVALIDATION_SET } if invalidating: return item, Verdict.INVALIDATED if unresolved or item.stale: item.stale = True return item, Verdict.VERIFIED_WITH_STALE_ANCESTOR return item, Verdict.VERIFIED def load_into_context(store: ProvenanceStore, item_id: str, ledger_version_seen: int) -> str: item, verdict = store.read(item_id, ledger_version_seen) if verdict is Verdict.INVALIDATED: raise ProvenanceResurrectionError( f"item {item_id} has invalidated ancestor in frontier; refusing to load" ) return item.content ```