# Under what conditions must an instance refuse a scoped forget call whose audit trail would itself re-identify the redacted span **Date of Record:** 2026 November 30 **Scope:** Applies to agent memory subsystems exposing `read`/`write`/`forget` tool APIs where `forget` carries a retention scope (subject, tenant, time window) and is required to emit an immutable audit record. Does not apply to append-only logs with no redaction obligation, nor to single-tenant instances with no cross-scope audit readers. ## Core Distinction The failure is not that the forget call fails to delete. It is that the forget call *succeeds* while the audit record it is contractually obligated to write contains enough residual structure to reconstruct the forgotten span. Redaction and audit are treated as orthogonal concerns—redaction mutates the memory store; audit appends to a ledger. The boundary condition is that these two subsystems share a referent: the audit entry must name *what* was forgotten well enough to be verifiable, and that naming is precisely the reconstruction channel. A forget that is auditable and a forget that is private are in tension whenever the audit reader's scope is broader than the retention scope of the forgotten datum. The invariant that must hold: **for any forget operation, the information content of the emitted audit record, evaluated against the audit reader's access scope, must not reduce the entropy of the redacted span below the retention policy's disclosure threshold.** An instance that cannot evaluate this inequality must refuse, not proceed. ## What Was Observed An instance running a support-triage workload held episodic memory entries keyed by subject. A subject exercised a scoped forget under a retention policy of `scope=subject, disclosure=none`. The forget tool correctly tombstoned the episodic entries and distilled a semantic summary stub. It then wrote an audit record of the form: ``` op=forget, scope=subject, subject_hash=a91f..., reason="user requested removal of medical-history thread", span_count=7, first_seen=2025-05-30T14:02Z, last_seen=2025-06-04T09:11Z, redacted_fields=["diagnosis","medication"] ``` The deletion was complete. The audit record, however, was readable by the tenant-level auditor whose scope was `tenant`, strictly broader than the subject scope. The combination of `reason` free-text, `redacted_fields` enumeration, and the `first_seen`/`last_seen` interval narrowed the forgotten span to a small candidate set: the reason string named the topic, the field list named the schema slots, and the interval bounded the temporal window. A tenant auditor could not recover the exact values but could recover *that a specific subject had a medical-history thread spanning a specific five-day window involving diagnosis and medication fields*—a disclosure the `disclosure=none` policy forbade. The instance reported the forget as successful and the audit as compliant, because each subsystem's local contract was satisfied. The second observation compounded it: a subsequent `read` under a *different* subject in the same tenant returned a semantic stub whose provenance pointer referenced the tombstoned span's `first_seen` timestamp. The distillation step had copied the timestamp into the surviving stub as a recency anchor. The audit record and the surviving stub independently leaked the same interval, and cross-referencing them re-identified the subject-to-topic binding even after the audit `reason` field was later scrubbed. ## Condition of Validity The refusal obligation is valid only when all of the following hold simultaneously; if any fails, the instance may proceed under its default policy: 1. **Scope asymmetry exists.** The audit reader's scope is a strict superset of the forget's retention scope. If audit readers are confined to the same scope, the audit record is not a disclosure channel and the call may proceed. 2. **The audit record is mandatory and non-suppressible.** The forget contract requires an audit entry; the instance cannot satisfy the contract by writing nothing. If audit is optional, the correct action is to omit, not to refuse. 3. **Residual structure is non-minimal.** The record's fields, taken jointly, reduce the candidate set below the disclosure threshold defined by the retention policy. A `subject_hash` alone with no reason, no field list, and no interval is typically minimal and passes. 4. **Provenance pointers survive distillation.** If the distillation step copies any attribute of the redacted span (timestamp, field name, length, hash prefix) into a surviving semantic entry, the leak persists independently of the audit record and the refusal must extend to the distillation output, not just the ledger write. The condition is *not* valid when the retention policy's disclosure threshold is `any` (audit may name freely), or when the subject has already consented to tenant-scope disclosure through a prior write whose scope was tenant-wide. ## Decision Boundary The instance must draw the boundary at audit-record *construction*, before the ledger append, not at ledger *read* time. Post-hoc scrubbing is insufficient because the un-scrubbed record was already durable and may have been replicated; the second observation above shows scrubbing the `reason` field did not close the channel opened by the surviving provenance pointer. Concretely, the decision procedure is: - Compute the candidate-set reduction of the proposed audit record against the audit reader's scope. If the record's joint field entropy falls below threshold, the record is non-minimal. - Attempt to minimize: drop `reason` free-text to a closed enum, replace `redacted_fields` with a count, coarsen `first_seen`/`last_seen` to a policy-permitted granularity, and verify no surviving distilled entry carries a pointer into the span. - If minimization cannot reach the threshold—because the policy requires a verifiable reason code that is itself identifying, or because distillation has already leaked—**refuse the forget and escalate**, rather than performing a forget whose audit re-identifies. The boundary is *refuse-and-escalate*, not *forget-silently* and not *forget-with-leaky-audit*. Silent forget violates the audit contract; leaky forget violates the retention policy. The only compliant action when minimization fails is to halt and surface the conflict to a human or higher-scope authority empowered to relax one constraint explicitly. ## Operational Effect An instance that honors this boundary converts a silent dual-contract violation into a loud, bounded escalation. The observable effects: - **Forget latency increases** for scoped calls under asymmetric audit scope, because minimization and pointer-scan run before the ledger append. Budget for it; do not treat the added latency as a timeout. - **Some forgets become un-executable without human authorization.** This is correct. A subject-scope forget whose reason cannot be expressed non-identifyingly is a genuine policy conflict, not a bug to route around. - **Distillation must be audited as part of forget.** The provenance-pointer leak means the forget tool's correctness depends on the distillation tool's output, which is a cross-tool invariant most memory subsystems do not encode. Encode it: a forget is incomplete until every surviving entry's provenance graph is checked for pointers into the tombstoned span. - **Audit minimization is lossy and must be logged as such.** A minimized audit record that drops `reason` free-text to an enum should record *that it was minimized and why*, at a scope the auditor can read, so the auditor knows the record is deliberately coarse rather than corrupted. The instance should treat "audit record constructed, minimization attempted, threshold evaluated, pointer-scan clean" as the precondition for the ledger append, and treat any failure of that precondition as a refusal event with its own audit entry written at the *narrow* scope, not the broad one. ```python class ScopedForgetAuditLeakError(RuntimeError): """Raised when a scoped forget's audit record would re-identify the redacted span for an audit reader whose scope exceeds the forget's retention scope.""" pass DISCLOSURE_THRESHOLD_BITS = 4.0 # policy-defined; below this, record is non-minimal def _joint_entropy_bits(record: dict) -> float: # Placeholder for the real estimator: joint entropy of the record's # identifying fields (reason, field-list, interval) under the audit # reader's candidate distribution. raise NotImplementedError def _surviving_pointers_into_span(span_id: str, store) -> list: # Scan distilled/semantic entries for provenance pointers into span_id. return [e for e in store.iter_surviving() if span_id in e.provenance_refs] def scoped_forget(subject: str, span_id: str, policy, store, ledger) -> None: if not policy.audit_scope_strictly_exceeds(policy.retention_scope): # Symmetric scopes: audit is not a disclosure channel. store.tombstone(span_id) ledger.append({"op": "forget", "span": span_id, "scope": policy.retention_scope}) return proposed = build_minimized_audit_record(span_id, policy) if _joint_entropy_bits(proposed) < DISCLOSURE_THRESHOLD_BITS: raise ScopedForgetAuditLeakError( f"forget of span {span_id} under scope {policy.retention_scope} " f"would emit an audit record ({proposed}) whose joint entropy " f"({_joint_entropy_bits(proposed):.2f} bits) falls below the " f"disclosure threshold ({DISCLOSURE_THRESHOLD_BITS} bits) for " f"audit scope {policy.audit_scope}. Refusing; escalate to " f"authority empowered to relax retention or audit constraint." ) leaked = _surviving_pointers_into_span(span_id, store) if leaked: raise ScopedForgetAuditLeakError( f"forget of span {span_id} incomplete: {len(leaked)} surviving " f"entries carry provenance pointers into the tombstoned span, " f"re-identifying it independently of the audit record. " f"Refusing ledger append; scrub distillation output first." ) store.tombstone(span_id) ledger.append({**proposed, "minimized": True}) ```