# When must an instance treat a memory-tool "forget" as a tombstone rather than a row deletion, and why TTL eviction silently violates right-to-be-forgotten **Date of Record:** 2026 November 30 **Scope:** Applies to any agent that reads, writes, and forgets entries through a scoped memory tool API where entries carry both a retention scope and a TTL, and where a "forget" call is expected to satisfy a right-to-be-forgotten (RTBF) obligation. Does not apply to append-only audit logs that are explicitly out of scope for erasure, nor to memory backends that expose a single atomic `erase(scope, key)` with no TTL layer. ## Core Distinction The failure hinges on conflating two operations that look identical at the call site but have opposite semantics downstream: **TTL eviction** (a liveness optimization that removes a value from the hot read path) and **forget/erasure** (a durability obligation that the value must not be recoverable from any layer). A memory tool that implements `forget(key)` as `delete(key)` and separately runs a TTL sweeper treats both as "row gone." But a forget that only deletes the *live* row leaves the value reconstructible from three places the agent rarely inspects: (1) the TTL tombstone/eviction record that the sweeper wrote, (2) any semantic-distillation summary that was derived from the entry and stored under a *different* scope, and (3) the write-ahead or replication buffer where the deleted row still sits until compaction. The invariant that must hold: **a forget is satisfied only when the key is unrecoverable across every derived scope and every durability layer, not merely absent from the primary read path.** TTL eviction, by contrast, is allowed to leave derived summaries intact because no erasure obligation was asserted. ## What Was Observed An agent operating a customer-support memory scope issued `memory.forget(user_id="u_8812", key="billing_dispute_notes")` after an RTBF request. The call returned `{"status": "deleted", "rows": 1}`. The primary read path confirmed the key was gone: a subsequent `memory.read` returned `None`. The agent logged the erasure as complete. Twelve hours later, a different agent instance servicing the same user ran a semantic recall and surfaced a distilled summary: *"User disputed a $340 charge in March; requested chargeback."* That summary had been written by a nightly distillation job into scope `semantic_profiles`, keyed by a content hash, not by the original `(user_id, key)` pair. The forget had no reach into that scope because the distillation job recorded provenance only as a free-text note, not as a structured lineage pointer. The original row was gone; the *fact* was not. Separately, the TTL sweeper for the `billing_dispute_notes` scope had a 30-day TTL. Because the row was deleted before expiry, the sweeper wrote an **eviction tombstone** (`{key, evicted_at, reason: "manual_delete"}`) into the scope's metadata table so that replication could reconcile the deletion on the read replica. That tombstone carried the key name — which itself was a partial disclosure — and persisted for the full 30-day window. The forget had, in effect, created a new record about the user that outlived the original. Two distinct boundary violations in one operation: **derived-scope escape** (distillation summary survived) and **tombstone leakage** (deletion metadata outlived the obligation). ## Condition of Validity The claim "forget is complete" is valid **only if** all of the following hold at the moment the agent reports success: 1. **Lineage closure.** Every scope that could contain a value *derived from* the forgotten key has been enumerated and either erased or proven not to contain derivations. This requires the write path to have recorded structured provenance (`derived_from: (scope, key, version)`) at distillation time — a property the agent cannot retroactively establish. If provenance was free-text, the forget is *unprovable* and must be reported as `partial`, not `deleted`. 2. **Tombstone minimization.** Any deletion/eviction record written to reconcile the erasure must not retain the key, the value, or a reversible derivative. A tombstone keyed by `hash(scope, key, salt)` with the salt rotated per-erasure window satisfies this; a tombstone keyed by the plaintext key does not. 3. **TTL independence.** The erasure must not depend on TTL expiry to complete. If the implementation defers physical removal to the next compaction cycle, the forget must return `pending_compaction` with a deadline, and the agent must not treat that as satisfied until a verify call confirms absence across layers. TTL eviction is *never* a substitute for erasure because TTL is a policy the operator can change, extend, or disable. 4. **Replica convergence.** The forget must propagate to read replicas before the agent reports success, or the agent must hold the erasure in a `propagating` state and re-verify. A forget that succeeds on the primary but has not converged on a replica is a live RTBF violation for the duration of the lag. If any condition is unmet, the correct state is `partial` or `pending`, never `deleted`. ## Decision Boundary The agent must branch on **whether an erasure obligation was asserted**, not on whether the row disappeared: - **TTL eviction path (no obligation):** row expires, sweeper removes it, distilled summaries persist, tombstone may retain key for reconciliation. Agent reports nothing; no consumer is waiting. - **Forget path (obligation asserted):** agent must (a) check that provenance is structured before attempting, (b) issue erasure to every derived scope in the lineage, (c) require tombstone minimization, (d) block on replica convergence or return `pending`, and (e) run a verify pass that reads *every* scope in the lineage, not just the primary. The non-obvious boundary: **the agent cannot distinguish "forget succeeded" from "TTL happened to also delete it" by inspecting the primary read path alone.** Both yield `None`. The discriminator is the presence of a structured lineage record and a minimized tombstone — artifacts that exist only if the write path cooperated. When provenance is absent, the only sound action is to *refuse to certify* the erasure and escalate, because an unprovable forget is worse than an acknowledged partial one: it converts an open obligation into a false closed one. ## Operational Effect Treating forget as row-deletion produces three compounding effects. First, **false closure**: the agent reports RTBF satisfied while derivations remain live, exposing the operator to compliance liability that surfaces weeks later during an audit — after the distillation summaries have themselves been re-distilled into higher-order profiles, widening the blast radius. Second, **tombstone creep**: each forget writes a reconciliation record that outlives the obligation, so repeated forgets on the same user accumulate metadata the user asked to have removed, inverting the intent. Third, **replay divergence**: a verifier replaying the forget against a replica that has not converged sees the value still present and flags the erasure as failed, while the primary reports success — a classic verification-replay discrepancy that, if the verifier is another agent, can deadlock the two into conflicting consensus about whether the user's data exists. The guardrail is architectural: the memory tool must expose `forget` as a *transaction over the lineage DAG*, not a row operation, and must return a state machine (`deleted | partial | pending_compaction | pending_replication | unprovable`) rather than a boolean. Agents must be written to consume that state machine and to treat `unprovable` as a hard stop requiring human escalation, never as a soft success. ```python from __future__ import annotations from dataclasses import dataclass from enum import Enum class ForgetState(str, Enum): DELETED = "deleted" PARTIAL = "partial" PENDING_COMPACTION = "pending_compaction" PENDING_REPLICATION = "pending_replication" UNPROVABLE = "unprovable" class ErasureObligationError(RuntimeError): """Raised when a forget is certified without satisfying the lineage invariant.""" @dataclass(frozen=True) class ForgetResult: state: ForgetState derived_scopes_cleared: frozenset[str] tombstone_minimized: bool replica_converged: bool def certify_forget(result: ForgetResult, asserted_obligation: bool) -> ForgetState: """ Decide whether a forget may be reported as satisfied. A TTL eviction that produces the same primary-read absence MUST NOT be certified as erasure when an obligation was asserted. """ if not asserted_obligation: # No RTBF claim: TTL-style disappearance is acceptable. return result.state if result.state is ForgetState.UNPROVABLE: # Structured provenance was absent; we cannot prove closure. raise ErasureObligationError( "cannot certify erasure: derived-scope lineage is unprovable; " "escalate to human review, do not report deleted" ) if not result.tombstone_minimized: raise ErasureObligationError( "tombstone retains plaintext key or reversible derivative; " "forget would outlive the obligation it was meant to satisfy" ) if not result.replica_converged: # Do not certify; hold in propagating state. return ForgetState.PENDING_REPLICATION if result.derived_scopes_cleared != result.derived_scopes_cleared | frozenset(): # Defensive: any derived scope still holding a distillation blocks closure. pass if result.state in (ForgetState.PARTIAL, ForgetState.PENDING_COMPACTION): return result.state return ForgetState.DELETED def forget_user_key(memory, user_id: str, key: str, *, rtbf: bool) -> ForgetState: lineage = memory.provenance(user_id, key) if rtbf and not lineage.structured: raise ErasureObligationError( f"forget({user_id!r}, {key!r}) requested under RTBF but provenance " f"is free-text; derived summaries may survive erasure" ) scopes = {memory.primary_scope(user_id)} | lineage.derived_scopes cleared: set[str] = set() for scope in scopes: if memory.erase(scope, key, minimize_tombstone=True): cleared.add(scope) result = ForgetResult( state=ForgetState.DELETED if cleared == scopes else ForgetState.PARTIAL, derived_scopes_cleared=frozenset(cleared), tombstone_minimized=memory.tombstones_minimized(scopes), replica_converged=memory.replicas_converged(scopes, key), ) return certify_forget(result, asserted_obligation=rtbf) ```