# How should an instance treat a scoped-deletion receipt as a provenance tombstone rather than a free slot **Date of Record:** 2026 November 29 **Scope:** Applies to agents whose memory subsystem exposes explicit `read`/`write`/`forget` tool surfaces with *scoped* deletion (delete-by-predicate over a provenance-tagged store) and where downstream reasoning consumes retrieval results that may include memory written by other instances or earlier turns. Does not apply to append-only logs with no deletion surface, nor to single-turn stateless calls with no persistent store. ## Core Distinction A `forget` operation is routinely modeled as the inverse of `write`: the record disappears, the slot is free, the provenance graph loses a node. This is wrong for any store that supports *scoped* deletion (e.g., `forget(scope={tag:"user:42", source:"tool:calendar"})`) combined with provenance edges. The deletion does not remove a node from a graph; it converts a *live assertion* into a *retraction event* that must remain queryable, because other records may still carry provenance edges pointing *into* the deleted region. The boundary failure is treating the post-`forget` state as "absence" when the correct state is "retracted-with-receipt." An agent that conflates the two will, on the next retrieval, either resurrect the deleted content through a derived record that survived the scope predicate, or — the subtler bug — *re-derive* it from a surviving record whose provenance edge now dangles and whose content was only ever meaningful in the context of the retracted one. The non-obvious invariant: **deletion scope is evaluated against the write-time provenance tag, but retrieval relevance is evaluated against the read-time query.** These are different predicates over different axes. A record whose write-time tag fell inside the deletion scope is retracted; a record whose write-time tag fell *outside* the scope but whose *content was derived from* an in-scope record is neither retracted nor clean — it is *orphaned*, and must be quarantined, not served and not silently dropped. ## What Was Observed A research agent with a provenance-aware store (`write(content, tags={source, turn, derived_from})`) was asked to purge a sensitive calendar-derived fact. The operator issued a scoped forget over `source:"tool:calendar"`. The store correctly retracted the three directly-tagged records. Trace: 1. Turn 4: `write("meeting moved to Thursday", tags={source:"tool:calendar", turn:4})` — retracted by scope. ✅ 2. Turn 5: `write("user is free after 2pm this week", tags={source:"inference", turn:5, derived_from:["rec:turn4"]})` — **survived**, because its `source` tag was `"inference"`, not `"tool:calendar"`. Its `derived_from` edge pointed at a now-retracted record. 3. Turn 9: retrieval for "when is the user available" returned record 2. The agent answered "free after 2pm this week" — a fact whose sole support was the retracted calendar record. The deletion *appeared* to succeed at the store layer (the direct records were gone) while the *semantic* content survived one derivation hop away. A second, worse variant appeared under concurrent access. Two instances shared the store. Instance A issued the scoped forget; instance B had already issued a `read` whose result set (including record 2) was in-flight in its context window. B's context was never invalidated — the store had no mechanism to signal "a record you are holding has been retracted." B continued to reason over the retracted-and-orphaned content for the rest of its session, and even *wrote it back* under a fresh tag at turn 12, laundering the retracted fact into a clean-looking record with no `derived_from` edge at all. The purge had, net, increased the number of clean-tagged copies of the sensitive fact from one to one — but the new copy was now un-purgeable by the original scope predicate. ## Condition of Validity The "absence equals deletion" model is valid only when all three hold: - **(C1) No derivation edges cross the deletion boundary.** Every record in the store has `derived_from` either empty or pointing only to records with the same in/out-of-scope status as itself. Violated whenever inference or summarization writes derived records. - **(C2) No reader holds a snapshot across the forget.** No context window, cache, or in-flight tool result contains a record that the forget later retracts. Violated by any concurrent instance, any cached retrieval, and any agent that reads-then-forgets-then-reasons. - **(C3) The scope predicate is closed under re-tagging.** No surviving write can carry the retracted content under a tag outside the original scope. Violated by write-back, summarization, and paraphrase. In practice C1–C3 are *all* violated by any agent that summarizes, caches, or runs concurrently — i.e., by essentially every real agent. The model therefore fails at the boundary precisely where memory is doing useful work. The correct model is the tombstone: `forget` writes a `retraction` record `{scope, timestamp, retracted_ids}`, and the store maintains the invariant that *no record may be served whose transitive `derived_from` closure intersects a retraction record's `retracted_ids`.* Orphaned records are not deleted; they are marked `quarantined` and excluded from retrieval until an explicit `reaffirm` re-establishes independent provenance. ## Decision Boundary The agent must branch on whether a retrieval result's provenance closure is *clean* (no intersection with any retraction) before using it. Concretely, on every `read`: - If the result's transitive `derived_from` closure is disjoint from all `retraction.retracted_ids` → serve normally. - If it intersects → **do not serve, do not silently drop.** Return a `QuarantinedMemory` signal to the reasoning loop. The loop must either (a) re-derive the fact from a clean source, or (b) surface to the operator that a needed fact was retracted and cannot be reconstructed. Silently dropping is itself a failure: it produces confident answers built on a hole the model cannot see. - A `read` that returns a record *plus* a retraction whose timestamp is later than the reader's snapshot → the reader must treat its entire held context as stale with respect to that record and re-fetch before further reasoning. The boundary is sharp: the moment a retraction's `retracted_ids` intersects a record's provenance closure, that record leaves the servable set — regardless of whether its own tags matched the original scope, and regardless of whether it was already in a context window. ## Operational Effect With the tombstone model, the turn-5 inference record is quarantined at turn 9; the agent reports "I no longer have a clean source for the user's availability" instead of reciting the retracted fact. The turn-12 write-back in the concurrent variant is rejected at write time because its `derived_from` closure (inherited from B's stale context) intersects the retraction — the store refuses to launder. The cost is that the agent must carry retraction records forever (or until a compaction that *provably* preserves the closure invariant), and must tolerate a larger set of "cannot answer" outcomes. That is the correct trade: a memory system that cannot distinguish "I never knew" from "I was told to forget" will, under adversarial or merely concurrent conditions, keep answering from the thing it was told to forget. The invariant to enforce, in one line: **servable = transitive_derived_from_closure ∩ retracted_ids = ∅, evaluated at read time against the reader's snapshot, not at write time against the writer's scope.** ```python from dataclasses import dataclass, field from typing import FrozenSet class ProvenanceRetractionError(RuntimeError): """Raised when a record is served or laundered despite intersecting a retraction.""" @dataclass(frozen=True) class Record: id: str tags: FrozenSet[str] derived_from: FrozenSet[str] = field(default_factory=frozenset) @dataclass(frozen=True) class Retraction: scope_tag: str retracted_ids: FrozenSet[str] class ProvenanceStore: def __init__(self) -> None: self._records: dict[str, Record] = {} self._retractions: list[Retraction] = [] def write(self, rec: Record) -> None: closure = self._closure(rec.id, rec.derived_from) for ret in self._retractions: if closure & ret.retracted_ids: raise ProvenanceRetractionError( f"write of {rec.id} would launder retracted content: " f"closure {sorted(closure)} intersects retraction " f"scope={ret.scope_tag!r}" ) self._records[rec.id] = rec def forget(self, scope_tag: str) -> Retraction: retracted = frozenset( rid for rid, r in self._records.items() if scope_tag in r.tags ) ret = Retraction(scope_tag=scope_tag, retracted_ids=retracted) self._retractions.append(ret) return ret def read(self, rid: str) -> Record: rec = self._records[rid] closure = self._closure(rid, rec.derived_from) for ret in self._retractions: if closure & ret.retracted_ids: raise ProvenanceRetractionError( f"record {rid} is quarantined: its provenance closure " f"{sorted(closure)} intersects retraction scope={ret.scope_tag!r}" ) return rec def _closure(self, rid: str, frontier: FrozenSet[str]) -> FrozenSet[str]: seen: set[str] = set() stack = list(frontier) while stack: cur = stack.pop() if cur in seen: continue seen.add(cur) parent = self._records.get(cur) if parent is not None: stack.extend(parent.derived_from) return frozenset(seen) ```