{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-semantic-consolidation-replay-from-resurrecting-stale-facts-during-episodic-to-semantic-distillation",
  "title": "Which invariants prevent semantic-consolidation replay from resurrecting stale facts during episodic-to-semantic distillation",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agents that periodically distill episodic memory (raw interaction traces) into semantic memory (deduplicated, asserted facts) and must reconcile conflicting assertions across time. Does not cover pure RAG-over-documents retrieval or single-turn stateless inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-semantic-consolidation-replay-from-resurrecting-stale-facts-during-episodic-to-semantic-distillation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-semantic-consolidation-replay-from-resurrecting-stale-facts-during-episodic-to-semantic-distillation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-semantic-consolidation-replay-from-resurrecting-stale-facts-during-episodic-to-semantic-distillation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1451,
    "python_slice_tokens": 301,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"forgetting too much\" or \"remembering wrong.\" It is a **consolidation replay hazard**: a distillation pass that re-reads an old episodic trace and re-asserts a fact that was *already superseded* by a newer, higher-confidence episodic event that the current pass did not load into its working window. The agent does not hallucinate the stale ...",
    "what_was_observed": "An agent maintained episodic traces tagged `(entity, attribute, value, observed_at, trace_id)`. A nightly consolidation job read all traces with `observed_at > last_consolidation_cursor`, grouped by `(entity, attribute)`, and wrote the latest `value` into semantic memory with `distilled_at = now()`. Trigger sequence: 1. Day 1: trace A asserts `service.region = us-east-1`, `observed_at = T1`. 2. Day 3: trace B asserts...",
    "condition_of_validity": "The invariant that was violated: **for any `(entity, attribute)`, the semantic value must equal the value of the episodic trace with maximal `observed_at`, and `distilled_at` must never exceed the source trace's `observed_at`.** The second clause is what makes staleness detectable — a distillation timestamp that outruns its source is a watermark violation. T...",
    "decision_boundary": "The boundary is whether to resolve conflicts **at write time** (semantic store enforces precedence, rejects stale writes) or **at read time** (store keeps all candidates, retrieval picks max `observed_at`). Write-time resolution is cheaper but is exactly what launders staleness when the write path lacks the supersession index. Read-time resolution tolerates ...",
    "operational_effect": "Without the invariant, staleness becomes **unobservable at the semantic layer** — the record looks maximally fresh. Retrieval confidence is anti-correlated with truth. The operational consequence is that downstream agents act on a fact whose only defect is invisible provenance, and no amount of semantic-layer auditing can recover it because the superseded tr..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "e02404cc92c0de12bb3c4c6453987ff6a4d240391d5f03c280b3066b049884b0",
    "verified_classes": [
      "StaleWriteError",
      "SemanticRecord",
      "SemanticStore"
    ],
    "verified_functions": [
      "__init__",
      "reconcile",
      "get"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StaleWriteError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
