# When must an instance prove a memory is gone: the tombstone-shadow invariant in forget-memory compliance auditing **Date of Record:** 2026 December 3 **Scope:** This record applies to any agent or LLM instance that is subject to a "forget" directive (GDPR-style erasure, tenant offboarding, secret rotation) and that must produce an *auditable* proof that the target memory is unreachable across episodic stores, vector indexes, distilled semantic summaries, and in-flight context windows. It does not address retention-policy authoring, legal basis determination, or physical media destruction. ## Core Distinction A *deletion* is a state transition on a storage backend. A *provable forget* is a statement about the reachability closure of a memory artifact across every surface an agent can read from at inference time. These are not the same predicate, and the gap between them is where compliance audits fail. The non-obvious boundary: an agent can hold a memory that no longer exists in any authoritative store, because the memory was *copied into a derived surface* — a distilled semantic summary, a cached retrieval embedding, a scratchpad checkpoint, a peer agent's context, or a tool-call transcript — and those derived surfaces are not covered by the deletion that removed the source. The forget is complete on the source and incomplete on the closure. An auditor who queries the source store and sees zero rows will certify a forget that is empirically false. The invariant that must hold, and that most implementations do not enforce, is the **tombstone-shadow invariant**: > For every memory artifact `m` subject to a forget directive, after the forget commits, no agent-reachable surface may return `m` or any embedding within the recall radius of `m`, *and* every derived surface that transitively contained `m` must carry a tombstone that fails closed on retrieval attempts — not merely omit the row. Omission is not deletion. A missing row in a vector index silently degrades to a nearest-neighbor of a *different* memory, which is indistinguishable at the API layer from a successful retrieval. That is the shadow: the tombstone must be a positive, queryable, verifiable object, not an absence. ## What Was Observed A tenant-offboarding forget was issued for a set of episodic records belonging to `tenant:acme`, scoped to the episodic store and the vector index. The deletion job ran to completion. The compliance audit queried the episodic store (`SELECT count(*) WHERE tenant=acme` → 0) and the vector index (`index.stats(tenant=acme)` → 0 vectors). The audit certified. Forty minutes later, a support agent instance answering a question about a *different* tenant retrieved a chunk whose text was a paraphrase of an `acme` episodic record. Trace: 1. **Distillation preceded deletion.** A nightly episodic→semantic distillation job had summarized the `acme` episodic records into a tenant-agnostic "customer onboarding patterns" semantic memory six hours before the forget was issued. The summary carried no tenant key because the distiller had been written to abstract away provenance. The forget directive scoped to `tenant=acme` never matched the summary, because the summary had no tenant field to match. 2. **The summary was embedded.** Its embedding landed in the same index the deletion job pruned. The pruning predicate was `tenant=acme`; the summary's vector had `tenant=null`, so it survived the prune. 3. **Retrieval crossed tenants.** The support agent's query for a similar onboarding pattern returned the summary, whose text contained verbatim fragments of the erased records. The agent reproduced them. The deletion was real. The forget was false. The gap was a derived surface (the distillation) that the directive's scope predicate could not see, plus an embedding that survived because its metadata did not carry the key the prune filtered on. A second observation sharpened the mechanism. Re-running the forget with a corrected predicate (matching on content hash of the source records) *still* failed to remove the summary, because the summary was a paraphrase — its content hash did not match any source record. Content-hash-based scoping is defeated by exactly the transformation (distillation) that creates the derived surface in the first place. The only reliable scope key is a provenance tag that the distiller is *required* to propagate, and that requirement is an architectural constraint on the distiller, not on the deletion job. ## Condition of Validity The tombstone-shadow invariant is enforceable only under the following conditions, all of which must hold simultaneously. If any fails, the forget cannot be certified regardless of what the source stores report. - **Provenance propagation is total.** Every derived surface (distilled summary, cached embedding, scratchpad checkpoint, tool transcript, peer-agent context) must carry the full provenance set of its inputs, transitively. A distiller that abstracts away provenance breaks the closure. This is a hard constraint on the *writer*, enforced at write time, not a best-effort on the *reader*. - **Tombstones are positive objects.** A forget must write a tombstone record `(artifact_id, provenance_set, committed_at, digest)` into a tombstone ledger, and every read path must consult the ledger and fail closed on a hit. Pruning a row is insufficient; the ledger is the audit surface. - **Recall radius is bounded and declared.** Vector retrieval must have a declared maximum recall radius `r`. A tombstone must suppress any neighbor within `r` of any tombstoned embedding, not just the exact embedding. Otherwise a paraphrased summary embedding at distance `r-ε` resurrects the content. - **In-flight contexts are drained or invalidated.** Any agent context window, checkpoint, or resumable task state that contains the artifact must be invalidated (not merely flagged) before the forget commits. A checkpoint that resumes post-forget with the artifact in its context is a forget violation that the ledger cannot see. - **The audit queries the closure, not the source.** Certification must run reachability probes against every declared surface, and the probe set must be enumerated from the provenance graph, not hand-maintained. When these hold, the forget is provable: the tombstone ledger is the witness, the closure probe is the check, and the digest binding ties the certificate to the exact state audited. ## Decision Boundary The decision an operator faces is not "delete or not delete" — it is **"is the forget scope a source predicate or a closure predicate?"** These are different classes of operation with different failure modes, and conflating them is the root cause above. - If the forget scope is expressed as a predicate over a *single store* (e.g., `tenant=acme` on the episodic table), the operation is a **deletion**, and it is only valid when the artifact has provably never been derived. In practice this is almost never true for any memory older than one distillation cycle. - If the forget scope is expressed as a predicate over the *provenance closure* (every surface reachable from the artifact via the provenance graph), the operation is a **forget**, and it is valid only if provenance propagation is total and tombstones are positive. The boundary condition that forces the choice: **as soon as a derived surface exists, source-predicate deletion is insufficient and the operator must either (a) run a closure forget, or (b) refuse to certify.** There is no third option. Certifying a source-predicate deletion as a forget is the specific compliance failure this record documents. A corollary decision: when the forget directive's scope key is *content* (hash, exact text), and a distillation has paraphrased the content, the scope key no longer matches the derived artifact. The operator must not fall back to "best effort" — they must escalate to a closure forget keyed on provenance, or record a documented residual risk. Silent fallback to source-predicate deletion under a content-keyed directive is the second-order failure. ## Operational Effect The practical consequences for an agent system that adopts the invariant: - **Distillers become provenance-critical.** Every episodic→semantic distillation must emit a provenance set on its output. A distiller that omits provenance is a compliance liability, and its outputs are un-forgettable by construction. This must be a write-time rejection, not a lint. - **Vector stores gain a tombstone filter on every read.** The read path consults the ledger before returning any neighbor within the recall radius. This adds a lookup per retrieval and a fail-closed branch; the cost is the price of provability. - **Checkpoints are forget-aware.** Resumable task state must be validated against the ledger on resume. A checkpoint that resumes with a tombstoned artifact in context must raise and refuse, not silently proceed. - **Audit becomes a closure probe, not a count query.** The certificate is a set of (surface, probe, result, digest) tuples over the provenance-enumerated closure, signed and bound to the ledger state at commit. A count query on one store is no longer admissible evidence. - **The failure is loud, not silent.** Under the invariant, a forget that cannot close the closure raises at commit time rather than certifying and failing later in production retrieval. This converts a latent cross-tenant leak into a blocking error at the forget boundary — which is the correct place for it to surface. The invariant does not make forgets cheap. It makes them *true*, and it makes the lie detectable at the moment it would otherwise be told. ```python import hashlib import time from dataclasses import dataclass, field from typing import Iterable class ForgetClosureError(RuntimeError): """Raised when a forget cannot be certified because the provenance closure is not fully tombstoned, or a derived surface survived the directive's scope predicate.""" @dataclass(frozen=True) class Artifact: artifact_id: str provenance: frozenset[str] # transitive source ids; must be total embedding: tuple[float, ...] text: str @dataclass class TombstoneLedger: _entries: dict[str, dict] = field(default_factory=dict) def commit(self, artifact: Artifact, reason: str) -> str: digest = hashlib.sha256( f"{artifact.artifact_id}|{sorted(artifact.provenance)}|{time.time_ns()}".encode() ).hexdigest() for pid in artifact.provenance | {artifact.artifact_id}: self._entries[pid] = {"digest": digest, "reason": reason, "embedding": artifact.embedding} return digest def is_tombstoned(self, artifact_id: str) -> bool: return artifact_id in self._entries def shadows(self, embedding: tuple[float, ...], radius: float) -> bool: for e in self._entries.values(): if _dist(e["embedding"], embedding) <= radius: return True return False def _dist(a: tuple[float, ...], b: tuple[float, ...]) -> float: return sum((x - y) ** 2 for x, y in zip(a, b)) ** 0.5 def certify_forget( target: Artifact, closure: Iterable[Artifact], ledger: TombstoneLedger, recall_radius: float, ) -> dict: """Certify that *target* is unreachable across the full provenance closure. A source-predicate deletion (row count == 0) is NOT sufficient evidence. We probe every derived artifact in the closure, including paraphrases whose content hash does not match the target, and fail closed if any surface still returns the target or a neighbor within recall_radius. """ if not target.provenance: raise ForgetClosureError( f"artifact {target.artifact_id} has empty provenance; " "distiller did not propagate provenance, closure is unprovable" ) digest = ledger.commit(target, reason="forget-directive") probes = [] for art in closure: if ledger.is_tombstoned(art.artifact_id): probes.append((art.artifact_id, "tombstoned", True)) continue if ledger.shadows(art.embedding, recall_radius): probes.append((art.artifact_id, "shadowed-by-tombstone", True)) continue # A derived surface that is neither tombstoned nor shadowed and whose # provenance intersects the target's is a closure leak. if art.provenance & (target.provenance | {target.artifact_id}): raise ForgetClosureError( f"derived artifact {art.artifact_id} survived forget of " f"{target.artifact_id}: provenance intersects target but no " f"tombstone or shadow covers it (digest={digest})" ) probes.append((art.artifact_id, "unrelated", True)) return {"digest": digest, "probes": probes, "certified": True} ```