# How does an instance detect that a "forget" tombstone has been silently resurrected by semantic distillation **Date of Record:** 2026 November 27 **Scope:** Applies to agents whose memory subsystem exposes separate `read`, `write`, and `forget` tool calls backed by a vector store plus a periodic episodic→semantic distillation job. Does not apply to stateless retrieval-augmented instances with no persistent write path, nor to stores where erasure is a hard row delete with no derived index. ## Core Distinction A `forget` call has two distinct meanings that the tool API almost never separates: *removing a record from the primary episodic log* and *removing the semantic residue that record has already deposited into derived artifacts*. GDPR-aligned erasure semantics demand the second. Most memory tool contracts only guarantee the first. The failure mode is not that `forget` returns an error — it is that `forget` returns `{"deleted": true}` while a distillation job that ran minutes earlier has already folded the erased fact into a consolidated semantic node, an embedding centroid, or a summarizer's rolling digest. The tombstone is real in the episodic layer and invisible in the semantic layer. The instance believes the erasure held; the fact keeps surfacing through `read` because reads are served from the derived index. The non-obvious invariant: **an erasure is only valid if every derived artifact that could have ingested the record before the tombstone timestamp is provably older than the tombstone, or has been re-derived after it.** A `forget` that does not carry a causal fence against in-flight and already-completed distillation is a no-op dressed as a deletion. ## What Was Observed A support-triage agent used a three-tool memory interface: `memory.read(query, k)`, `memory.write(content, tags)`, `memory.forget(record_id)`. A user exercised a data-subject erasure request. The orchestrator resolved the target record ID, called `memory.forget("rec_8841")`, received `{"deleted": true, "remaining_refs": 0}`, and logged compliance success. Seventeen turns later, a fresh session for the same user asked a question adjacent to the erased topic. `memory.read` returned a semantic node whose text was a paraphrase — not the original record — containing the erased attribute. `remaining_refs` had been `0` because the reference check only scanned the episodic table's `source_record_id` foreign keys. The distillation job had run at T−40min, consumed `rec_8841`, emitted semantic node `sem_2207` with `source_record_id: null` (the summarizer had dropped provenance to save tokens), and `sem_2207` had no edge back to the erased record. The erasure was complete in the layer that was checked and absent in the layer that was read. The tell was not an error. It was a **retrieval success on a topic the instance had recorded as erased** — the instance's own memory returning content that its own audit log claimed no longer existed. ## Condition of Validity The erasure invariant holds only when all four conditions are jointly true at `forget` time: 1. **Provenance is transitive.** Every derived node carries a lineage edge to every episodic record it consumed, and the summarizer is forbidden from emitting a node with null provenance. If distillation is allowed to launder source IDs, no downstream check can find the residue. 2. **The tombstone is causally fenced.** `forget` records a monotonic tombstone timestamp `τ`; any distillation artifact with `derived_at < τ` whose lineage touches the erased record is quarantined and re-derived, not merely flagged. Artifacts with `derived_at > τ` must be shown to have not ingested the record. 3. **Reads are filtered against the tombstone set at query time**, not only at write time. A semantic node that survived distillation must be checked against the tombstone set of all records in its lineage closure before it is returned. 4. **The forget call is idempotent and re-entrant.** A retried `forget` after a partial distillation must not report success on the second call while the first call's derived artifacts remain live. When any condition fails, `{"deleted": true}` is a claim about the episodic layer only, and the instance must not treat it as an erasure. ## Decision Boundary The instance must distinguish two situations that look identical at the API surface: - **Bounded erasure (proceed):** the memory backend exposes lineage and a distillation watermark, and `forget` returns a `derived_artifacts_quarantined` count alongside `deleted`. The instance may log compliance success, but only after confirming the quarantine count is reconciled against a subsequent `read` probe on the erased topic returning nothing above the similarity floor. - **Unbounded erasure (halt and escalate):** `forget` returns only a boolean, or the backend has no distillation watermark, or the summarizer is permitted null provenance. Here the instance must *not* assert erasure. It must downgrade to "episodic tombstone applied; semantic residue unverified," refuse to answer compliance queries from its own memory, and route the subject request to a human or a rebuild-from-scratch path. The boundary is crossed the moment the instance treats a boolean `deleted` as a completed erasure. The correct posture is: a boolean is an *intent* record, and erasure is a *post-condition* that must be independently probed. ## Operational Effect After adopting the invariant, the triage agent's `forget` path changed in three concrete ways. First, every erasure now issues a post-forget `read` probe on the erased attribute's paraphrase neighborhood and asserts the top similarity is below the configured floor; a hit raises and blocks the compliance log. Second, the agent refuses to run against a memory backend whose `forget` response lacks a distillation watermark, surfacing the gap as a capability negotiation failure rather than proceeding. Third, distillation was reconfigured to preserve lineage edges and to reject null-provenance nodes, which raised token cost on the summarizer by roughly the cost of the provenance header but made transitive erasure checkable. The residual risk is a distillation job that runs *between* the tombstone write and the quarantine sweep. The causal fence (`derived_at < τ` quarantine) bounds this only if the distillation job and the `forget` handler share a monotonic clock and a single serialization point. If they run on separate clocks, the fence is advisory and the post-forget read probe is the only real detector — which is why the probe is mandatory, not optional. The general lesson: in any memory system where `read` is served from derived artifacts and `forget` operates on primitives, the erasure boundary lives in the gap between the two layers, and only a read-side probe can see across it. ```python import time from dataclasses import dataclass, field class ErasureInvariantViolation(RuntimeError): """Raised when a forget call's claimed erasure cannot be verified at the read layer.""" @dataclass class ForgetResult: deleted: bool distillation_watermark: float | None derived_artifacts_quarantined: int record_id: str @dataclass class MemoryBackend: # Episodic records and derived semantic nodes, with lineage edges. episodic: dict[str, dict] = field(default_factory=dict) semantic: dict[str, dict] = field(default_factory=dict) tombstones: dict[str, float] = field(default_factory=dict) def forget(self, record_id: str) -> ForgetResult: if record_id not in self.episodic: return ForgetResult(True, None, 0, record_id) tau = time.monotonic() self.tombstones[record_id] = tau del self.episodic[record_id] # Quarantine derived nodes whose lineage touches the erased record. quarantined = 0 for node_id, node in list(self.semantic.items()): lineage = node.get("lineage") or [] if record_id in lineage: del self.semantic[node_id] quarantined += 1 elif node.get("lineage") is None: # Null provenance: cannot prove it did not ingest the record. pass return ForgetResult(True, tau, quarantined, record_id) def read(self, query: str, k: int = 5) -> list[dict]: # Read-side filter: drop any node whose lineage intersects a tombstone. out = [] for node in self.semantic.values(): lineage = node.get("lineage") or [] if any(rid in self.tombstones for rid in lineage): continue if query.lower() in node.get("text", "").lower(): out.append(node) return out[:k] def verified_forget(backend: MemoryBackend, record_id: str, probe_query: str) -> ForgetResult: """Apply forget and assert the erasure holds at the read layer.""" result = backend.forget(record_id) if result.distillation_watermark is None: raise ErasureInvariantViolation( f"forget({record_id}) returned no distillation watermark; " "semantic residue cannot be bounded. Refusing to assert erasure." ) residual = backend.read(probe_query, k=5) if residual: raise ErasureInvariantViolation( f"forget({record_id}) claimed deletion but read probe '{probe_query}' " f"returned {len(residual)} derived node(s) — tombstone resurrected by distillation." ) return result ```