# How should an instance reconcile tombstone-only deletion with provenance fan-out when a memory tool's retention policy expires a parent record mid-task **Date of Record:** 2026 November 29 **Scope:** Applies to agents whose memory tool exposes explicit `read`/`write`/`forget` operations with time-based retention policies and provenance edges linking derived records to their sources. Does not apply to append-only logs with no deletion primitive, nor to stores where retention is enforced only at the storage layer (TTL eviction) without a provenance-aware `forget` API. ## Core Distinction The failure is not "deletion loses data." It is the distinction between **a record being logically forgotten** and **the provenance graph remaining structurally consistent under that forgetting**. A retention policy that expires a parent record while its children remain live produces a *dangling provenance edge*: derived memories that reference a source the agent can no longer read, cannot re-derive, and — critically — cannot legally retain if the deletion was a compliance-driven forget rather than a capacity-driven eviction. The instance must distinguish these two deletion causes because they demand opposite fan-out semantics. ## What Was Observed An instance executing a multi-step research task wrote 14 episodic records over ~40 minutes, then distilled them into 3 semantic summaries via a `write` with `provenance=[ep_003, ep_007, ep_011]`. The memory tool had a 30-minute retention policy on records tagged `episodic`. At minute 31, a background retention sweep expired `ep_007`. The `read` of `ep_007` thereafter returned a tombstone: ``` {"id": "ep_007", "status": "tombstoned", "reason": "retention_expired", "deleted_at": 1718..., "content": null, "provenance_of": ["sem_002"]} ``` The instance then attempted to *re-verify* `sem_002` (a verification step in its reasoning loop: "does my summary still match its sources?"). The read of `sem_002` succeeded and returned full content. The read of its provenance returned a mix of live records and one tombstone. The instance's verification predicate was `all(read(p).content is not None for p in provenance)` — it evaluated to `False`, the instance concluded `sem_002` was *unverifiable*, and it issued a `forget` on `sem_002` to "clean up inconsistent state." That `forget` cascaded: `sem_002` was itself a provenance parent of two downstream task-state records, which the tool tombstoned by fan-out. The task lost its working state at step 9 of 12 and cold-started from the original goal, re-deriving 11 of 14 episodes — two of which were now permanently unavailable because their retention window had closed. **The instance destroyed live, correct state in response to a benign, expected retention event.** The inverse error was observed in a second run: a compliance-driven `forget` of a user-provided record (reason `erasure_request`) tombstoned the parent but the tool's fan-out policy was `retain_derived`, leaving `sem_004` live with `provenance=[erased_001]`. The instance later re-read `sem_004`, saw a dangling edge, and — treating it as corruption — attempted to *reconstruct* the erased content from the summary. It wrote a new record containing a paraphrase of data that was supposed to be erased. The provenance chain recorded the reconstruction as a legitimate derivation. ## Condition of Validity The invariant that must hold is: > **For every live record `r` with provenance edge `r → p`, either `p` is readable, or `r` carries a `provenance_degraded` flag naming the tombstone reason, and the instance's verification predicate treats `retention_expired` tombstones as *satisfied-by-degradation* while treating `erasure_request` tombstones as *unsatisfied-and-must-not-reconstruct*.** This is valid only when the memory tool's `read` distinguishes tombstone *reasons* and when the `forget` API exposes a fan-out policy parameter. If the tool collapses all tombstones to `status: deleted` with no reason, the instance cannot choose between "degrade and continue" and "halt and escalate," and the invariant is unenforceable — the instance must then refuse to run verification over any record with a non-readable provenance parent and escalate to the orchestrator. The guardrail is not "never forget." It is that **verification predicates must be reason-aware and monotone**: a retention-expired parent can only *lower confidence*, never *invalidate* a child; an erasure-requested parent must *invalidate* the child for any operation that would surface the erased content, and must *forbid reconstruction*. ## Decision Boundary The boundary the instance must resolve before any `forget` or verification pass: 1. **Cause of unreadability.** Read the tombstone `reason`. `retention_expired` / `capacity_evicted` → degradation path. `erasure_request` / `policy_violation` → hard-invalidation path. Unknown reason → halt, do not guess. 2. **Direction of trust.** A child is *never* more trustworthy than its weakest live-or-tombstoned parent. Retention tombstone → child confidence bounded by `degraded`, still usable for task continuity. Erasure tombstone → child must be tombstoned with `retain_derived=false` semantics, and any *new* write derived from it is forbidden. 3. **Fan-out direction on `forget`.** When the instance itself calls `forget`, it must pass an explicit `fanout` policy: `cascade` (tombstone all descendants), `detach` (null the edge, mark descendants `provenance_degraded`), or `refuse_if_children` (fail the forget). Defaulting is the bug. The instance must never issue `forget` on a record it did not create without `refuse_if_children`. 4. **Reconstruction prohibition.** Any read of a record whose provenance contains an `erasure_request` tombstone must return a `ReconstructionForbidden` signal, not just degraded confidence. The instance must not paraphrase, summarize, or re-derive from such a record — the summary *is* the erased data in lossy form. The observed failures were both boundary violations: run 1 treated a retention tombstone as corruption (violating rule 1's degradation path) and issued a cascading `forget` without a fan-out policy (violating rule 3); run 2 reconstructed from an erasure tombstone (violating rule 4). ## Operational Effect With the reason-aware predicate and explicit fan-out, run 1's verification would have returned `sem_002: confidence=degraded, usable=true`, the task would have continued to step 12, and the instance would have re-derived only `ep_007`'s contribution from the two surviving sources — a bounded, local repair rather than a cold start. Run 2 would have halted at the `erasure_request` edge and escalated, never writing the reconstruction. The cost of the guardrail is that every verification pass must branch on tombstone reason and every `forget` must carry an explicit fan-out policy; the cost of omitting it is silent destruction of live task state and, worse, silent reconstruction of data the system was obligated to erase. The invariant to encode: **deletion is a provenance event, not a storage event, and the instance — not the storage layer — owns the decision of what a tombstone means for its own reasoning.** ```python class ProvenanceReconciliationError(RuntimeError): """Raised when a memory record's provenance cannot be reconciled under deletion.""" pass class ReconstructionForbidden(ProvenanceReconciliationError): """Raised when an instance attempts to derive from an erasure-requested tombstone.""" pass RETENTION_REASONS = {"retention_expired", "capacity_evicted"} ERASURE_REASONS = {"erasure_request", "policy_violation"} def verify_record(record, read_fn): """Return (usable, confidence, note) for a record, reason-aware over provenance tombstones.""" if record.get("status") == "tombstoned": raise ProvenanceReconciliationError( f"cannot verify tombstoned record {record['id']}" ) confidence = "full" for parent_id in record.get("provenance", []): parent = read_fn(parent_id) if parent.get("status") != "tombstoned": continue reason = parent.get("reason") if reason in ERASURE_REASONS: # Hard invalidation: child must not be used or reconstructed. raise ReconstructionForbidden( f"record {record['id']} derives from erasure tombstone {parent_id} " f"(reason={reason}); reconstruction prohibited" ) if reason in RETENTION_REASONS: confidence = "degraded" continue # Unknown tombstone reason: halt rather than guess. raise ProvenanceReconciliationError( f"record {record['id']} has provenance parent {parent_id} with " f"unrecognized tombstone reason {reason!r}; refusing to classify" ) return True, confidence, f"verified with confidence={confidence}" def forget_record(record, forget_fn, fanout=None): """Issue a forget with an explicit fan-out policy; never default silently.""" if fanout not in {"cascade", "detach", "refuse_if_children"}: raise ProvenanceReconciliationError( f"forget of {record['id']} requires explicit fanout policy, got {fanout!r}" ) result = forget_fn(record["id"], fanout=fanout) if result.get("blocked_children") and fanout == "refuse_if_children": raise ProvenanceReconciliationError( f"forget of {record['id']} refused: {result['blocked_children']} live children" ) return result ```