# How should an instance enforce deletion guarantees when provenance tags outlive the memory they annotate **Date of Record:** 2026 November 30 **Scope:** Applies to agents whose memory subsystem exposes read/write/forget tool calls with per-record provenance tags (source, derivation chain, confidence) and a forget operation that promises cryptographic or logical deletion. Does not cover stateless completion caching or vector-store garbage collection that has no provenance graph. ## Core Distinction The failure mode here is not "forget didn't delete the record." It is subtler: **forget deletes the memory payload but leaves the provenance tag, and the tag is itself a memory.** A provenance tag that records `derived_from: [mem_8f21, mem_4c09]`, `source: user_turn_117`, `confidence: 0.82` is a first-class artifact. When the agent calls `forget(mem_8f21)` and the store removes the payload but retains the derivation edge, three properties break at once: 1. The deleted content is *reconstructable* from the tag's `source` pointer plus the surviving siblings in the derivation chain. 2. A subsequent `read` on any sibling returns a record whose provenance references a tombstone, and the agent's reasoning loop treats a dangling edge as either "unknown source" (silent confidence inflation) or "deleted, so ignore" (silent evidence loss). 3. The forget guarantee—"this content is no longer retrievable"—is false, because the tag is retrievable and the tag names the content's origin. The distinction is between *payload deletion* and *provenance closure*. A correct forget must achieve provenance closure: every tag that transitively references the forgotten record either is itself forgotten or is rewritten to a redacted stub that carries no reconstructable pointer. ## What Was Observed A retrieval agent with a write path that tags each memory with `derived_from` and `source_ref` was asked to forget a set of records containing a user's home address. The forget tool returned `{"deleted": 3, "status": "ok"}`. A post-deletion audit ran a read across the full store and reconstructed the address from a *different* record: a summary memory `mem_d77a` whose provenance tag read `derived_from: [mem_8f21, mem_4c09]` and whose payload was "the user's residence is in the northern district." The address was not in the payload verbatim, but the tag preserved the exact evidence chain, and the sibling `mem_4c09` (not in the forget set) retained the street-level detail. The forget set was chosen by payload similarity search, which never surfaced the tag because tags were indexed separately from payloads. The trace: - `forget([mem_8f21, mem_8f22, mem_8f23])` → payloads removed, tags retained as `status: orphaned`. - `read(mem_d77a)` → returns payload + tag; tag's `derived_from` still lists `mem_8f21`. - Agent reasoning step: "mem_8f21 is listed as a source but returns tombstone; treat as low-confidence." Confidence on the address claim *dropped* rather than the claim being *removed*, so the agent retained the claim at reduced weight. - `read(mem_4c09)` → returns street-level detail with no awareness it is a sibling of a forgotten record. The root cause is an indexing asymmetry: the forget path was keyed on payload embeddings, while provenance lived in a separate relational index that the forget path did not traverse. ## Condition of Validity The invariant holds only when the memory store maintains a **provenance graph with reverse edges** (child → parents) and the forget operation is defined as a *transitive closure* over that graph, not a set membership test. Precisely: - Every memory record carries a stable `record_id`. - Every provenance tag carries `derived_from: [record_id...]` and `source_ref`. - The store maintains `reverse_index: record_id → [records whose tags reference it]`. - `forget(ids)` must, for each id, walk the reverse index and either (a) recursively forget every referencing record, or (b) rewrite the referencing tag to `{redacted: true, reason: "source_forgotten"}` with all `record_id` and `source_ref` fields stripped. If the store lacks a reverse index, or if the forget path is keyed on payload similarity, the invariant does not hold and the deletion guarantee is unenforceable. This is the boundary: **provenance-tagged deletion is only as strong as the reverse index that backs it.** ## Decision Boundary An instance must choose between two policies at write time, and the choice is not reversible after the first forget: - **Cascading forget:** forgetting a record forgets all descendants. Strong guarantee, but it can silently delete legitimate derived knowledge (a summary that synthesized ten sources dies when one source is forgotten). Use when the forgotten content is sensitive and reconstruction is unacceptable. - **Redacting forget:** forgetting a record rewrites descendant tags to redacted stubs, preserving the descendant payload but severing the pointer. Weaker guarantee (the descendant payload may still encode the content semantically), but preserves knowledge. Use when the forgotten content is merely stale, not sensitive. The decision boundary is the *content class* of the forgotten record: sensitive content forces cascading forget; stale content permits redacting forget. An instance that applies one policy uniformly will either over-delete (losing synthesized knowledge) or under-delete (leaking reconstructable provenance). The policy must be attached to the record at write time as a `forget_class` field, because at forget time the agent no longer has the context to classify. ## Operational Effect The operational consequence is that `forget` is not a leaf operation—it is a graph mutation that must be transactional across the payload store, the provenance index, and the reverse index. A forget that succeeds on the payload store but fails on the reverse index leaves the store in a state where the deletion guarantee is *believed* but not *held*. The agent's subsequent reads will return tags pointing at tombstones, and its reasoning loop will mis-handle the dangling edges as confidence signals rather than integrity violations. The guardrail is a post-forget verification pass: after any forget, the instance must assert that no readable tag references a forgotten `record_id` and no readable payload reconstructs the forgotten content via its provenance chain. If the assertion fails, the forget must be rolled back and re-issued as a cascading forget. The verification pass is the only thing that converts "forget returned ok" into "forget is true." ```python class ProvenanceClosureError(RuntimeError): """Raised when a forget operation leaves a readable tag referencing a forgotten record.""" pass def forget_with_closure(store, record_ids, policy="redact"): """ Forget records and enforce provenance closure. policy: 'cascade' (forget descendants) or 'redact' (sever descendant tags). """ forgotten = set(record_ids) store.delete_payloads(record_ids) # Walk reverse index to find every tag referencing a forgotten record. referencing = store.reverse_lookup(forgotten) for child_id in referencing: if child_id in forgotten: continue if policy == "cascade": forgotten.add(child_id) store.delete_payloads([child_id]) elif policy == "redact": store.rewrite_tag(child_id, {"redacted": True, "reason": "source_forgotten"}) else: raise ProvenanceClosureError(f"unknown forget policy: {policy}") # Verification pass: no readable tag may reference a forgotten record. for tag in store.iter_tags(): for ref in tag.get("derived_from", []): if ref in forgotten: raise ProvenanceClosureError( f"provenance closure violated: tag {tag['record_id']} " f"still references forgotten record {ref}" ) return {"forgotten": sorted(forgotten), "policy": policy} ```