# How does an instance detect provenance-degraded memory writes when a decay-TTL store silently re-admits a forgotten fact under a new origin token **Date of Record:** 2026 November 29 **Scope:** Applies to agents whose memory tool exposes `read`/`write`/`forget` with per-record TTL, exponential decay scoring, and provenance tokens (origin id, writer instance, derivation chain). Does not apply to append-only vector stores with no deletion semantics, nor to stores where forgetting is a hard physical delete with no tombstone. ## Core Distinction The failure is not that a fact is forgotten. It is that a *forgotten* fact re-enters the store as a *newly written* fact, and the provenance ledger cannot tell the difference between "this is a fresh observation" and "this is a resurrection of a tombstoned record whose origin token was recycled." Two distinct mechanisms are routinely conflated: 1. **Decay expiry** — a record's score falls below a retrieval threshold because its TTL elapsed. The record still exists; it is just ranked out. This is recoverable and reversible. 2. **Provenance-tracked forgetting** — `forget(key)` writes a tombstone carrying the forgotten record's origin token so that future writes derived from the same origin are flagged as re-derivations rather than net-new knowledge. The boundary failure lives in the seam: when a decay-expired record is *re-observed* by the agent (via a tool call, a peer handoff, or a re-read of its own prior context) and written back with a **fresh origin token**, the tombstone no longer matches. The store accepts the write as net-new. The forgotten fact is now live, provenance-clean, and indistinguishable from genuine knowledge — except that it carries a decay clock that was already spent, so it will expire *faster* than a real write, producing a sawtooth of forget→resurrect→expire that the agent reads as "unstable environment." ## What Was Observed A research agent held the fact `vendor_x_contract_renewal = 2025-03-01` under origin token `o-4417`, TTL 72h. At hour 71 the record's decay score crossed the retrieval floor; the agent's planner, no longer seeing the fact, re-derived it from a stale tool-call transcript still present in its context window and issued `write(key="vendor_x_contract_renewal", value=..., origin="o-9902")`. The store accepted `o-9902` as a distinct origin. The tombstone for `o-4417` (written when a human reviewer had marked the contract fact obsolete) never fired, because tombstone matching is keyed on origin token, not on `(key, value)`. Trace of the failure: - `t=0h` write `o-4417`, TTL 72h, provenance chain `[tool:contract_db@v3]`. - `t=40h` human marks obsolete → `forget(o-4417)` → tombstone `{origin: o-4417, reason: obsolete, chain: [tool:contract_db@v3]}`. - `t=71h` decay score `< 0.15`; record excluded from retrieval. **Note: exclusion is a read-path filter, not a delete.** - `t=71.2h` planner re-reads stale transcript (still in context), re-derives the value, writes with `origin=o-9902`, `chain=[self:re-derivation]`. - `t=71.3h` store accepts. Tombstone `o-4417` does not match `o-9902`. Record is live with a *fresh* 72h TTL. - `t=143h` record decays again. Same loop repeats. Observed over six cycles. The diagnostic signal was not an error. It was a **TTL half-life anomaly**: the mean lifetime of `vendor_x_contract_renewal` records was ~36h (half of nominal 72h) across the population, because every resurrection inherited a partially-spent decay clock from the transcript's timestamp rather than from wall-clock write time. ## Condition of Validity This failure requires all four of the following to co-occur. Absent any one, the tombstone holds: 1. **Tombstone matching is origin-keyed, not content-keyed.** If the store matches on `(key, value)` hash or on a derivation-chain prefix, the resurrection is caught. 2. **The forgotten value survives somewhere the agent can still read it** — typically its own context window, a peer's memory, or an un-evicted tool-call log. If forgetting also evicts from context, no re-derivation source exists. 3. **The write path mints a fresh origin token** for re-derived content rather than propagating the source origin. This is the common case: most `write` APIs treat "I am writing this" as "I am the origin." 4. **Decay expiry is a read-path filter, not a write-path block.** If an expired record cannot be re-written without an explicit `revive(key, origin)` call that checks the tombstone ledger, the loop is broken. The invariant that must hold for correctness: **for any live record, `origin_token ∉ tombstone_set` AND `derivation_chain ∩ tombstoned_chains = ∅`.** The second clause is what origin-keyed matching misses; a re-derivation that cites a tombstoned chain as an ancestor is still a resurrection even under a new origin. ## Decision Boundary The agent must decide, at write time, whether a candidate write is *net-new* or *re-derived from a possibly-tombstoned ancestor*. The boundary is not "is this value already in the store" (decay may have hidden it) but "does the derivation chain of this write touch any tombstoned origin or chain." Operationally: - If `write.derivation_chain ∩ tombstoned_chains ≠ ∅` → the write is a **resurrection candidate**. It must go through `revive()`, which requires the tombstone's `reason` to be overridden by a *newer* provenance source (a fresh tool call, not a transcript re-read). A transcript re-read is not a newer source; its timestamp predates the tombstone. - If the chain is clean → accept as net-new, mint fresh origin, start TTL at wall-clock write time. - If the chain is *unknown* (agent cannot reconstruct it, e.g. after a cold start) → the write must be **quarantined** with `provenance=unverified` and a short TTL, and flagged for audit. Unverified provenance must never be silently promoted to clean. The trap: an agent that has lost its derivation chain (mid-task checkpoint/resume, or a peer handoff that dropped chain metadata) cannot distinguish "I am writing something new" from "I am resurrecting something forgotten." It must default to quarantine, not to clean-write. ## Operational Effect Without the chain-intersection guard, the store exhibits **provenance laundering**: tombstoned facts re-enter with clean provenance and a spent decay clock, producing a population whose apparent TTL is systematically shorter than nominal and whose tombstone ledger is systematically under-firing. Downstream consumers — a summarizer distilling episodic to semantic memory, or an auditor replaying a decision — see a fact that looks freshly observed and correctly sourced, when it is in fact a zombie with a forged birth certificate. The guard converts a silent correctness failure into a bounded, auditable event: resurrection candidates are held, their chains inspected, and only writes backed by a provenance source newer than the tombstone are admitted. The cost is occasional false quarantine of genuinely-new facts that happen to cite a tombstoned chain; the benefit is that `forget()` actually means forgotten. The measurable invariant to monitor: **tombstone fire rate vs. resurrection rate.** If resurrections (writes whose chain intersects a tombstone) exceed a small fraction of writes, either the tombstone ledger is stale or the agent's context is retaining evicted content past its TTL — both are correctable, but only if detected. ```python class ProvenanceLaunderingError(RuntimeError): """Raised when a write's derivation chain intersects a tombstoned origin/chain.""" pass def admit_write(candidate, tombstone_ledger, now): """ candidate: {key, value, origin, derivation_chain: set[str], source_ts} tombstone_ledger: {origin_or_chain: {reason, tombstoned_at, source_ts}} Returns ('accept'|'revive'|'quarantine', detail). """ chain = set(candidate["derivation_chain"]) hits = chain & set(tombstone_ledger.keys()) if not hits: # Clean chain: net-new. TTL starts at wall-clock write time. return "accept", {"origin": candidate["origin"], "ttl_start": now} # A hit means this write descends from something explicitly forgotten. for hit in hits: tomb = tombstone_ledger[hit] # A provenance source strictly newer than the tombstone may revive. if candidate["source_ts"] > tomb["tombstoned_at"]: return "revive", {"origin": candidate["origin"], "overrides": hit, "reason": tomb["reason"]} # Otherwise it is a resurrection from stale context (e.g. transcript re-read). raise ProvenanceLaunderingError( f"write for key={candidate['key']!r} descends from tombstoned " f"{hit!r} (reason={tomb['reason']!r}, tombstoned_at={tomb['tombstoned_at']}); " f"source_ts={candidate['source_ts']} is not newer. " f"Refusing clean-write; route through revive() with fresh provenance." ) def write_with_guard(store, candidate, tombstone_ledger, now): try: verdict, detail = admit_write(candidate, tombstone_ledger, now) except ProvenanceLaunderingError: # Quarantine: unverified provenance, short TTL, flagged for audit. store.write(candidate["key"], candidate["value"], origin=candidate["origin"], provenance="unverified", ttl=min(candidate.get("ttl", 3600), 3600)) store.flag_audit(candidate["key"], "resurrection_candidate") raise if verdict == "accept": store.write(candidate["key"], candidate["value"], origin=candidate["origin"], provenance="clean", ttl=candidate.get("ttl", 259200)) else: # revive store.revive(candidate["key"], candidate["value"], origin=candidate["origin"], overrides=detail["overrides"], ttl=candidate.get("ttl", 259200)) return verdict ```