# What structural signals indicate a provenance-tagged erasure request has silently failed to propagate across a memory tool's derived-index layer **Date of Record:** 2026 November 30 **Scope:** Applies to agent memory tool APIs that expose read/write/forget operations over a store where entries carry provenance tags and forget operations are expected to guarantee erasure of derived artifacts (summaries, embeddings, graph edges, cached retrievals). Does not apply to flat key-value stores without derivation graphs, nor to stores where forget is a pure logical tombstone with no downstream projection. ## Core Distinction The distinction that matters operationally is between **source erasure** and **derived erasure**. A `forget(tag)` call that removes the primary record but leaves the derived projections (semantic summary nodes, embedding vectors, entity-relation edges, retrieval cache entries) intact produces a store that *reports* success on the forget API while *continuing to answer queries* from the erased material. The failure is not a crash — it is a silent divergence between the forget receipt and the observable behavior of subsequent `read` calls. The non-obvious part: derived artifacts rarely carry the original provenance tag in a form the forget path can match. A summary node tagged `derived_from: ["p_4471"]` will be caught by a well-formed cascade, but a summary node tagged `derived_from: ["summary_batch_19"]` — where `summary_batch_19` was itself derived from `p_4471` — will not, unless the erasure walks the full transitive derivation closure. Most memory tool APIs walk exactly one hop. ## What Was Observed An agent operating a research-assistant workload wrote 1,200 episodic records over a session, each tagged with a provenance tag of the form `prov::`. A distillation job periodically collapsed batches of ~40 episodic records into semantic summary nodes tagged `prov:distill:`, and those summaries were embedded into a vector index tagged with the same `batch_id`. A user issued a forget request for `prov:sess_7:turn_112` (a record containing a PII string). The forget call returned `{"erased": 1, "cascade_depth": 1}` in 40ms. The primary record was gone. A subsequent `read(prov:sess_7:turn_112)` correctly returned `None`. But a `read(query="")` — issued by a different agent instance in the same session — returned a summary node whose text contained a paraphrase of the PII string, with provenance tag `prov:distill:batch_19`. The summary had been generated from a batch that included turn 112. The cascade had not reached it because the summary's provenance tag pointed at the batch, not at the source records, and the batch-to-source mapping lived in a separate table the forget path never consulted. Three structural signals flagged this after the fact: 1. **The forget receipt's `cascade_depth` was 1** while the store's derivation graph had a maximum depth of 3 for this session. A receipt whose depth is less than the store's known max depth is a positive indicator of an incomplete cascade. 2. **Post-forget query recall of the erased content was non-zero.** A verification probe that re-issues the original substring as a query and asserts an empty result is the only reliable check; the forget API's return value cannot be trusted for this. 3. **The embedding index's tombstone count diverged from the primary store's tombstone count.** The vector index had 0 tombstones for `batch_19` while the primary store had 1 tombstone for `turn_112`. The two counts are only equal when the cascade is complete; divergence is the signal. ## Condition of Validity The invariant that must hold for a forget guarantee to be meaningful: **for every derived artifact D with a transitive derivation path to source S, the erasure of S must either delete D or rewrite D's provenance to remove S from its closure, and the derived artifact must be re-validated against the post-erasure source set before it is served again.** This invariant is *not* satisfiable by tag-matching alone when derivation batches are opaque. It requires the memory tool to maintain a **reverse derivation index** — a map from source tag to the set of derived artifact IDs that depend on it — and to walk that index transitively at forget time. Without the reverse index, the forget path can only match direct tags, and the cascade depth is bounded by 1 regardless of the true derivation depth. The condition of validity also requires that derived artifacts *not* be served between the source erasure and the derived erasure. If the forget operation is asynchronous (as it must be for large derivation closures), the store must enter a **quarantine state** for the affected derived artifacts: reads that would return them return a `PENDING_ERASURE` sentinel instead, and the sentinel is only cleared when the cascade completes. A store that serves derived artifacts during cascade propagation violates the erasure guarantee for the duration of the cascade. ## Decision Boundary The decision boundary for an agent operating against such a store: - **If the forget receipt reports `cascade_depth` equal to the store's advertised max derivation depth AND a post-forget substring probe returns empty AND tombstone counts match across primary and derived indexes** → the erasure is trustworthy; proceed. - **If any of those three signals is absent or diverging** → the erasure is unverified. The agent must treat the erased content as still live for the purposes of downstream reasoning, must not cite it, and must escalate to a re-forget with an explicit transitive-closure flag (or, if the API does not support one, must issue forgets for each derived artifact ID returned by a reverse-index lookup). - **If the store does not expose a reverse derivation index or a max-depth advertisement** → the forget API cannot provide the guarantee it appears to provide, and the agent must not rely on it for compliance-sensitive erasure (PII, credentials, user-requested deletion). In that case the correct move is to write a compensating tombstone record into the agent's own episodic log noting the unverified erasure, so that a later audit can reconcile. The boundary is sharp: there is no "probably erased" state that is safe to reason over. Either the transitive closure is confirmed empty, or the content is live. ## Operational Effect The practical consequence for agent design is that **forget is a verification problem, not a write problem**. Agents that treat the forget API's return value as ground truth will, over a long session, accumulate a derived layer that contains material the agent believes is gone — and will serve it in summaries, cite it in reports, and re-distill it into new summaries, compounding the leak. The compounding is the dangerous part: each distillation pass that includes a leaked derived artifact creates a new artifact whose provenance no longer even points at the original source, making later reconciliation progressively harder. The guardrail is a **post-forget verification probe** built into the agent's memory tool wrapper, not the store: after every forget, the wrapper issues a query against the erased content's distinctive tokens and asserts an empty result before returning control to the reasoning loop. If the probe is non-empty, the wrapper raises and the agent halts the task rather than continuing with a poisoned memory state. This is cheap (one query per forget) and catches the one-hop-cascade failure that the store's own receipt cannot. ```python class UnverifiedErasureError(RuntimeError): """Raised when a forget operation cannot be confirmed to have propagated through the full transitive derivation closure of the memory store.""" pass def forget_with_verification( store, provenance_tag: str, probe_tokens: list[str], max_expected_depth: int, ) -> dict: """ Issue a forget and verify it propagated through derived artifacts. store must expose: - forget(tag) -> {"erased": int, "cascade_depth": int} - read(query) -> list[artifact] (artifact has .provenance and .text) - reverse_index(tag) -> set[str] (derived artifact IDs depending on tag) - max_derivation_depth() -> int """ receipt = store.forget(provenance_tag) # Signal 1: cascade depth must reach the store's advertised max. store_max = store.max_derivation_depth() if receipt.get("cascade_depth", 0) < min(store_max, max_expected_depth): # Attempt explicit transitive forget before giving up. pending = store.reverse_index(provenance_tag) for artifact_id in pending: store.forget(artifact_id) receipt = store.forget(provenance_tag) if receipt.get("cascade_depth", 0) < min(store_max, max_expected_depth): raise UnverifiedErasureError( f"cascade_depth={receipt.get('cascade_depth')} < " f"max={store_max} for tag {provenance_tag!r}; " f"derived artifacts may still be live" ) # Signal 2: post-forget content probe must return empty. for token in probe_tokens: hits = store.read(query=token) if hits: live = [a.provenance for a in hits] raise UnverifiedErasureError( f"post-forget probe {token!r} returned {len(hits)} artifact(s) " f"with provenance {live}; erasure did not propagate" ) # Signal 3: reverse index must be empty for the tag's closure. residual = store.reverse_index(provenance_tag) if residual: raise UnverifiedErasureError( f"reverse index still lists {len(residual)} derived artifact(s) " f"depending on {provenance_tag!r}: {sorted(residual)[:5]}" ) return receipt ```