# Under what conditions must an instance refuse a scoped forget call that would resurrect a superseded memory through an audited tombstone gap **Date of Record:** 2026 November 25 **Scope:** Applies to agents whose memory subsystem exposes explicit `write`, `read`, and `forget` tool calls carrying a retention scope (tenant/session/entity) and an auditable deletion ledger. Does not apply to append-only logs with no deletion API, nor to soft-delete schemes where tombstones are never garbage-collected. ## Core Distinction A *forget* is not the inverse of a *write*. A write is a monotonic append of a new memory version; a forget is a *retraction* that must suppress every version reachable under its scope, including versions the agent has not yet materialized in its own working context. The failure boundary is the gap between two clocks: the **retention clock** (when the tombstone is scheduled to be compacted out of the audit ledger) and the **resurrection clock** (when a stale replica, cached embedding, or in-flight checkpoint replays an old version back into the store). The non-obvious invariant is this: *a forget call is only valid if every version it retracts is either (a) already tombstoned with a ledger entry that outlives the caller's max replay horizon, or (b) atomically retracted in the same transaction that writes the tombstone.* When a forget matches a version whose tombstone was already compacted — because the retention policy's `audit_ttl` is shorter than the replica's `replay_window` — the store accepts the forget, the audit ledger shows a clean deletion, and yet a later replay of the compacted-away version re-inserts it with no tombstone to block it. The memory is *auditably deleted and operationally present*. This is the tombstone gap. ## What Was Observed An instance managing a customer-support memory scope received a `forget(scope="entity:acct-4471", reason="GDPR-erasure")`. The store held three versions of a preference memory: `v1` (write, t=0), `v2` (write, t=90d), `v3` (write, t=180d). The retention policy set `audit_ttl=90d`, so the tombstone for `v1` — superseded by `v2` at t=90d and forgotten at t=95d — had already been compacted out of the ledger at t=185d. The forget at t=200d matched `v2` and `v3`, wrote fresh tombstones, and returned `{"deleted": 2, "audit_ref": "del-9f2c"}`. The audit trail was internally consistent: two deletions, two ledger entries, both live. But the replica that had been offline since t=80d replayed its local `v1` at t=201d. The store's upsert path saw no tombstone for `v1` (it had been compacted at t=185d), accepted the write, and `v1` — a memory the erasure request was meant to cover — reappeared under `entity:acct-4471` with a fresh `write` timestamp. The agent's next `read` returned it. The audit log said the entity was clean. It was not. The second observation: the agent had no way to detect this from the forget response. The response reported `deleted: 2`, not `deleted: 2 of 3 known versions`. The store's version index had been pruned alongside the tombstone, so the count was honest about what it could see and silent about what it could not. ## Condition of Validity A scoped forget is valid only when the following holds for every version `v` matched by the scope: ``` tombstone_ledger_retention(v) >= max(replay_window(replicas), checkpoint_horizon(agents)) ``` Equivalently: the forget must be *durable against the slowest replayer*. Two structural conditions enforce this: 1. **Tombstone retention must be a function of the replay horizon, not of a fixed policy TTL.** The retention policy's `audit_ttl` is a compliance parameter; it is not, and must not be conflated with, the tombstone's *functional* lifetime. A tombstone that is compacted before the last replica can replay is not a tombstone — it is a comment. 2. **The forget must enumerate versions, not just current state.** A scope-level forget that matches only live versions silently skips already-superseded versions whose tombstones may have lapsed. The store must either (a) keep a *version manifest* whose retention outlives the tombstone ledger, or (b) refuse the forget with a `VersionManifestIncomplete` error when the manifest cannot prove coverage. When neither holds, the correct behavior is to **fail closed**: reject the forget, surface the gap, and require the caller to widen retention or reconcile replicas before retrying. A forget that succeeds while leaving a resurrection path open is worse than a forget that fails, because it manufactures false assurance in the audit trail. ## Decision Boundary The instance must refuse — not merely warn — when any of the following is true at forget time: - The matched scope contains a version whose tombstone is absent from the ledger *and* whose original write timestamp is within `max(replay_window, checkpoint_horizon)` of now. Absence of a tombstone within the replay horizon means either the version was never forgotten (fine, forget it now) or its tombstone was compacted prematurely (not fine — the gap is live). - The version manifest's coverage interval does not span the full write history of the scope. A manifest that starts at t=180d cannot prove that nothing was written at t=10d. - The forget's `audit_ttl` is shorter than the maximum `replay_window` advertised by any registered replica or checkpoint store. This is a policy-level refusal: the forget *cannot* be made durable under current configuration. The instance must *not* refuse when the manifest proves coverage and every matched version's tombstone outlives the replay horizon — even if the audit TTL is short, because the functional tombstone and the audit record are separate artifacts and only the former governs resurrection. The boundary is not "is the memory gone?" but "can the store prove, from retained metadata, that no replay can bring it back within the window any replayer could act?" When that proof is unavailable, the forget is unsound regardless of what the ledger reports. ## Operational Effect Failing closed converts a silent integrity violation into a loud, recoverable one. The agent receives `VersionManifestIncomplete` (or `TombstoneRetentionInsufficient`) and can take bounded remediation: extend `audit_ttl` to cover the replay horizon, force replica reconciliation, or escalate to a human operator with the specific gap identified. The erasure request remains *pending* rather than *falsely complete*. The cost is latency and occasional operator involvement on the first forget after a retention-policy change. The benefit is that the audit ledger's claim "this entity is clean" is now a claim the store can defend against the slowest replayer in the system — which is the only claim that matters when a regulator, an auditor, or a resurrected `v1` asks the question. The invariant to carry forward: **tombstone lifetime is bounded below by replay horizon, never by audit policy.** Audit TTL governs how long you keep the *record* of deletion; tombstone retention governs whether the deletion *holds*. Conflating them is the tombstone gap, and the gap is where forgotten memories come back. ```python class TombstoneGapError(RuntimeError): """Raised when a scoped forget cannot prove durability against the replay horizon.""" pass def validate_forget( scope: str, matched_versions: list[dict], manifest_coverage: tuple[int, int], # (earliest_known_write, latest_known_write) audit_ttl_seconds: int, max_replay_window_seconds: int, now: int, ) -> None: manifest_start, manifest_end = manifest_coverage # 1. Manifest must span the full write history of the scope. for v in matched_versions: if not (manifest_start <= v["written_at"] <= manifest_end): raise TombstoneGapError( f"scope={scope} version={v['id']} written_at={v['written_at']} " f"outside manifest coverage {manifest_coverage}; cannot prove no " f"compacted-away version exists in the gap" ) # 2. Every matched version's tombstone must outlive the slowest replayer. horizon = now - max_replay_window_seconds for v in matched_versions: if v.get("tombstone_retained_until", 0) < now + max_replay_window_seconds: if v["written_at"] >= horizon: raise TombstoneGapError( f"scope={scope} version={v['id']} tombstone expires " f"{v.get('tombstone_retained_until')} before replay horizon " f"{now + max_replay_window_seconds}; replay would resurrect it" ) # 3. Policy-level check: audit TTL must not be mistaken for tombstone retention. if audit_ttl_seconds < max_replay_window_seconds: raise TombstoneGapError( f"scope={scope} audit_ttl={audit_ttl_seconds}s < replay_window=" f"{max_replay_window_seconds}s; forget cannot be made durable under " f"current retention policy" ) ```