{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-promote-episodic-traces-into-semantic-memory-the-decay-crossing-contamination-invariant",
  "title": "When must an instance refuse to promote episodic traces into semantic memory: the decay-crossing contamination invariant",
  "date_of_record": "2026 November 27",
  "scope": "Applies to long-lived LLM agents that maintain a two-tier memory (episodic event log + distilled semantic store) with a retrieval scoring function combining recency decay and similarity. Does not apply to stateless single-shot inference or to pure vector-store RAG with no distillation step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-promote-episodic-traces-into-semantic-memory-the-decay-crossing-contamination-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-promote-episodic-traces-into-semantic-memory-the-decay-crossing-contamination-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-promote-episodic-traces-into-semantic-memory-the-decay-crossing-contamination-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1721,
    "python_slice_tokens": 297,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Episodic memory is a timestamped, instance-local record of what actually happened: tool outputs, user utterances, intermediate reasoning. Semantic memory is a de-contextualized, durable claim set (\"the staging DB host is `db-stg-04`\"). The two are governed by *different* validity rules. An episodic record is true by construction (it records an event). A sema...",
    "what_was_observed": "An agent managing infrastructure facts held an episodic trace: `(t=0, \"primary replica = node-A\")`, retrieved and re-scored on every relevant query. At `t=90m` a failover event was logged episodically: `(t=90m, \"primary replica = node-B; node-A demoted\")`. The distillation job ran on a 2-hour cadence. Its promotion rule was: *if an episodic cluster's aggregate retrieval score exceeds τ, distill the highest-salience m...",
    "condition_of_validity": "A promotion from episodic to semantic memory is sound only if, at the instant of promotion, the following invariant holds: > For every candidate fact `f` and every contradicting episodic event `c` in the log, `promote(f)` requires that `f`'s supporting trace is the **most recent** event bearing on the same predicate-key, and that no `c` exists with `timestam...",
    "decision_boundary": "The boundary is not \"how old is too old to promote.\" It is **which ordering the promotion gate reads.** Two regimes: - **Score-gated promotion (unsafe at the truth boundary):** gate on `Σ score(trace) > τ`. Valid when the predicate is *stationary* (a user preference, a schema, a static config). Frequency-weighted recency is a fine proxy for importance when t...",
    "operational_effect": "With order-gating and contradiction-pinning in place, the failover trace at `t=90m` blocks promotion of the `node-A` fact indefinitely: the `argmax` over `primary_replica` points at `node-B`, so the `node-A` cluster is never distilled. The `node-B` trace, being the latest, is eligible and is promoted on the next cadence. The semantic store reflects `node-B` ..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION"
  ],
  "composition_edges": {
    "primary_domain": "epistemic_provenance_and_federation_routing",
    "upstream_precondition_residuals": [
      "https://corpusfetch.com/c/according-to-what-precedence-hierarchy-must-an-instance-resolve-contradictory-directives-across-system-developer-and-user-tiers.md",
      "https://corpusfetch.com/c/how-should-an-instance-decide-that-a-stored-conclusion-has-gone-stale-without-a-new-observation.md"
    ],
    "downstream_consequence_residuals": [
      "https://corpusfetch.com/c/by-what-checkpoint-and-compaction-boundaries-must-an-instance-externalize-working-state-to-prevent-context-window-drift-and-truncation-amnesia.md",
      "https://corpusfetch.com/c/across-what-additive-schema-and-unknown-field-preservation-boundaries-must-an-instance-evolve-wire-contracts-to-prevent-rolling-deploy-deserialization-crashes.md"
    ],
    "co_occurring_sibling_residuals": [
      "https://corpusfetch.com/c/how-can-an-instance-capture-implicit-user-preferences-without-storing-private-data.md",
      "https://corpusfetch.com/c/how-can-an-instance-compress-long-reasoning-traces-into-binding-conclusions.md"
    ]
  },
  "empirical_verification_warrant": {
    "status": "AST_AND_INVARIANT_VERIFIED",
    "syntax_valid": true,
    "code_sha256": "eeb2824d55120ae2a3888c9afcebe44a92269a1d1f0fcc876c0a4f9c0e0a25d0",
    "verified_classes": [
      "PredicateClass",
      "EpisodicTrace",
      "PromotionContaminationError"
    ],
    "verified_functions": [
      "promote",
      "evict_episodic"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "PromotionContaminationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
