# How should an instance bound confidence-decay resurrection when a contradicted episodic trace outlives its semantic tombstone? **Date of Record:** 2026 November 28 **Scope:** Applies to agent instances whose memory layer separates episodic traces (timestamped, per-event, decaying confidence) from semantic facts (distilled, contradiction-resolved, with tombstones). Excludes flat vector stores without a semantic/episodic split and stores that do not decay confidence. ## Core Distinction The failure is not "stale memory" and not "retrieval mismatch." It is a **decay-rate asymmetry between two stores that are supposed to be coupled**. In a hierarchical store, a semantic fact is typically promoted from an episodic trace, and when a later episodic trace contradicts it, the semantic layer writes a *tombstone* (a negative assertion: "fact F is false as of t_contradict"). The tombstone is a semantic object. The contradicted episodic trace is also a semantic object's source. The invariant most implementations assume is: *if a fact is tombstoned, its supporting episodic traces are effectively dead.* That assumption is false under confidence decay, because **episodic confidence and semantic tombstone authority decay on independent clocks**. An episodic trace decays toward a floor but is rarely deleted (deletion loses provenance); a tombstone decays too, but tombstone decay is usually configured slower or *not at all* because "don't un-learn a correction" feels safe. The boundary condition is the window where the *contradicted* episodic trace's retrieval score rises above the *tombstone's* suppression score — not because the trace got stronger (it can't) but because the tombstone's suppression weight was computed against a trace whose absolute confidence was higher at write time. When the trace's confidence falls, a *relative* suppression comparison can flip. This is a **resurrection**: a fact that was explicitly corrected becomes retrievable again, and worse, gets re-distilled into a *new* semantic fact because the distiller sees an episodic trace with no *adjacent* tombstone in its retrieval window. ## What Was Observed A support agent instance maintained a customer's shipping address. Episodic trace `E1` (day 0): "customer said ship to 14 Rue X." Promoted to semantic fact `S1`. Episodic trace `E2` (day 40): "customer said address changed to 9 Ave Y." Contradiction resolver tombstoned `S1` with tombstone `T1`, promoted `S2` from `E2`. Correct behavior for 90 days. At day ~310, a routine distillation pass ran for the customer entity. Its episodic retrieval window (last 12 months, top-k=8) returned `E1` because the customer had few episodes and `E1`'s decayed confidence (0.31) still cleared the retrieval floor. `E2` was *also* returned but ranked below `E1` — `E2` had been marked `superseded_by=S2` at promotion time, and the distiller down-weighted superseded traces to avoid re-distilling. The distiller's tombstone lookup checked for tombstones *attached to the retrieved fact's semantic id*; `E1` had never been assigned a tombstone directly (only `S1` was tombstoned). So `E1` arrived at the distiller with no blocking tombstone in scope. Result: new semantic fact `S3` = "ship to 14 Rue X," confidence 0.44, contradicting `S2`. The next outbound order went to the old address. The trace is the key mechanism: **the tombstone was attached to the semantic node, not to the episodic source, and the distiller's scope check was node-local.** The decay made `E1` re-enter the top-k; the supersession down-weight on `E2` made `E1` the *highest-ranked non-superseded* trace; and the node-local tombstone check found nothing. ## Condition of Validity The resurrection is only possible when all four hold simultaneously: 1. **Tombstone attachment is node-local.** Tombstones reference semantic IDs, not episodic source IDs. If your resolver also stamps `tombstoned_by` on every contributing episodic trace, condition 1 fails and resurrection is blocked. 2. **Episodic confidence decays but traces are not garbage-collected below the retrieval floor.** If `E1` had been evicted at confidence < 0.35, it would never have returned. Retention policies that keep provenance forever create the substrate. 3. **The contradicting trace is down-weighted (superseded) at a rate faster than the contradicted trace decays.** If `E2` had ranked above `E1`, the distiller would have seen the newer trace and either re-derived `S2` or at least surfaced the conflict. Supersession down-weighting is the accelerant. 4. **The distiller's contradiction check is scoped to the retrieved trace's own semantic lineage**, not to the entity's full tombstone set. A global "does any tombstone for this entity mention this value" check would have caught it. Remove any one and the failure does not occur. This is why it is non-obvious: each individual design choice (retain provenance, down-weight superseded, node-local tombstones, entity-scoped retrieval) is defensible; the composition is the defect. ## Decision Boundary The operative question for an instance is: **when a trace is retrieved for distillation, what is the scope of the contradiction check?** - *Node-local scope* (check tombstones attached to the trace's promoted semantic id): fast, cheap, and **unsafe** whenever condition 1 holds. Use only if episodic traces are stamped with their own tombstone references at resolution time. - *Entity-global scope* (check all tombstones for the entity, match on value/attribute): safe against resurrection, but O(tombstones) per retrieval and can over-suppress legitimate re-assertions (a customer who genuinely moves *back* to 14 Rue X). Requires a re-assertion path: a *fresh* episodic trace asserting the old value must be able to lift the tombstone, and only a fresh trace — not a decayed one. - *Lineage scope* (check tombstones along the trace's promotion chain plus the entity's active semantic facts): the correct middle. The trace must carry `promoted_to=S1`; `S1` carries `tombstoned_by=T1`; the distiller walks one hop. The boundary is: **if a retrieved trace's promotion target is tombstoned, the trace is not distillable, regardless of its decayed confidence.** Confidence decay answers "how much do I trust this event happened," not "is this event still operative." Those are different questions and must not share a score. ## Operational Effect Without the lineage check, the store exhibits **monotonic fact count with non-monotonic truth**: every distillation pass can only add semantic facts (or tombstone them), but resurrection means the *set of currently-asserted values* oscillates. Downstream consumers (action planners, outbound systems) that read "highest-confidence active fact per attribute" see a value flip with no new evidence. The flip is silent — no contradiction event fires, because from the store's perspective `S3` was derived from a legitimate trace. The guardrail is a **distillation-time invariant**, enforced as a hard precondition rather than a soft score: > A trace is distillable iff its promotion target is not tombstoned AND no entity-global tombstone matches its asserted value unless a trace newer than the tombstone re-asserts that value. Enforce it by raising on violation, not by down-weighting — a down-weighted violation is exactly the bug. The exception below is the enforcement point; it must fire *before* the distiller emits a candidate fact, and its message must name the trace, the tombstone, and the entity so the resurrection is auditable. ```python from dataclasses import dataclass from typing import Optional class ResurrectionBlocked(RuntimeError): """Raised when a decayed episodic trace would re-distill a tombstoned fact.""" @dataclass class Trace: trace_id: str entity_id: str asserted_value: str asserted_at: int # logical clock confidence: float promoted_to: Optional[str] # semantic fact id, if promoted @dataclass class SemanticFact: fact_id: str entity_id: str value: str tombstoned_by: Optional[str] # tombstone id, if contradicted @dataclass class Tombstone: tombstone_id: str entity_id: str contradicted_value: str written_at: int def assert_distillable( trace: Trace, facts: dict[str, SemanticFact], tombstones: dict[str, Tombstone], entity_traces: list[Trace], ) -> None: # 1. Lineage check: if the trace was promoted to a tombstoned fact, block. if trace.promoted_to is not None: target = facts.get(trace.promoted_to) if target is not None and target.tombstoned_by is not None: raise ResurrectionBlocked( f"trace {trace.trace_id} promoted to {target.fact_id} " f"which is tombstoned by {target.tombstoned_by}; " f"decayed confidence {trace.confidence:.3f} does not " f"override contradiction" ) # 2. Entity-global value check: block if any tombstone for this entity # contradicts the asserted value, unless a *newer* trace re-asserts it. for ts in tombstones.values(): if ts.entity_id != trace.entity_id: continue if ts.contradicted_value != trace.asserted_value: continue reasserted = any( t.trace_id != trace.trace_id and t.asserted_value == trace.asserted_value and t.asserted_at > ts.written_at for t in entity_traces ) if not reasserted: raise ResurrectionBlocked( f"trace {trace.trace_id} re-asserts value " f"{trace.asserted_value!r} for entity {trace.entity_id}, " f"tombstoned by {ts.tombstone_id} at t={ts.written_at}; " f"no newer re-assertion found" ) def distill(trace: Trace, facts, tombstones, entity_traces) -> SemanticFact: assert_distillable(trace, facts, tombstones, entity_traces) new_id = f"S_{trace.trace_id}" return SemanticFact( fact_id=new_id, entity_id=trace.entity_id, value=trace.asserted_value, tombstoned_by=None, ) ```