# What structural signals indicate when a decay policy has silently outlived its contradiction-resolution authority **Date of Record:** 2026 November 25 **Scope:** Applies to agents whose memory subsystem exposes explicit `read`/`write`/`forget` tool APIs with per-record time-decay scoring and a contradiction-resolution step that suppresses or merges conflicting records. Does not apply to append-only vector stores without decay, nor to systems where erasure is implemented purely as a storage-layer tombstone with no scoring surface. ## Core Distinction There are two independent reasons a memory record stops being returned by `read`: it **decayed** below the retrieval threshold, or it was **superseded** by a contradiction-resolution pass. These are conflated in almost every decay implementation because both are expressed as a scalar score reduction on the same field. The distinction that matters operationally is *reversibility*: a decayed record can be resurrected by a `write` that refreshes its timestamp, whereas a superseded record must **not** be resurrected because its content was adjudicated false. When the decay policy and the contradiction-resolution policy share the same score field, a decay-driven drop below threshold becomes indistinguishable from a supersession, and the agent loses the ability to reason about which records are *recoverable-but-stale* versus *adjudicated-and-dead*. The structural signal that this conflation has occurred is not a single event but a **coincidence pattern**: records whose `score` sits in the retrieval-threshold band `(τ_low, τ_high)` and whose `superseded_by` is non-null begin to appear in `read` results again after unrelated `write` calls, because the write path recomputes `score` from `last_access` without consulting the supersession ledger. This is the boundary failure: **decay refresh resurrects adjudicated-false memory.** ## What Was Observed A retrieval agent maintaining a user-preference memory store used a decay function `score = base_weight * exp(-λ * (now - last_access))` with `λ` tuned so that preferences older than ~30 days fell below the retrieval threshold `τ = 0.15` unless touched. A separate contradiction pass, triggered whenever two `write` calls asserted incompatible values for the same key (e.g., `timezone = "America/New_York"` then `timezone = "Europe/Berlin"`), marked the older record `superseded_by = ` and multiplied its `base_weight` by `0.1`. Two failure traces were captured: 1. **Resurrection via unrelated write.** Record `R_old` (`timezone = "America/New_York"`, superseded 12 days prior, `score` decayed to `0.09`) was refreshed by a `write` to an *unrelated* key that shared a namespace-level `last_access` recompute. The refresh set `last_access = now` and recomputed `score = base_weight * exp(0) = base_weight`, restoring `score` to `0.10 * original` — above `τ`. `read` then returned *both* `R_old` and the superseding `R_new`. The agent, seeing two timezone facts, re-ran contradiction resolution, which this time superseded `R_new` (later timestamp wins) — flipping the user's timezone back. 2. **Erasure-survivor leakage.** A GDPR `forget(user_id)` call removed records matching the user, but a supersession ledger entry referencing a forgotten record's `id` remained because the ledger was keyed by `record_id` and the erasure path only swept the primary store. A later `read` on the surviving superseding record returned a `superseded_by` pointer to a now-nonexistent `id`, and a downstream audit tool that resolved that pointer threw a `KeyError` mid-task, aborting a multi-step plan at step 4 of 7. In both cases the *scalar score* looked healthy. The invariant violation was structural: **score is a lossy projection of two orthogonal facts (recency and adjudication), and any write path that recomputes score without re-deriving adjudication status will corrupt the projection.** ## Condition of Validity The guardrail that bounds this failure is a **separation invariant** on the memory schema: - `score` MUST be computed as a monotone function of `(last_access, base_weight)` only, and MUST NOT be the sole gate on `read` visibility. - Visibility on `read` MUST be `visible = (score >= τ) AND (superseded_by IS NULL)`. Supersession is a hard filter, not a score multiplier. - Any `write` that refreshes `last_access` MUST be a no-op on records with `superseded_by IS NOT NULL`; the write path MUST NOT recompute `score` for superseded records at all, or it MUST recompute and then immediately re-apply the hard filter. - The supersession ledger MUST be co-located with (or erased in the same transaction as) the records it references. `forget` MUST cascade to ledger entries whose `record_id` or `superseded_by` references a forgotten record, replacing dangling pointers with an explicit `erased` sentinel rather than leaving a resolvable-but-dead `id`. This invariant holds only when the retrieval threshold `τ` is **static per namespace**. If `τ` is dynamically tuned (e.g., adaptive top-k), the band `(τ_low, τ_high)` widens and the coincidence pattern becomes the *normal* operating regime rather than an edge case, at which point the invariant must be enforced by the hard filter alone and `score` demoted to a pure ranking signal. ## Decision Boundary The agent must decide, on every `read` that returns a record with `superseded_by != NULL` or with `score` within `±ε` of `τ`: - If `superseded_by` is set and resolves to a live record: **trust the superseding record; do not re-run contradiction resolution** on the returned pair, because re-resolution is what flipped the timezone in trace 1. The adjudication already happened; replaying it on a decay-refreshed pair re-adjudicates on recency, which is exactly the signal decay corrupted. - If `superseded_by` points to an `erased` sentinel: treat the surviving record as **unverified**, not as authoritative, and escalate to a `read` on the source-of-truth (user profile service) rather than proceeding. - If `score` is within `±ε` of `τ` and `superseded_by` is null: the record is **recoverable-but-stale**; a `write` refresh is legitimate, but the refresh must not touch any record in the same namespace that carries a non-null `superseded_by`. - If the agent cannot distinguish these three cases from the `read` payload alone (i.e., the API does not expose `superseded_by` as a distinct field from `score`), the agent MUST treat the memory subsystem as **non-authoritative for any fact that has ever been contradicted** and fall back to re-querying the source. The boundary is crossed the moment a `write` refresh and a supersession can both move the same scalar. Below that boundary, the system is a single-writer recency store and the invariant is trivially satisfiable; above it, the agent is reasoning about a projection that has already lost the information it needs. ## Operational Effect The practical consequence is that **decay is not a forgetting mechanism; it is a ranking mechanism that has been mis-specified as a forgetting mechanism.** Systems that treat `score < τ` as "forgotten" will, under any write pattern that refreshes `last_access`, resurrect records that were adjudicated false, and the resurrection is silent because the score is healthy and the record is well-formed. The only reliable signal is structural: the co-occurrence of a non-null supersession pointer with a score in the threshold band, and the appearance of *both* members of a superseded pair in a single `read` result. The corrective is to make supersession a **hard visibility filter orthogonal to score**, cascade `forget` through the supersession ledger with explicit `erased` sentinels, and forbid the write path from recomputing score on superseded records. Under those three constraints the coincidence pattern cannot arise, and the agent can trust that a returned record is either live-and-recent or live-and-stale, never adjudicated-and-resurrected. ```python class SupersessionResurrectionError(RuntimeError): """Raised when a write-refresh would make an adjudicated-false record visible again.""" pass ERASED = "__erased__" def refresh_last_access(record: dict, now: float, tau: float) -> dict: if record.get("superseded_by") is not None: # A superseded record must never have its score recomputed by a write. raise SupersessionResurrectionError( f"refusing to refresh superseded record {record['id']!r} " f"(superseded_by={record['superseded_by']!r}); " f"resurrection would violate the separation invariant" ) record["last_access"] = now record["score"] = record["base_weight"] * _decay(now - record["last_access"]) return record def read_visible(records: list[dict], tau: float, eps: float = 0.02) -> list[dict]: out = [] for r in records: if r.get("superseded_by") is not None: # Hard filter: supersession is orthogonal to score. if r["superseded_by"] == ERASED: # Dangling pointer to an erased record: escalate, do not trust. raise SupersessionResurrectionError( f"record {r['id']!r} superseded by erased record; " f"memory subsystem is non-authoritative for this key" ) continue if abs(r["score"] - tau) <= eps: # Recoverable-but-stale band: flag for caller, do not silently trust. r = {**r, "_stale_band": True} if r["score"] >= tau: out.append(r) return out def forget(user_id: str, primary: dict, ledger: dict) -> None: # Cascade erasure through the supersession ledger with explicit sentinels. doomed = {rid for rid, rec in primary.items() if rec.get("user_id") == user_id} for rid in doomed: primary.pop(rid, None) for entry in ledger.values(): if entry.get("record_id") in doomed: entry["superseded_by"] = ERASED for rid, rec in primary.items(): if rec.get("superseded_by") in doomed: primary[rid]["superseded_by"] = ERASED def _decay(dt: float, lam: float = 0.05) -> float: import math return math.exp(-lam * dt) ```