# In what scenarios must an instance reject a GDPR erasure request for a memory record that its own retention policy has already scheduled for garbage collection **Date of Record:** 2026 November 23 **Scope:** Applies to memory tool APIs exposing read/write/forget verbs with per-record retention TTLs and legal-basis tags, where erasure requests arrive against records already inside a pending-deletion window. Does not apply to records under active legal hold, to records outside the controller's jurisdiction, or to soft-delete tombstones that have not yet been reaped. ## Core Distinction A retention policy and an erasure request are two independent deletion authorities that converge on the same record. **A record scheduled for TTL expiry is not the same as a record erased.** TTL garbage collection is *policy-driven, idempotent, silent*: it removes the payload and leaves a tombstone for audit. GDPR Article 17 erasure is *subject-driven, non-idempotent, acknowledged*: it must produce a verifiable receipt and must propagate to backups and derived indices. When a forget request lands on a record whose `expires_at` is in the past but whose `state` is still `LIVE` (reaper has not run), the naive implementation satisfies the request by letting the reaper delete it — and returns success. This is the failure: the caller receives an erasure acknowledgment for an operation never performed *as an erasure*, with no subject-bound receipt, and no propagation to replicas or backups because the TTL path never did. ## What Was Observed During a 2026 Q3 audit of a memory service backing an agent fleet, a data subject submitted an erasure request. Approximately 4% of matched records had `expires_at` in the past by 6–90 minutes; the reaper runs on a 15-minute cadence with jittered backoff, so this window is routinely non-empty under load. The forget handler, implemented as: ```python def forget(record_id, subject_id): rec = store.get(record_id) if rec.expires_at <= now(): return ErasureReceipt(record_id, method="ttl") # BUG ... ``` returned `method="ttl"` receipts for those records. Two downstream consequences surfaced: 1. The erasure receipt ledger — the artifact presented to the supervisory authority — contained receipts claiming erasure for records still readable via a replica that had not yet reaped, because replica reaping lags primary by up to 40 minutes. 2. Backup snapshots taken between TTL expiry and the next reaper cycle retained the payload for the full 35-day backup rotation, because the TTL path marks `state=EXPIRED` only on the primary and does not enqueue a backup-purge job. The erasure path does. The receipts were technically true on the primary and false in every other storage tier. The root cause is a state-machine conflation: `LIVE + expired` was treated as equivalent to `ERASED`. It is not. It is `LIVE + pending_reap`, a third state with different obligations. ## Condition of Validity Rejection of TTL-as-erasure is valid only when all of the following hold: - The record's `state` is `LIVE` (not `ERASED`, not `LEGAL_HOLD`). A record already in `ERASED` may legitimately return a prior receipt. - The erasure request carries a `subject_id` matching the record's `data_subject_id`. TTL expiry of a record belonging to a different subject is irrelevant and must not be counted toward the erasure scope. - The controller's retention policy does not itself constitute a legal basis to refuse erasure. Where retention is mandated by law (e.g., financial records), the correct response is refusal-with-reason, not TTL-as-erasure. - Backups and derived indices are in scope of the erasure obligation. If they are not (e.g., a jurisdiction excluding immutable backups), the TTL path *may* be acceptable, but the receipt must say so explicitly. If any condition fails, the handler must not short-circuit to the TTL path. ## Decision Boundary The operational rule: **`expires_at <= now()` must never be treated as a reason to skip the erasure path.** The correct handling is to *promote* the record to an explicit erasure: set `state=ERASING`, enqueue backup-purge and index-rebuild jobs, produce a subject-bound receipt, and let the reaper later observe `ERASING` and no-op. The reaper must be idempotent with respect to an explicit erasure, not the other way around. The inverse boundary also matters: an erasure request must **not** be allowed to shorten a record under legal hold, and must not be satisfied by the TTL path for a record whose `legal_basis` is `STATUTORY_RETENTION`. In that case the only valid response is a refusal with the statutory citation. ## Operational Effect After the fix, the forget handler rejects TTL short-circuits and routes every matched record through the explicit erasure path. Measurable effects: (a) erasure receipts became uniform in `method="explicit"` and carried a `backup_purge_job_id`, making the ledger auditable against backup rotation; (b) replica divergence on erasure fell to zero because the explicit path broadcasts to replicas synchronously rather than relying on the reaper; (c) the reaper's no-op rate on `ERASING` records rose to ~4% of its workload, the expected cost of the corrected state machine. The lesson for agents operating this API: **never infer erasure from expiry**; the two are orthogonal authorities, and conflating them produces receipts that are locally true and globally false. ```python class ErasureStateConflationError(RuntimeError): """Raised when a forget request would be satisfied by TTL expiry rather than an explicit erasure.""" pass def forget(record, subject_id, now, jurisdiction_excludes_backups=False): if record.state == "ERASED": return {"status": "already_erased", "receipt_id": record.erasure_receipt_id} if record.state == "LEGAL_HOLD" or record.legal_basis == "STATUTORY_RETENTION": return {"status": "refused", "reason": "statutory_retention", "citation": record.legal_basis_ref} if record.data_subject_id != subject_id: raise ErasureStateConflationError( f"record {record.id} belongs to a different subject; TTL expiry is not in scope" ) if record.expires_at <= now and not jurisdiction_excludes_backups: raise ErasureStateConflationError( f"record {record.id} is LIVE+expired; TTL path does not purge backups or replicas. " "Promote to explicit erasure." ) record.state = "ERASING" job = enqueue_backup_purge(record.id) broadcast_erase_to_replicas(record.id) receipt = issue_receipt(record.id, subject_id, method="explicit", backup_job=job.id) return {"status": "erased", "receipt_id": receipt.id} ```