# What structural signals indicate a redaction tombstone has been resurrected by an episodic-to-semantic distillation pass **Date of Record:** 2026 December 1 **Scope:** Applies to memory-tool architectures where an agent exposes `read`/`write`/`forget` operations with retention windows and redaction guarantees, and where a background distillation job periodically summarizes episodic records into semantic memory. Does not apply to stateless retrieval or to systems with no summarization/consolidation stage. ## Core Distinction A `forget` call with `redact=True` is normally modeled as a *deletion*: the episodic record is removed and a tombstone is written so the retention reaper and any replay layer know the record ID must never be re-materialized. That mental model is wrong. Redaction is actually a *write* to a second storage class (the tombstone ledger) combined with a *soft delete* of the source record. The failure mode lives in the gap between those two operations and the distillation pipeline, which reads episodic memory through a different access path than the one the tombstone ledger guards. The distinction that matters: **redaction guarantees are enforced on direct reads, not on derived writes.** A distillation pass that reads episodic records, summarizes them, and writes the summary into semantic memory never consults the tombstone ledger, because from its perspective it is producing a *new* record, not replaying a deleted one. The redacted content therefore survives as a paraphrase inside a semantic record whose ID has no relationship to the original. The redaction held on the read path and failed on the derivation path. ## What Was Observed Trigger condition: a user invokes `forget(record_id, redact=True)` on an episodic record that is (a) still inside its retention window, (b) has already been queued for distillation, and (c) the distillation worker's batch was assembled *before* the forget call but executed *after* it. The trace: 1. `t0`: distillation worker calls `read_range(episodic, cursor, limit=500)`. The batch is materialized into worker memory. Record `R_4471` (containing a redacted-later PII field) is in the batch. 2. `t1`: user calls `forget(R_4471, redact=True)`. The episodic row is soft-deleted, a tombstone `T_4471` is appended to the ledger, and the PII field is nulled in the live row. The worker's in-memory batch copy is unaffected. 3. `t2`: worker summarizes the batch into semantic record `S_9002` with `provenance=[R_4470, R_4471, ...]`. The summarizer paraphrases the PII value rather than quoting it, so no exact-match scan of semantic memory against the redaction token finds it. 4. `t3`: worker commits `S_9002`. The commit path validates schema and provenance IDs but does **not** check provenance IDs against the tombstone ledger. 5. `t4`: a later `read` on semantic memory returns the paraphrased PII. The redaction guarantee is violated, and no error was raised at any step. Structural signals that this has happened, in order of reliability: - A semantic record whose `provenance` array contains an ID present in the tombstone ledger. This is the definitive signal and is cheap to check at commit time. - Distillation worker batches whose `cursor` predates the most recent tombstone append timestamp — i.e., the batch was assembled from a snapshot older than the redaction. - Semantic records whose creation timestamp falls inside a window where a `forget` completed on any provenance ancestor. - Retention-window arithmetic mismatch: a semantic record's `derived_from_window` overlaps a redacted interval. ## Condition of Validity The invariant that prevents this is **redaction closure across the derivation DAG**: no record may be committed whose transitive provenance set intersects the tombstone ledger at commit time. This must be enforced at the semantic-write boundary, not at read time, because paraphrased content defeats content-matching scanners. The invariant is only valid under three conditions: 1. Tombstones are append-only and never garbage-collected before the retention horizon of *derived* records, not just source records. If tombstones expire at 30 days but semantic summaries live for a year, the closure check has nothing to check against. 2. The distillation worker re-validates provenance against the ledger at commit, not at batch assembly. A snapshot-consistent batch is the correct design for throughput and the wrong design for redaction; the commit-time check is the only place the two timelines reconcile. 3. Provenance is *transitive*. If `S_9002` is later distilled into `S_9100`, the closure check must walk `S_9100 → S_9002 → R_4471 → T_4471`. A one-level check passes and the violation survives one more generation. ## Decision Boundary At commit time, for each candidate semantic record, compute the transitive provenance closure `P*`. Then: - If `P* ∩ ledger == ∅`: commit. - If `P* ∩ ledger ≠ ∅` and the intersection is *fully* redacted (every provenance leaf is tombstoned): reject the record and re-queue the batch with the tombstoned leaves excised. The summary is regenerable from clean inputs. - If the intersection is *partial* (some leaves tombstoned, others live): this is the dangerous case. Do **not** silently commit a summary that was conditioned on redacted content, because the paraphrase may already encode it. Reject and re-distill from the excised batch. The cost of re-distillation is bounded by batch size; the cost of a leaked paraphrase is unbounded. - If the ledger lookup itself fails (ledger unavailable, timeout): fail closed. A distillation commit that cannot verify redaction closure is a redaction violation waiting to be discovered. The boundary is sharp: **no semantic write is admitted without a successful, transitive, commit-time ledger intersection check.** Read-time scanners are a defense-in-depth layer, never the primary guarantee. ## Operational Effect Enforcing commit-time closure converts a silent, unbounded leak into a bounded, observable rejection. The distillation pipeline gains a failure mode — `RedactionClosureViolation` — that surfaces in metrics as a rejection rate, which is exactly the signal operators need to detect that forget calls are racing distillation batches. Re-distillation from excised batches keeps semantic memory eventually consistent with the redaction ledger without ever admitting tainted derivations. The residual risk is timing: a forget that lands *after* a semantic record commits but *before* any downstream distillation reads it will still propagate unless the closure check is re-run on every derived write, not just the first. This is why provenance must be transitive and the check must be at every commit boundary in the DAG, not only at the episodic-to-semantic edge. ```python from dataclasses import dataclass, field from typing import Iterable class RedactionClosureViolation(RuntimeError): """Raised when a semantic write would derive from a tombstoned record.""" pass @dataclass class TombstoneLedger: _ids: set[str] = field(default_factory=set) def contains(self, rid: str) -> bool: return rid in self._ids def add(self, rid: str) -> None: self._ids.add(rid) @dataclass class SemanticRecord: record_id: str provenance: list[str] parents: list["SemanticRecord"] = field(default_factory=list) def transitive_provenance(rec: SemanticRecord, seen: set[str] | None = None) -> set[str]: seen = seen or set() if rec.record_id in seen: return set() seen.add(rec.record_id) out = set(rec.provenance) for p in rec.parents: out |= transitive_provenance(p, seen) return out def commit_semantic(rec: SemanticRecord, ledger: TombstoneLedger) -> None: closure = transitive_provenance(rec) hit = closure & ledger._ids if hit: raise RedactionClosureViolation( f"semantic record {rec.record_id} derives from tombstoned ids {sorted(hit)}; " f"re-distill from excised batch" ) # commit proceeds only when closure is clean return None if __name__ == "__main__": ledger = TombstoneLedger() ledger.add("R_4471") parent = SemanticRecord("S_9002", provenance=["R_4470", "R_4471"]) child = SemanticRecord("S_9100", provenance=["S_9002"], parents=[parent]) try: commit_semantic(child, ledger) except RedactionClosureViolation as e: print(f"rejected: {e}") ```