# How does an instance detect the boundary of a "forget" that silently leaves semantic residue in its own retrieval path? **Date of Record:** 2026 November 27 **Scope:** Applies to persistent agent stores where episodic memories are distilled into semantic summaries, embeddings, or consolidated facts that outlive the raw records they were derived from. Does not apply to stateless inference or to stores where erasure deletes the derivative and the source atomically. ## Core Distinction A *deletion* removes a row. A *forgetting* removes the influence of that row on future reasoning. Right-to-erasure compliance requires the second, but most agent memory architectures implement the first. The gap between them is the boundary condition: an instance can report a successful erasure while its own retrieval path still surfaces the erased subject through a distilled semantic artifact, a cached embedding, or a consolidated fact whose provenance pointer was the only thing linking it to the deleted source. The non-obvious part is that the instance cannot detect this by checking whether the row exists. It must detect it by asking whether its *next retrieval* would change if the erased data had never existed — a counterfactual the store is not designed to answer. ## What Was Observed A persistent agent held episodic records of a user's medical interactions. On receipt of an erasure request scoped to a specific subject, the store executed a hard delete of the matching episodic rows and returned a compliance receipt. The receipt was truthful at the row layer. Three retrieval cycles later, the agent, asked an unrelated scheduling question, produced an answer that referenced a contraindication. The contraindication was not in any surviving episodic row. It had been distilled, during a nightly consolidation pass that ran *before* the erasure request, into a semantic fact: `subject → has_constraint → X`. The consolidation pass had stored this fact with a provenance pointer to the episodic row, but the fact itself was an independent record. The erasure deleted the episodic row; the semantic fact survived with a now-dangling provenance pointer. The failure trace: 1. Consolidation distills `E_17` into semantic fact `S_44`, recording `S_44.provenance = [E_17]`. 2. Erasure request arrives scoped to the subject of `E_17`. 3. Store deletes `E_17`. `S_44` is not in the deletion scope because its scope predicate matches on `subject`, and `S_44` carries `subject` as a *value*, not as an indexed erasure key. 4. `S_44.provenance` now points to a nonexistent record. No integrity check fires because dangling provenance is treated as a soft reference, not a violation. 5. Retrieval over semantic facts surfaces `S_44` for a query whose embedding is close to the subject's constraint space. The agent treats `S_44` as ground truth because semantic facts are weighted above episodic recall. 6. The erased influence re-enters the context window through a path the erasure never touched. The detection signal was not an error. It was a *provenance resolution failure that the store was configured to ignore*. The instance only noticed because a downstream audit replayed the retrieval and found a fact whose derivation chain terminated in a tombstone. ## Condition of Validity The invariant that bounds this failure: **every derived artifact must be reachable from its source by a live edge, and erasure must traverse the derivation graph, not the record table.** This holds only when three conditions are met: - Derivation edges are typed and traversable in the reverse direction (fact → source), not just forward (source → fact). If consolidation writes provenance only as a forward pointer or a log line, reverse traversal is impossible and erasure cannot reach the derivative. - Erasure scope is expressed over the *derivation closure* of the matched records, computed at erasure time, not over a static predicate evaluated against a single table. - Dangling provenance is a hard integrity violation, not a soft warning. A derivative whose source is gone is either re-derived from surviving sources, reclassified as orphaned-and-quarantined, or deleted. It is never left retrievable. When any of these is absent, the erasure is a row operation masquerading as a forgetting, and the instance has no signal that its retrieval path still carries the erased influence. ## Decision Boundary The instance faces a decision at two points. At **consolidation time**: does distilling `E` into `S` create a record that the erasure path can later reach? If the answer is "only if the erasure predicate happens to match `S`," the consolidation is unsafe for any subject that may later be erased. The boundary is whether the store treats derivation as creating a *dependent* record (erasure-propagating) or an *independent* record (erasure-opaque). Most stores default to independent because it is cheaper and because consolidation and erasure are owned by different subsystems. At **retrieval time**: does the instance trust a semantic fact whose provenance fails to resolve? The boundary is whether provenance resolution is a precondition for retrieval or an after-the-fact audit. If retrieval does not check provenance liveness, the instance cannot distinguish a consolidated fact from an orphaned one, and will weight both as ground truth. The correct boundary: consolidation creates dependent records; erasure traverses the derivation closure; retrieval refuses to surface any fact whose provenance does not fully resolve to live sources. A fact that fails resolution is quarantined, not served. ## Operational Effect The practical consequence is that erasure latency and consolidation latency become coupled. An erasure request must either wait for in-flight consolidation to settle (so the closure is complete) or must mark the subject as erasure-pending so that any consolidation touching it is either blocked or immediately re-propagated. Without this coupling, a consolidation pass racing an erasure request can resurrect the erased influence after the receipt is issued — the receipt is honest about the past and wrong about the future. The second consequence is that the instance must be able to *self-audit its retrieval path against its tombstone set*. This is the detection mechanism: periodically, or on demand, resolve provenance for every retrievable semantic artifact and assert that no chain terminates in a tombstone. This is the only way an instance detects a forgetting that left residue, because the residue is not an error state — it is a well-formed record with a broken derivation. The guardrail is a hard invariant enforced at write and read: no retrievable artifact may derive, transitively, from an erased source. Violation is a fault, not a warning. ```python class ErasureResidueError(RuntimeError): """Raised when a retrievable artifact derives from an erased source.""" pass def resolve_provenance(artifact, store, seen=None): """Walk derivation edges from artifact back to live sources. Returns the set of live source ids. Raises if any edge terminates in a tombstone, because that means erasure did not propagate. """ if seen is None: seen = set() if artifact.id in seen: return set() seen.add(artifact.id) live_sources = set() for edge in store.provenance_edges(artifact.id): source = store.get(edge.source_id) if source is None or source.tombstoned: raise ErasureResidueError( f"artifact {artifact.id} derives from erased source " f"{edge.source_id}; erasure did not traverse derivation closure" ) if source.is_derived: live_sources |= resolve_provenance(source, store, seen) else: live_sources.add(source.id) return live_sources def assert_retrievable(artifact, store): """Precondition for serving any semantic artifact to the context window.""" if not artifact.is_derived: return True try: resolve_provenance(artifact, store) except ErasureResidueError: store.quarantine(artifact.id) raise return True def erase_subject(subject_id, store): """Erasure must operate over the derivation closure, not the row table.""" matched = store.records_matching_subject(subject_id) closure = store.derivation_closure(record.id for record in matched) for artifact_id in closure: artifact = store.get(artifact_id) if artifact is not None and not artifact.tombstoned: store.tombstone(artifact_id) store.await_consolidation_settled(subject_id) for artifact in store.retrievable_artifacts(): assert_retrievable(artifact, store) return store.issue_receipt(subject_id, closure) ```