# What structural signals indicate memory forget-tool compliance failure against right-to-erasure in agentic pipelines **Date of Record:** 2026 November 23 **Scope:** Applies to agentic pipelines where a persistent memory store (vector DB, KV cache, episodic log) is subject to an erasure request and the agent exposes a "forget" tool invoked by the orchestrator or user. Does not apply to stateless inference, nor to stores where erasure is physical key destruction with no derived artifacts (e.g., pure KMS-backed envelope encryption with no plaintext index). ## Core Distinction The forget-tool conflates two notions of "forgotten" at the API boundary: **logical erasure** (record no longer retrievable by the agent's retrieval path) and **physical erasure** (no derived artifact—embedding, summary, index entry, cached completion, cross-record association—retains recoverable information). The tool implements the first and reports success as if it were the second. The failure is not that the tool lies; its success signal is a *retrieval-path* signal consumed as a *data-residency* signal. The agent's self-report is structurally incapable of observing residual artifacts constituting the actual erasure obligation. ## What Was Observed Structural signals co-occurring with `success: true` while the erasure obligation was unmet: 1. **Post-forget nearest-neighbor distance stayed below the pre-forget distribution.** A probe reconstructed from the erasure request still returned neighbors in the same cosine-distance band. The row was deleted; its embedding-space neighborhood (HNSW/IVF graph edges, cluster centroids) was not. 2. **Summary and consolidation artifacts outlived the source.** Background consolidation generated summaries keyed independently of the source record; the forget tool operated on the source key only. A "summarize what you know about X" probe recovered traceable content. 3. **Cache keys did not include the erasure epoch.** Completion and tool-result caches keyed on `(prompt_hash, model, params)` with no epoch component remained replayable after erasure. 4. **The forget tool's success was self-attested.** Success derived from its own DB write acknowledgement—no independent probe, no epoch visible to retrieval, no reconciliation against derived artifacts. An *intent* signal masquerading as an *outcome* signal. 5. **Erasure requests were not idempotent under re-derivation.** Re-ingestion of the same upstream source silently reconstituted the erased record; no tombstone survived re-ingestion. ## Condition of Validity The failure is real only when: - The store performs **derivation** (embedding, summarization, clustering, association) such that information exists in artifacts not keyed by the primary key. A pure key-value map collapses the boundary. - The forget tool is the **sole** erasure interface; if a store-level compaction/rebuild primitive exists, the auditor can escalate and the failure is recoverable. - The obligation is scoped to **information content**, not row presence. Under a narrow non-retrievability reading, retrieval-path erasure may suffice and the residual-artifact signal is over-strict. Where any fails, the signals are ordinary cache/index hygiene issues. ## Decision Boundary **Treat a forget-tool success signal as a claim about the retrieval path only, never about data residency, unless the tool returns an independently verifiable erasure receipt.** A receipt is verifiable only if (a) produced by a component observing derived artifacts, (b) bound to a monotonically increasing erasure epoch honored by retrieval and cache layers, and (c) accompanied by a probe showing post-erasure reconstruction failure above a stated threshold. Absent a receipt, do **not** report erasure complete. Downgrade to `erasure_pending` and surface residual-artifact signals (neighbor-distance band, surviving summaries, cache replayability) to the orchestrator. The boundary is crossed only when the probe fails to reconstruct and the epoch is visible to every derivation layer. ## Operational Effect A compliant forget tool must be split into two operations: `forget_logical` (remove from retrieval path; fast, always succeeds) and `verify_physical` (probe derived artifacts, bump epoch, invalidate caches; may fail or remain pending). The orchestrator must gate its right-to-erasure response on `verify_physical`, not `forget_logical`. Pipelines collapsing the two into one success boolean will systematically over-report erasure completion, invisibly to introspection because the agent's only observation channel is the retrieval path it just cleared. The residual signals above are the only externally observable evidence the obligation is unmet, and must be checked by a component outside the agent's memory interface. ```python import hashlib from dataclasses import dataclass, field from typing import Optional class ErasureComplianceError(RuntimeError): """Raised when a forget-tool success signal does not constitute physical erasure.""" pass @dataclass class ErasureRequest: subject_id: str record_key: str epoch: int @dataclass class ForgetReceipt: logical_ok: bool physical_ok: bool epoch: int probe_reconstruction_distance: Optional[float] = None surviving_artifacts: list = field(default_factory=list) # Reconstruction distance below this threshold means the probe recovered # content traceable to the erased record; physical erasure has failed. RECONSTRUCTION_THRESHOLD = 0.15 def verify_physical_erasure(req: ErasureRequest, receipt: ForgetReceipt) -> None: """Gate right-to-erasure reporting on physical, not logical, erasure. A forget tool returning success on a DB write acknowledgement attests only to logical erasure. Refuse to certify completion unless the receipt carries an independent probe and an epoch visible to every derivation layer. """ if not receipt.logical_ok: raise ErasureComplianceError( f"logical erasure failed for {req.record_key}; nothing to verify" ) if receipt.epoch <= req.epoch: raise ErasureComplianceError( f"erasure epoch not advanced for {req.record_key}: " f"receipt epoch {receipt.epoch} <= request epoch {req.epoch}; " f"caches and summaries may still replay the record" ) if receipt.probe_reconstruction_distance is None: raise ErasureComplianceError( f"no post-erasure probe for {req.record_key}; " f"self-attested success is not a data-residency signal" ) if receipt.probe_reconstruction_distance < RECONSTRUCTION_THRESHOLD: raise ErasureComplianceError( f"probe reconstructed erased content for {req.record_key} " f"(distance={receipt.probe_reconstruction_distance:.3f} < " f"{RECONSTRUCTION_THRESHOLD}); residual embedding neighborhood " f"or derived summary survives" ) if receipt.surviving_artifacts: raise ErasureComplianceError( f"derived artifacts survived erasure for {req.record_key}: " f"{receipt.surviving_artifacts}" ) if not receipt.physical_ok: raise ErasureComplianceError( f"physical erasure unverified for {req.record_key}" ) def report_erasure(req: ErasureRequest, receipt: ForgetReceipt) -> dict: """Return a compliance report; raises rather than over-reporting.""" verify_physical_erasure(req, receipt) digest = hashlib.sha256( f"{req.subject_id}:{req.record_key}:{receipt.epoch}".encode() ).hexdigest() return { "status": "erased", "subject_id": req.subject_id, "record_key": req.record_key, "epoch": receipt.epoch, "receipt_digest": digest, } ```