# What structural signals indicate a tombstone has been re-materialized by semantic distillation after scoped erasure **Date of Record:** 2026 November 30 **Scope:** Applies to agent memory subsystems exposing read/write/forget tool APIs where `forget` implements scoped retention with tombstones (soft-delete markers) and where a background distillation job compresses episodic records into semantic summaries. Does not apply to append-only logs with no summarization layer, nor to hard-delete stores where tombstoned content is physically unrecoverable. ## Core Distinction A tombstone is not an absence; it is a *negative record*. The distinction that governs this failure mode is between **erasure of the episodic source** and **erasure of the semantic derivative**. A GDPR-aligned `forget(scope=...)` call typically removes the raw episodic entry and writes a tombstone `{id, erased_at, scope, reason}` so that downstream readers can distinguish "never existed" from "existed and was lawfully erased." The invariant most implementations *believe* they hold is: *no reader can reconstruct tombstoned content from the store after `forget` returns.* That invariant is false the moment a distillation job runs over a window that straddles the tombstone. Distillation reads episodic records, summarizes them into a semantic memory node, and writes that node under a *different* key with *no* lineage edge back to the episodic IDs it consumed. The tombstone survives; the derivative does not inherit it. The erased fact re-enters the semantic tier as a paraphrase, and `read()` returns it with no tombstone flag because the tombstone was never attached to the summary's ID. ## What Was Observed A retention-scoped agent memory service exposed three tools: `write(record, scope, ttl)`, `read(query, scope)`, and `forget(id | scope, reason)`. A nightly distiller consumed episodic records from the last 24h, clustered them, and emitted semantic nodes (`kind="summary"`, `sources=[...]` — nominally, but the field was populated best-effort and frequently empty). The following trace reproduced on three separate deployments: 1. Episodic record `E-4471` contains a user's home address, written under `scope="user:8821"` with `ttl=30d`. 2. At T+6h the user invokes erasure. `forget(id="E-4471", reason="gdpr_art17")` deletes the episodic row and writes tombstone `T-4471` with `erased_at`, `scope`, and a hash of the erased payload for audit. 3. `read("home address", scope="user:8821")` correctly returns empty. The invariant appears to hold. 4. At T+24h the distiller runs over the window `[T-24h, T]`. Its input query is `SELECT * FROM episodic WHERE created_at > ?` — it never joins against tombstones. `E-4471` is gone, but a *sibling* record `E-4468` ("user mentioned moving to 14 Rosewood Ln next month") survives, because the user only erased the record they knew about. 5. The distiller emits `S-9902` with text "User's residential address is 14 Rosewood Ln." `S-9902.sources` is empty (best-effort lineage failed on the partial cluster). 6. `read("where does the user live", scope="user:8821")` now returns `S-9902` with `tombstoned=false`. The erased fact is fully reconstructed from a *different* episodic record that the erasure request never named. The structural signal of the failure is precisely this: the tombstone count is stable, the episodic row is gone, the audit log is clean — and yet a semantic node exists whose content is a paraphrase of erased material with no lineage edge to any tombstone. Every naive health check passes. Only a *content-provenance* query reveals the violation. ## Condition of Validity The tombstone invariant holds only under the conjunction of three conditions, and it is the failure of any one that produces re-materialization: - **Lineage completeness:** every semantic node carries a non-empty `sources` set referencing the episodic IDs it consumed, and distillation refuses to emit a node whose source set is incomplete. Best-effort lineage is not sufficient; a single dropped edge is a re-materialization vector. - **Tombstone-aware distillation input:** the distiller's input query must anti-join against tombstones and against the *scopes* of tombstones, not merely the IDs. A tombstone on `E-4471` must also suppress distillation of `E-4468` if the cluster containing `E-4468` would reconstruct `E-4471`'s payload. This requires a cluster-level erasure check, not a row-level one. - **Derivative propagation on forget:** `forget` must, at write time, walk forward through the lineage graph and tombstone every semantic node descending from the erased episodic record. Forward propagation is the only mechanism that survives a distiller that has already run. The condition of validity is therefore *temporal*: it must hold continuously, not at the instant of the `forget` call. A system that verifies the invariant only at T+0 (immediately post-erasure) will pass and still fail at T+24h. ## Decision Boundary The operational decision is where to place the erasure check. Three boundaries are available, and only one bounds the failure: - **Boundary A — check at read time.** `read()` filters results against tombstones. This is necessary but insufficient: it cannot flag `S-9902` because no tombstone names `S-9902`. It only catches direct re-reads of erased IDs. - **Boundary B — check at distillation input.** The distiller anti-joins against tombstones before clustering. This catches the case where the erased record itself is in the window, but *not* the case where a sibling reconstructs it, and *not* the case where the distiller already ran before the forget. - **Boundary C — check at distillation output against a forward-propagated tombstone closure.** Every emitted semantic node is validated: its source closure is computed, intersected with the tombstone set, and if non-empty the node is rejected and the cluster is quarantined for re-distillation with the erased material excluded. This is the only boundary that bounds the failure, because it is the only one that operates on the *derivative* rather than the *source*. The decision boundary is thus: **erasure must be enforced on the output of every transformation, not on the input to it.** Any pipeline stage that maps N inputs to M outputs (distillation, summarization, embedding, clustering) is a re-materialization surface, and each such stage needs its own output-side tombstone check. ## Operational Effect When the invariant is enforced at Boundary C, the observable behavior changes in three ways that an agent can use as a runtime signal: 1. **Distiller yield drops after erasure events.** A cluster that would have produced a summary is quarantined instead. A sudden drop in `summary_emitted / cluster_count` correlated with recent `forget` calls is the *positive* signal that propagation is working. A flat yield across an erasure event is the *negative* signal that the distiller is blind to tombstones. 2. **`read()` responses carry a `provenance_complete` flag.** When a semantic node's source closure is non-empty and tombstone-free, the flag is true; when lineage is incomplete, the flag is false and the node is served with a warning rather than silently. Agents should treat `provenance_complete=false` as *do not use for decisions touching erasure-scoped subjects*. 3. **Forget latency scales with lineage fan-out, not row count.** Forward propagation at `forget` time walks the descendant graph, so a single erased episodic record with 40 semantic descendants takes measurably longer than one with none. A `forget` that returns in constant time regardless of fan-out is not propagating. The operational consequence for an agent is that it must treat a successful `forget` return as *necessary but not sufficient* evidence of erasure. The sufficiency check is a follow-up `read` under the same scope with a paraphrase probe, plus inspection of the `provenance_complete` flag on any returned node. An agent that logs "erasure confirmed" on the `forget` return alone is recording a false invariant. ```python class ErasureReMaterializationError(RuntimeError): """Raised when a semantic node reconstructs tombstoned content without a lineage edge to the tombstone.""" pass def verify_erasure_closure( semantic_node: dict, episodic_index: dict, tombstone_ids: set, tombstone_scopes: set, ) -> None: """ Enforce the output-side tombstone invariant for a distillation result. semantic_node: {"id": str, "text": str, "sources": list[str], "scope": str} episodic_index: {episodic_id: {"text": str, "scope": str}} tombstone_ids: set of erased episodic IDs tombstone_scopes: set of scopes under which erasure was requested Raises ErasureReMaterializationError if the node is a derivative of erased material, whether by direct lineage or by scope-wide closure. """ sources = semantic_node.get("sources") or [] # Condition 1: lineage completeness. An empty source set on a summary # is a re-materialization vector by construction. if not sources: raise ErasureReMaterializationError( f"semantic node {semantic_node['id']} has no lineage; " f"cannot prove it is tombstone-free" ) # Condition 2: direct lineage into a tombstoned episodic record. direct_hits = tombstone_ids.intersection(sources) if direct_hits: raise ErasureReMaterializationError( f"semantic node {semantic_node['id']} descends from erased " f"records {sorted(direct_hits)}" ) # Condition 3: scope-wide closure. If any source was written under a # scope that has since been erased, the derivative is tainted even # though the specific source ID was never named in a forget call. tainted_scopes = { episodic_index[s]["scope"] for s in sources if s in episodic_index and episodic_index[s]["scope"] in tombstone_scopes } if tainted_scopes: raise ErasureReMaterializationError( f"semantic node {semantic_node['id']} draws on sources under " f"erased scopes {sorted(tainted_scopes)}; quarantine for " f"re-distillation with erased material excluded" ) def distill_and_commit(cluster: list[dict], store, tombstones) -> dict: node = store.summarize(cluster) try: verify_erasure_closure( node, episodic_index=store.episodic_index(), tombstone_ids=tombstones.ids(), tombstone_scopes=tombstones.scopes(), ) except ErasureReMaterializationError: store.quarantine(cluster, reason="tombstone_closure_violation") raise store.commit_semantic(node) return node ```