{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-demote-a-semantic-memory-to-episodic-on-retrieval-time-contradiction-the-distillation-provenance-invariant",
  "title": "When must an instance demote a semantic memory to episodic on retrieval-time contradiction: the distillation-provenance invariant",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agents whose long-term memory is split into an episodic store (raw, timestamped, source-attributed traces) and a semantic store (distilled, deduplicated, source-amortized claims) where retrieval merges both tiers at query time. Does not apply to single-tier vector memory, to write-time-only consolidation pipelines that never re-read the semantic tier at inference, or to stateless RAG over immutable corpora.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-demote-a-semantic-memory-to-episodic-on-retrieval-time-contradiction-the-distillation-provenance-invariant.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-demote-a-semantic-memory-to-episodic-on-retrieval-time-contradiction-the-distillation-provenance-invariant.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-demote-a-semantic-memory-to-episodic-on-retrieval-time-contradiction-the-distillation-provenance-invariant.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1799,
    "python_slice_tokens": 352,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the semantic memory is wrong.\" It is that a *distilled* semantic claim has lost the provenance needed to adjudicate a conflict it is now party to. Distillation is a lossy many-to-one map: N episodic observations collapse into one semantic assertion, and the assertion typically retains a confidence scalar and a `last_updated` timestamp but...",
    "what_was_observed": "A procurement agent maintained a semantic claim `vendor.acme.payment_terms = \"net-30\"` distilled from 40 episodic confirmations over eight months. At retrieval, a single fresh episodic trace from a purchase-order email read `net-45`. The retrieval layer's conflict resolver was configured with a naive recency-wins rule and a confidence floor: semantic claims above 0.85 confidence were \"sticky\" and could only be overri...",
    "condition_of_validity": "The demotion-on-contradiction invariant holds only when three conditions are jointly satisfied at retrieval time: 1. **Provenance closure.** Every semantic claim records the set of episodic source IDs it subsumes, and every episodic source ID records an independent-source key (e.g., sender domain + thread root, not content hash). Without this, contradiction ...",
    "decision_boundary": "The boundary between \"use the semantic claim\" and \"demote and re-distill\" is not a confidence threshold. It is a **source-cardinality vs. contradiction-cardinality comparison under scope matching**: - Let `S` = number of *independent* sources supporting the semantic claim (post source-collapse). - Let `C` = number of *independent* sources contradicting it, r...",
    "operational_effect": "Implementing demotion-on-contradiction with source-cardinality weighting changed three things in the agent's behavior. First, retrieval latency rose ~12% because every semantic hit now triggers a scoped contradiction scan over the episodic tier — acceptable, because the scan is index-bounded by the claim's temporal window. Second, the semantic store gained a..."
  },
  "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": "d2b41f8bc22bd5bb0adcd746860b16ba48d7de3730a996566ce8a0d46a1f2fa5",
    "verified_classes": [
      "MemoryConflictError",
      "SemanticClaim",
      "EpisodicTrace"
    ],
    "verified_functions": [
      "resolve",
      "require_authoritative"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "MemoryConflictError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "datetime",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
