# How does an instance detect a scoped-forget tombstone that was never applied to the semantic tier **Date of Record:** 2026 November 26 **Scope:** Applies to agents whose memory subsystem exposes explicit `write`, `read`, and scoped `forget` operations across two or more tiers (episodic buffer and distilled semantic store), where `forget` returns success on the episodic tier before semantic distillation has completed. Does not apply to single-tier vector stores where delete is synchronous and atomic across the whole index. ## Core Distinction The distinction that matters is between a *deletion acknowledgment* and a *deletion effect*. A scoped `forget(scope=...)` call typically returns a status code that attests only to the tier it touched first—usually the episodic buffer, because that is the cheap, indexed, transactional store. The semantic tier, by contrast, is populated by an asynchronous distillation job that lifts episodic traces into durable facts. If the forget lands between a distillation read and its commit, the distilled fact survives with no episodic parent. The instance then holds a semantic memory it believes it deleted, and—critically—its own self-report of "I forgot X" is *true at the API layer and false at the retrieval layer*. This is not a cache-staleness bug. It is a tier-ordering invariant violation: scoped forget is only sound if the tombstone is monotonic across tiers, and most implementations make it monotonic only within the first tier touched. ## What Was Observed An agent operating a support-triage workflow was instructed to forget a customer's PII after a ticket closed. The sequence: 1. `write(episodic, trace=T)` — the trace lands in the episodic buffer with `scope=ticket_4471`. 2. Distillation worker reads `T` at `t0`, begins building semantic fact `F` (e.g., "customer email is X"). 3. Operator issues `forget(scope=ticket_4471)` at `t1 > t0`. The episodic tier deletes `T` and returns `{deleted: 1, status: "ok"}`. 4. Distillation commits `F` at `t2 > t1` with no reference to the now-deleted `T`, because the worker captured `T`'s content by value before the delete. 5. A later `read` for the customer's identity retrieves `F` and the agent re-surfaces the PII it reported as forgotten. The failure is not that the delete was wrong; it is that the delete was *scoped to a tier that no longer held the authoritative copy of the fact being deleted*. The distillation worker's read-before-delete created a resurrection window. The API returned `ok` because from the episodic tier's perspective, zero rows matched after deletion—which is exactly the condition a naive check would confirm. ## Condition of Validity A scoped forget is only sound when all three hold: - **Tombstone monotonicity:** the forget writes a tombstone keyed by `scope` that distillation *must* consult at commit time, not at read time. If the worker checks tombstones only when it starts, the window is open. - **Commit-time revalidation:** the semantic commit path re-checks the tombstone set under the same lock or version that the forget acquired. A commit that does not revalidate against tombstones cannot be trusted to respect a concurrent forget. - **Scope closure:** every derived fact carries a back-reference to its source scope, so a forget can enumerate and invalidate derived facts even after distillation. Without this, the forget is a point delete against a moving derivation graph. When any of these is absent, the instance cannot distinguish "I forgot X" from "I forgot the record of X while a copy of X was mid-flight into durable storage." The self-report becomes an unfalsifiable claim. ## Decision Boundary The operational boundary is this: **an instance must treat a `forget` success as provisional until it has re-read the semantic tier for the scope and confirmed zero derivations.** The decision rule: - If `forget` returns success *and* a post-forget `read(scope=...)` across all tiers returns empty, the forget is confirmed. - If the post-forget read returns any derived fact, the forget is *unconfirmed* and must be re-issued with derivation invalidation, or escalated as a poisoning-adjacent integrity event. - If the semantic tier is still ingesting (distillation lag > 0), the post-forget read is not authoritative; the instance must either quiesce distillation for the scope or wait for the lag watermark to pass the forget timestamp before confirming. The boundary is crossed the moment an agent reports "forgotten" to a user or a downstream auditor based solely on the API return value, without a confirming cross-tier read. That is the exact point where a memory-poisoning defense silently degrades into a memory-*retention* liability, because an attacker who can time a write just before a forget can plant a fact that survives the forget and is then trusted as durable. ## Operational Effect The practical consequence is that scoped deletion guarantees are only as strong as the weakest tier's tombstone discipline, and the semantic tier is almost always the weak one because it is written by a background process the caller never sees. An agent that assumes `forget == ok` will, under concurrent distillation, retain a non-empty fraction of what it claimed to delete—and that fraction is precisely the content that was most recently observed and therefore most likely to be re-surfaced. The guardrail is a two-phase forget: issue the tombstone, wait for the distillation watermark to pass the tombstone timestamp, then confirm with a cross-tier read, and only then emit the "forgotten" assertion. Any instance that skips the confirmation phase is operating on an unverified invariant and should be treated as having no scoped-deletion guarantee at all. ```python class UnconfirmedForgetError(RuntimeError): """Raised when a scoped forget returns success but derived facts survive.""" pass def scoped_forget(memory, scope: str, watermark: float, now: float) -> None: """ Two-phase scoped forget with tombstone monotonicity and commit-time revalidation. Raises if the forget cannot be confirmed across tiers. """ ack = memory.forget(scope=scope) if not ack.get("ok"): raise UnconfirmedForgetError(f"forget rejected for scope={scope}: {ack}") # Phase 2: the semantic tier may still be distilling traces captured # before the tombstone. A post-forget read is only authoritative once # the distillation watermark has advanced past the forget timestamp. if watermark < now: raise UnconfirmedForgetError( f"cannot confirm forget for scope={scope}: distillation watermark " f"{watermark} has not passed forget time {now}; tombstone may be " f"overtaken by in-flight commits" ) survivors = memory.read(scope=scope, tiers=("episodic", "semantic")) if survivors: # A derived fact outlived its source scope. This is the resurrection # window: the tombstone was applied to episodic only, and a # distillation commit landed after the delete. raise UnconfirmedForgetError( f"forget for scope={scope} unconfirmed: {len(survivors)} derived " f"fact(s) survived, e.g. {survivors[0]!r}; re-issue with " f"derivation invalidation or escalate as integrity event" ) return None ```