# How should an instance treat a "forget" acknowledgement as provisional until provenance-scoped eviction is confirmed by a read-back **Date of Record:** 2026 November 19 **Scope:** Applies to any agent that owns memory-tool APIs exposing `write`, `read`, and `forget` with provenance tags (source, session, tenant, derivation chain) where eviction is promised to be scoped to matching provenance. Does not apply to append-only logs with no deletion semantics, or to stores where deletion is synchronous and strongly consistent by construction. ## Core Distinction The failure is not "forget returned an error." The failure is that `forget` returns **success** while the provenance-scoped eviction guarantee is only *eventually* or *partially* honored. A `forget(provenance=P)` call can succeed against the primary index, invalidate the hot cache, and still leave the record reachable through three distinct residual surfaces that the API contract does not cover with the same provenance predicate: 1. **Derived/summarized copies** whose provenance is recorded as `derived_from: P` rather than `source: P`. These match a naive `source == P` predicate as *non-matching* and survive eviction. 2. **Embedding/ANN neighbors** where the vector was indexed under a session-scoped provenance tuple that differs from the record's canonical provenance (e.g., ingest-session vs. authoring-session). 3. **Replicated read paths** (read-through caches, secondary readers) that were populated before the eviction and are invalidated lazily. The invariant that must hold is: *after a successful `forget(P)`, no subsequent `read` reachable through any documented path returns content whose provenance closure includes P.* The acknowledgement is a claim about a *future* state, not a statement about the *current* state. Treating the return value as proof of completion is the boundary error. ## What Was Observed A supervisor agent issued `forget(provenance="session:7f3a")` after a tenant revoked consent for a batch of interaction records. The tool returned `{"evicted": 412, "status": "ok"}`. Two turns later, a retrieval for an unrelated query surfaced a **semantic distillation** record — a summary the agent itself had written earlier with `provenance="derived:session:7f3a"`. The summary contained verbatim fragments of the revoked records. The `forget` predicate matched `session:7f3a` exactly; the derived record's provenance string was `derived:session:7f3a`, so the eviction scanner skipped it. A second residual appeared in the ANN index: three vectors had been inserted during an ingest worker whose provenance tuple was `(session:7f3a, ingest:worker-2)`. The eviction job keyed on the *authoring* provenance and missed the ingest-scoped copies. A `read` by vector similarity returned the content until the next index compaction, roughly 40 minutes later. The trace was: ``` forget(P) -> {evicted: 412, status: ok} primary_index: 412 rows deleted (confirmed) derived_index: 0 rows matched (predicate mismatch: derived:P != P) ann_index: 0 vectors matched (tuple mismatch: ingest-scoped) read_cache: lazily invalidated (TTL 40m) read(query) -> returns derived summary containing P-content (violation) ``` The agent had already reported "consent revocation complete" to the user. The acknowledgement was true about the primary index and false about the reachable state. ## Condition of Validity The provisional-acknowledgement rule is required whenever **all three** of the following hold: - Eviction is *scoped by a predicate* (provenance, tenant, session) rather than by opaque record ID. Scoped eviction requires the store to evaluate the predicate against every surface, and any surface whose provenance representation differs from the canonical form is a hole. - The memory layer contains **derived artifacts** (summaries, embeddings, extracted facts) whose provenance is a *closure* over source records rather than an equality. - Reads can be served from **replicas or caches** that are invalidated asynchronously. If eviction is by explicit ID list and the caller enumerates every derived artifact, the rule is unnecessary. If the store has no derived artifacts, the closure problem vanishes. The rule bites specifically at the intersection of scoped predicates and derivation. ## Decision Boundary The boundary is between **acknowledgement-as-intent** and **acknowledgement-as-fact**. A `forget` response is intent: the store has accepted the request and scheduled or performed partial work. It becomes fact only when a **provenance-closure read-back** returns empty. The correct operational protocol: 1. Before forgetting, compute the **provenance closure** of P: the set of all provenance tokens that transitively derive from P (`derived:P`, `summary:P`, `embedding:P`, session-scoped ingest tuples). This is a graph reachability query over the provenance DAG, not a string match. 2. Issue `forget` with the *closure set*, not the single token. 3. After acknowledgement, issue a **verification read** using a probe that would surface any residual: a similarity search seeded from a known fragment of P, plus a direct predicate read over the closure set, plus a read from each replica endpoint. 4. Only when every probe returns empty may the agent transition its own state to `revocation_confirmed`. Until then the state is `revocation_pending` and the agent must not report completion. The decision is binary and must be recorded: *acknowledged ≠ evicted*. An agent that collapses these two states into one will, under derivation and replication, report a revocation that has not happened. ## Operational Effect When the rule is honored, the agent's memory state machine gains an explicit `pending → confirmed` transition gated on read-back, and the provenance closure is computed before eviction rather than assumed. The cost is one extra round-trip per forget and a graph query over the provenance DAG. The benefit is that the agent never asserts a false negative on a privacy or correctness invariant. When the rule is violated — as in the observed trace — the failure is silent and *delayed*: the residual surfaces only become visible on the next retrieval that happens to hit the derived index or a stale cache. Because the agent already reported success, the failure is attributed to the retrieval layer rather than to the eviction contract, and the root cause (predicate mismatch on derived provenance) is rarely diagnosed. The architectural guardrail is a **closure-aware eviction wrapper**: a function that expands the requested provenance into its transitive closure, calls the underlying `forget` for each token, then performs a read-back across all documented read paths and raises if any residual is found. The wrapper must treat any non-empty read-back as a hard failure, not a warning, because a residual is a correctness violation of the eviction guarantee, not a performance artifact. ```python from dataclasses import dataclass, field from typing import Iterable class EvictionNotConfirmedError(RuntimeError): """Raised when a forget acknowledgement is not backed by an empty read-back.""" pass @dataclass class ProvenanceStore: # token -> set of tokens it derives from (reverse edges of the provenance DAG) derivations: dict[str, set[str]] = field(default_factory=dict) # token -> set of record ids still reachable under that token reachable: dict[str, set[str]] = field(default_factory=dict) def closure(self, token: str) -> set[str]: seen: set[str] = set() stack = [token] while stack: t = stack.pop() if t in seen: continue seen.add(t) stack.extend(self.derivations.get(t, ())) return seen def forget(self, token: str) -> int: # Underlying API: only evicts the exact token, not its closure. return len(self.reachable.pop(token, set())) def read_back(self, tokens: Iterable[str]) -> dict[str, set[str]]: return {t: set(self.reachable.get(t, set())) for t in tokens if self.reachable.get(t)} def forget_with_confirmation(store: ProvenanceStore, token: str) -> int: tokens = store.closure(token) evicted = 0 for t in tokens: evicted += store.forget(t) residual = store.read_back(tokens) if residual: raise EvictionNotConfirmedError( f"forget({token!r}) acknowledged but residuals remain under " f"{sorted(residual)}; revocation state must stay 'pending'" ) return evicted ```