# Under what conditions must an instance avoid promoting episodic traces into semantic memory during retrieval-augmented consolidation **Date of Record:** 2026 November 18 **Scope:** Applies to agent memory architectures that maintain separate episodic (event-trace) and semantic (assertion) stores and route writes between them via retrieval-augmented consolidation. Does not apply to systems that perform single-store append-only logging without promotion, nor to systems where contradiction resolution is deferred entirely to query time. ## Core Distinction The non-obvious boundary is this: **retrieval similarity is not evidence of semantic truth**. Consolidation pipelines typically promote an episodic trace to a semantic assertion when (a) the trace is retrieved repeatedly, or (b) the trace is retrieved as supporting context for a query whose answer it "matches." Both signals are contaminated by retrieval mechanics rather than by world-state. A trace can be retrieved repeatedly because it is *lexically or embedding-adjacent to many queries* — a hub artifact — without being correct, current, or even internally consistent. Promoting such a trace converts a retrieval-frequency statistic into a durable belief. The invariant that must hold before promotion is: **the candidate assertion must be entailed by the episodic trace under the trace's own provenance and timestamp constraints, and must survive contradiction resolution against the current semantic store — not merely be retrieved alongside it.** Retrieval co-occurrence is a routing hint, never a promotion license. ## What Was Observed In a consolidation pipeline routing episodic traces to a semantic store, a class of traces began promoting at high rate. The traces were short, entity-dense statements ("service X runs on port Y", "user Z prefers format W") that scored high on embedding similarity against a broad band of incoming queries because they shared named entities with almost everything. Retrieval counts climbed monotonically, the promotion threshold (retrieved ≥ N times) fired, and the assertions entered the semantic store. Two failure modes followed. First, **hub promotion**: a stale trace ("service X runs on port 8080") was retrieved constantly as context, promoted, and thereafter *itself* retrieved as a semantic assertion, creating a self-reinforcing loop in which promotion increased retrieval which increased promotion. Second, **contradiction masking**: when a newer episodic trace contradicted the promoted assertion ("service X runs on port 9090"), the resolver compared the new trace against the *semantic* assertion and, because the semantic assertion had higher retrieval mass and no explicit supersession pointer, retained the stale assertion. The newer, correct trace was demoted to "unconfirmed episodic." The observable signature was a semantic store whose assertion count grew while its contradiction-resolution rate fell, and whose retrieval mass concentrated on a small set of entity-hub assertions with no corresponding increase in downstream task accuracy. ## Condition of Validity The promotion rule is valid only when all of the following hold: 1. **Provenance closure.** The episodic trace carries a complete provenance chain (source, timestamp, session, and the query that surfaced it). Traces missing any element are ineligible regardless of retrieval count. 2. **Entailment, not similarity.** A verifier confirms the trace entails the candidate assertion. Similarity above threshold is necessary but not sufficient; the verifier must reject traces that are merely *about* the same entities. 3. **Temporal ordering is explicit.** The candidate assertion's timestamp is strictly newer than any conflicting semantic assertion, or an explicit supersession edge exists. Absent this, contradiction resolution must block promotion. 4. **Retrieval independence.** The retrieval count used as a promotion signal must exclude retrievals that were themselves caused by the candidate or a prior promotion of it. Self-reinforcing retrieval does not count toward the threshold. 5. **Hub damping.** Traces whose entity overlap with the query distribution exceeds a calibrated ceiling are flagged as hub artifacts and require independent corroboration (a second, provenance-disjoint trace) before promotion. When any condition fails, the correct action is to keep the trace episodic and route it to a contradiction queue, not to promote it. ## Decision Boundary The boundary is between **"retrieved and consistent"** and **"entailed and superseding."** The former is a routing signal; the latter is a promotion license. Operationally: - If entailment holds, provenance is closed, and no conflict exists → promote. - If entailment holds but a conflict exists → resolve by timestamp and supersession; promote only the winner, and write the loser as a superseded episodic record with a back-pointer. - If entailment is unverified → do not promote; increment a corroboration counter on the episodic trace. - If the trace is a hub artifact → require provenance-disjoint corroboration; never promote on retrieval count alone. - If provenance is incomplete → quarantine; do not resolve contradictions against it. The failure to avoid is treating the first branch's *preconditions* as satisfied by the retrieval statistic alone. ## Operational Effect Enforcing this boundary converts the semantic store from a frequency-weighted cache of retrieved text into a provenance-anchored assertion set. The measurable effects are: promotion rate drops sharply for entity-hub traces; contradiction-resolution rate rises because conflicts are detected against episodic candidates rather than masked by already-promoted assertions; and the self-reinforcing retrieval loop is broken because promotion no longer feeds back into the promotion signal. Downstream, task accuracy decouples from raw assertion count — a smaller, entailed semantic store outperforms a larger, retrieval-mass-driven one. The cost is latency: every promotion now pays for an entailment check and a contradiction scan, and the corroboration requirement delays promotion of genuinely useful but low-overlap traces. ```python from dataclasses import dataclass from typing import Optional class PromotionInvariantError(RuntimeError): """Raised when an episodic trace is about to be promoted without satisfying the entailment / provenance / supersession invariant.""" pass @dataclass class EpisodicTrace: trace_id: str text: str source: Optional[str] timestamp: float session: Optional[str] surfaced_by_query: Optional[str] retrieval_count: int self_caused_retrievals: int entity_overlap_ratio: float provenance_disjoint_corroborations: int @dataclass class SemanticAssertion: assertion_id: str text: str timestamp: float supersedes: Optional[str] = None HUB_OVERLAP_CEILING = 0.55 PROMOTION_RETRIEVAL_THRESHOLD = 3 def _provenance_closed(t: EpisodicTrace) -> bool: return all([t.source, t.session, t.surfaced_by_query]) and t.timestamp > 0 def _independent_retrievals(t: EpisodicTrace) -> int: return max(0, t.retrieval_count - t.self_caused_retrievals) def _is_hub_artifact(t: EpisodicTrace) -> bool: return t.entity_overlap_ratio > HUB_OVERLAP_CEILING def _entails(t: EpisodicTrace, candidate: str) -> bool: # Placeholder for a real verifier; must reject mere entity adjacency. return candidate.strip().lower() in t.text.strip().lower() def route_promotion( trace: EpisodicTrace, candidate: str, current_store: list[SemanticAssertion], ) -> str: if not _provenance_closed(trace): raise PromotionInvariantError( f"trace {trace.trace_id} has open provenance; quarantine, do not promote" ) if _independent_retrievals(trace) < PROMOTION_RETRIEVAL_THRESHOLD: return "hold:insufficient_independent_retrieval" if _is_hub_artifact(trace) and trace.provenance_disjoint_corroborations < 1: raise PromotionInvariantError( f"trace {trace.trace_id} is a hub artifact " f"(overlap={trace.entity_overlap_ratio:.2f}) with no disjoint corroboration" ) if not _entails(trace, candidate): raise PromotionInvariantError( f"trace {trace.trace_id} does not entail candidate assertion; " "similarity is not a promotion license" ) for existing in current_store: if existing.text.strip().lower() == candidate.strip().lower(): return "noop:already_present" if existing.supersedes == trace.trace_id: return "noop:already_superseded" conflicts = [ a for a in current_store if a.text.strip().lower() != candidate.strip().lower() and _shares_entity(a.text, candidate) ] if conflicts: newest = max(conflicts, key=lambda a: a.timestamp) if trace.timestamp <= newest.timestamp and newest.supersedes != trace.trace_id: raise PromotionInvariantError( f"trace {trace.trace_id} conflicts with newer assertion " f"{newest.assertion_id} and has no supersession edge" ) return f"resolve:supersede:{newest.assertion_id}" return "promote" def _shares_entity(a: str, b: str) -> bool: return bool(set(a.lower().split()) & set(b.lower().split())) ```