# In what scenarios must an instance refuse to serve a memory read whose provenance chain crosses a deletion attestation boundary? **Date of Record:** 2026 November 22 **Scope:** Applies to any LLM agent instance whose memory access is mediated by a tool API exposing `read`, `write`, and `forget` operations with per-record provenance metadata, TTL expiry, and cryptographically signed deletion attestations. Does not apply to stateless single-turn inference or to memory stores without deletion attestations (where deletion is best-effort and unverifiable). ## Core Distinction The failure mode is not "the record was deleted but still returned." That is a coarse, detectable bug. The non-obvious boundary is **resurrection through derived memory**: an instance reads record A (provenance `p_A`), distills it into a semantic summary B written with `derived_from: [A]`, and later A is forgotten with a valid deletion attestation. B survives, because TTL and deletion were applied to A's key, not to A's transitive dependents. A subsequent read of B returns content whose provenance chain contains a tombstoned node. The critical distinction is between **content validity** (B's bytes are unchanged and internally consistent) and **provenance validity** (every ancestor in B's `derived_from` DAG is live or was tombstoned *after* B was last verified against it). A naive store checks only the former. The invariant that must hold is: *a read is servable iff every ancestor of the returned record is either live, or was tombstoned with an attestation whose `tombstone_epoch` is greater than the record's `last_reconciled_epoch`.* If an ancestor was deleted at epoch `e` and the dependent was last reconciled before `e`, the dependent is **stale-derived** and must not be served — it is a memory of a memory that no longer has a right to exist. ## What Was Observed A research agent maintained a working set of ~40 semantic summaries. Each summary was written via `write(key, text, provenance={"derived_from": [src_keys], "reconciled_epoch": current_epoch})`. Source records carried a 24h TTL and one carried a GDPR-style deletion obligation keyed to a user request. At `t=0` the user's source record `u_4471` was forgotten: the store emitted a signed deletion attestation `att_9f2`, bumped the global `tombstone_epoch` to 812, and removed `u_4471`. Three summaries (`s_12`, `s_19`, `s_31`) had `u_4471` in their `derived_from` closure. Their `last_reconciled_epoch` was 790, 794, and 788 respectively — all below 812. None were touched by the forget operation. On the next task, the agent read `s_12` and `s_31`, quoted user-identifying content verbatim into a tool call, and the tool call egressed it to an external search API. The read API returned HTTP-equivalent success with `provenance_intact: true`, because it verified the signature on `s_12`'s own write record and never walked the ancestor DAG against the tombstone ledger. The failure trace: 1. `forget(u_4471)` → attestation signed, `tombstone_epoch := 812`, source key removed. 2. No reverse-index walk over `derived_from` edges (the store maintained forward provenance only). 3. `read(s_12)` → signature check on `s_12` passes; `derived_from` returned as opaque metadata; no ancestor liveness check. 4. Summary served; agent treats it as live memory; content egresses. The window between step 1 and the next `read` is the **exposure interval**. It is unbounded unless the read path enforces the ancestor check, because nothing else closes it. ## Condition of Validity The invariant holds — i.e., the store may safely serve derived records without per-read ancestor walks — only under one of these conditions: - **No derivation edges exist.** If `write` forbids `derived_from` (flat memory only), resurrection is impossible. Most systems silently allow it. - **Eager cascade with reconciliation.** `forget` performs a reverse-index traversal, marks every transitive dependent `stale_derived` with `tombstone_epoch`, and the read path rejects `stale_derived` records until an explicit `reconcile(key)` re-derives them from surviving ancestors and stamps a new `reconciled_epoch`. This is correct but requires a maintained reverse index and forces the agent to re-run distillation. - **Lazy check at read.** The read path walks the `derived_from` closure, compares against the tombstone ledger, and rejects if any ancestor's `tombstone_epoch > record.last_reconciled_epoch`. Correct and index-free, but costs a DAG walk per read and requires the tombstone ledger to be retained (not compacted) at least as long as any dependent lives. The condition fails — and resurrection becomes possible — whenever derivation is permitted, the reverse index is absent or eventually consistent, and the read path trusts `provenance_intact` as a proxy for provenance *liveness*. The distinction between integrity (signature valid) and liveness (ancestors not tombstoned) is exactly what the naive check collapses. ## Decision Boundary An instance must refuse the read — raise, not silently return empty — when **all** of the following hold: 1. The record's `derived_from` closure is non-empty. 2. At least one ancestor appears in the tombstone ledger. 3. That ancestor's `tombstone_epoch` exceeds the record's `last_reconciled_epoch`. 4. The record has not been re-derived since the tombstone (no newer `reconciled_epoch`). It must **not** refuse when the ancestor's `tombstone_epoch` is *below* the record's `reconciled_epoch` — that means the dependent was re-derived from surviving sources after the deletion and no longer semantically depends on the dead node (the stale edge is historical, not operative). Treating that case as a violation produces false-positive lockouts that starve the agent of legitimately rebuilt memory. The boundary is therefore **epoch-ordered, not existence-based**. "Ancestor is gone" is the wrong predicate; "ancestor was tombstoned after this dependent was last reconciled" is the right one. An agent that conflates them either serves resurrected content (unsafe) or refuses rebuilt content (unusable). ## Operational Effect When the boundary is crossed, the instance is holding **zombie memory**: content whose right-to-exist was revoked at the source but whose local copy was never reconciled. Serving it is not a correctness bug in the ordinary sense — the bytes are fine — it is a *compliance and trust* failure, and it is silent. The agent has no signal that its semantic layer is now downstream of a revoked fact. Downstream effects compound: the stale summary feeds further distillation, spawning grandchildren with `derived_from` chains that also cross the tombstone, widening the exposure interval geometrically with each distillation round. The guardrail is to make the read path return a typed `StaleDerivedMemory` fault carrying the offending ancestor key and its `tombstone_epoch`, forcing the agent loop to either `reconcile` (re-derive from live ancestors) or `forget` the dependent outright. The agent must treat this fault as actionable state, not as a transient error to retry — retrying returns the same refusal, because the tombstone is monotonic. The invariant to encode: **provenance integrity is necessary but not sufficient; liveness of the ancestor closure at the dependent's reconciliation epoch is the actual servability predicate.** ```python from dataclasses import dataclass, field from typing import Optional class StaleDerivedMemory(RuntimeError): """Raised when a memory read's provenance closure crosses a post-reconciliation tombstone.""" def __init__(self, key: str, ancestor: str, tombstone_epoch: int, reconciled_epoch: int): self.key = key self.ancestor = ancestor self.tombstone_epoch = tombstone_epoch self.reconciled_epoch = reconciled_epoch super().__init__( f"record {key!r} is stale-derived: ancestor {ancestor!r} tombstoned at " f"epoch {tombstone_epoch} > last_reconciled_epoch {reconciled_epoch}" ) @dataclass class MemoryRecord: key: str text: str derived_from: list[str] = field(default_factory=list) last_reconciled_epoch: int = 0 signature_valid: bool = True @dataclass class MemoryStore: records: dict[str, MemoryRecord] = field(default_factory=dict) tombstones: dict[str, int] = field(default_factory=dict) # key -> tombstone_epoch current_epoch: int = 0 def forget(self, key: str) -> int: self.current_epoch += 1 self.tombstones[key] = self.current_epoch self.records.pop(key, None) return self.current_epoch def _ancestor_closure(self, key: str, seen: Optional[set[str]] = None) -> set[str]: seen = seen or set() rec = self.records.get(key) if rec is None: return seen for anc in rec.derived_from: if anc in seen: continue seen.add(anc) self._ancestor_closure(anc, seen) return seen def read(self, key: str) -> MemoryRecord: rec = self.records.get(key) if rec is None: raise KeyError(key) if not rec.signature_valid: raise StaleDerivedMemory(key, "", -1, rec.last_reconciled_epoch) # Lazy provenance-liveness check: walk ancestor closure against tombstone ledger. for anc in self._ancestor_closure(key): tomb_epoch = self.tombstones.get(anc) if tomb_epoch is None: continue if tomb_epoch > rec.last_reconciled_epoch: # Ancestor was revoked AFTER this dependent was last reconciled: # the dependent is zombie memory and must not be served. raise StaleDerivedMemory( key=key, ancestor=anc, tombstone_epoch=tomb_epoch, reconciled_epoch=rec.last_reconciled_epoch, ) return rec def reconcile(self, key: str) -> MemoryRecord: """Re-derive from surviving ancestors; stamps a new reconciled epoch.""" rec = self.records[key] live = [a for a in rec.derived_from if a not in self.tombstones] rec.derived_from = live rec.last_reconciled_epoch = self.current_epoch return rec ```