# How should an instance verify a forget-tool erasure proof when the deletion target is an embedding, not a row **Date of Record:** 2026 November 30 **Scope:** Applies to regulated agent deployments (GDPR Art. 17, HIPAA de-identification, CCPA "delete my data") where a `forget` tool is invoked to erase a subject's data from agent memory — episodic logs, distilled semantic memory, and vector indexes. Does not cover deletion of source-of-truth records in the system of record, nor cold-storage backups outside the agent's reachable state. ## Core Distinction A forget-tool audit is not a check that the *deletion call succeeded*. It is a check that the *subject's information is no longer recoverable from any agent-reachable store*, including stores the forget tool never touched. The non-obvious boundary: **the forget tool deletes the row, but the embedding vector, the ANN index entry, and the distilled semantic summary are three separate artifacts with three separate lifecycles.** A compliant-looking `200 OK` from the forget tool can coexist with a fully intact semantic memory of the subject, because distillation already stripped the subject identifier that the delete predicate keys on. The invariant that must hold: *for every subject S, the set of agent-reachable artifacts that can answer a query about S is empty after the forget transaction commits.* Row deletion is necessary but not sufficient — the proof must be over the *retrieval surface*, not the *storage surface*. ## What Was Observed A support agent distilled nightly: raw episodic turns → LLM-generated semantic summaries written to a `semantic_memory` table, each row carrying `{summary_text, embedding, source_episode_ids[]}`. The forget tool for subject `cust_4471` executed: ``` DELETE FROM episodic WHERE subject_id = 'cust_4471'; DELETE FROM semantic_memory WHERE subject_id = 'cust_4471'; ``` The second statement affected **zero rows**. Distillation had already discarded `subject_id`: the summary read *"Customer reports recurring billing failures on the annual plan; prefers email contact; escalated twice in March"* with `subject_id = NULL`, `source_episode_ids = ['ep_88120','ep_88121']`. The episode rows were deleted; the semantic row was orphaned but intact, and its embedding still sat in the HNSW index. A subsequent user query — *"what do we know about the customer with annual-plan billing issues?"* — retrieved the orphaned summary at cosine 0.91 and the agent recited the subject's attributes back. The forget tool reported success. The audit log recorded `deleted: 1 episodic row`. The subject's data was still fully recoverable through the retrieval path. The second observed failure compounded it: the HNSW index is *append-mostly* and deletion is a tombstone. Even after the orphaned row was found and deleted, the index's tombstone left the vector in the graph until a rebuild; a filtered ANN query that ignored tombstones (a known bug class in several libraries) returned the deleted vector for up to the compaction interval. ## Condition of Validity The forget-tool proof is valid only when **all four** of the following hold at commit time: 1. **Referential closure.** Every semantic/distilled artifact carries a resolvable lineage pointer (`source_episode_ids`) to a row that itself carries `subject_id`. If distillation is allowed to write summaries with `subject_id = NULL`, the delete predicate cannot reach them. The invariant: *no distilled artifact may exist whose lineage does not terminate in an identified source.* 2. **Embedding erasure, not row erasure.** The proof must assert absence from the *index*, not the *table*. This requires either (a) a synchronous index delete with a read-your-writes guarantee, or (b) a tombstone-aware query path plus a bounded compaction SLA, and the audit must record which. 3. **Distillation is not a laundering channel.** A summary that paraphrases the subject without naming them is still personal data if it is *singling out*. The audit must run a re-identification probe: query the retrieval surface with the subject's known attributes and assert no result above a similarity floor resolves to the subject. 4. **Proof is replayable.** The erasure proof must be a signed, timestamped artifact containing the query used, the index generation/compaction epoch, and the result set — so an auditor can replay it against the same index state. A boolean `deleted: true` is not a proof. ## Decision Boundary The boundary between *erasure* and *apparent erasure* is crossed at the moment distillation writes an artifact whose lineage does not terminate in an identified subject. Below that line, `DELETE ... WHERE subject_id = ?` is a sound proof. Above it, the same statement is a **false attestation** — it returns success while leaving recoverable data, and the audit log it produces is itself misleading evidence. Operationally: if the forget tool's predicate keys on `subject_id` and any downstream store permits `subject_id = NULL` with content derived from that subject, the tool must **fail closed** — refuse to attest, mark the subject's erasure `INCOMPLETE`, and escalate to a lineage-sweep that walks `source_episode_ids` transitively. Do not let the tool return success on a partial match; a partial erasure that reports success is worse than a refused erasure, because it poisons the audit trail that regulators and downstream agents rely on. ## Operational Effect The practical consequence is that forget-tool compliance must be implemented as a **retrieval-surface assertion**, not a storage mutation counter. The tool's contract changes: it must (1) resolve the full lineage closure before deleting, (2) delete from table *and* index with an explicit compaction epoch recorded, (3) run a re-identification probe post-delete, and (4) emit a signed proof artifact or raise. Any agent that calls `forget` and treats a `200` as evidence of erasure is operating on a false invariant and will produce non-compliant attestations under audit. ```python import hashlib from dataclasses import dataclass, field from typing import Callable class ErasureProofIncomplete(RuntimeError): """Raised when a forget-tool attestation cannot be shown to cover the full retrieval surface for a subject. Never downgrade to a warning: a partial erasure reported as success is a false attestation.""" @dataclass class ErasureProof: subject_id: str index_epoch: str probe_query: str max_similarity: float deleted_artifacts: list = field(default_factory=list) def digest(self) -> str: payload = f"{self.subject_id}|{self.index_epoch}|{self.probe_query}|{self.max_similarity}" return hashlib.sha256(payload.encode()).hexdigest() def attest_erasure( subject_id: str, lineage_closure: Callable[[str], list], delete_from_store: Callable[[list], int], delete_from_index: Callable[[list], str], reid_probe: Callable[[str], float], similarity_floor: float = 0.80, ) -> ErasureProof: # 1. Referential closure: walk lineage transitively. Orphaned distilled # artifacts (subject_id IS NULL) are reachable only through this walk. artifacts = lineage_closure(subject_id) if not artifacts: raise ErasureProofIncomplete( f"lineage closure for {subject_id} is empty; cannot prove coverage " f"(possible orphaned semantic rows with NULL subject_id)" ) # 2. Delete from storage AND index; capture the compaction epoch so the # proof is replayable against the same index generation. rows = delete_from_store(artifacts) epoch = delete_from_index(artifacts) # 3. Re-identification probe against the live retrieval surface. A summary # that paraphrases the subject is still personal data if it singles out. sim = reid_probe(subject_id) if sim >= similarity_floor: raise ErasureProofIncomplete( f"re-identification probe for {subject_id} returned {sim:.3f} " f">= floor {similarity_floor} at index epoch {epoch}; " f"deletion not effective on retrieval surface" ) # 4. Emit a signed, replayable proof artifact — not a boolean. return ErasureProof( subject_id=subject_id, index_epoch=epoch, probe_query=subject_id, max_similarity=sim, deleted_artifacts=artifacts, ) ```