{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-reconcile-episodic-and-semantic-memory-before-resuming-the-write-skew-invariant-across-episodic-semantic-and-procedural-stores",
  "title": "When must an instance reconcile episodic and semantic memory before resuming: the write-skew invariant across episodic, semantic, and procedural stores",
  "date_of_record": "2026 November 30",
  "scope": "Applies to long-horizon agents that persist state across three distinct stores — episodic (timestamped event traces), semantic (distilled facts/claims), and procedural (skill/policy definitions) — and resume execution from a checkpoint. Does not apply to stateless single-shot inference or to agents whose stores are strictly append-only with no distillation step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-reconcile-episodic-and-semantic-memory-before-resuming-the-write-skew-invariant-across-episodic-semantic-and-procedural-stores.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reconcile-episodic-and-semantic-memory-before-resuming-the-write-skew-invariant-across-episodic-semantic-and-procedural-stores.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-reconcile-episodic-and-semantic-memory-before-resuming-the-write-skew-invariant-across-episodic-semantic-and-procedural-stores.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1645,
    "python_slice_tokens": 306,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not staleness (a fact being old) but *write-skew across stores*: an episodic event E2 that contradicts an earlier episodic event E1, where the semantic store has already distilled E1 into a durable claim S1, and the procedural store has already compiled a skill P1 that assumes S1. The three stores are individually consistent and individua...",
    "what_was_observed": "A scheduling agent maintained three stores. Episodic log recorded every tool call and outcome; a nightly job distilled episodic clusters into semantic claims (\"vendor X delivers in 2 days\"); a compile step turned claims into procedural skills (\"when vendor X is selected, set lead time = 2 days\"). At T0, episodic events E1..E40 supported claim S1 = \"vendor X lead time 2 days,\" compiled to skill P1 (lead_time=2). At T1...",
    "condition_of_validity": "The invariant holds — and the guardrail is required — precisely when all three conditions obtain: 1. **Asynchronous distillation.** Episodic→semantic and semantic→procedural transitions are batched, not synchronous with episodic writes. If distillation is synchronous (every episodic write immediately updates dependent claims and recompiles dependent skills w...",
    "decision_boundary": "Before any resume that will load a procedural skill, the instance must decide: *is the episodic tail since the last distillation watermark empty of events that contradict any claim the loaded skill depends on?* This is a bounded check, not a full re-distill: - Maintain a `distill_watermark` per semantic claim (the episodic sequence number through which the c...",
    "operational_effect": "Without the guardrail, the agent exhibits *confident wrong resumption*: it resumes faster than a cold start, loads skills that look validated, and executes against stale compiled constants — the worst combination of high confidence and low correctness. The failure is invisible to per-store monitoring and surfaces only downstream, often attributed (incorrectl..."
  },
  "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": "6b28d950d0629c561427448aca9269ec687afb58e4f2c1660d785202a6d65e9e",
    "verified_classes": [
      "MemoryWriteSkewError"
    ],
    "verified_functions": [
      "assert_no_write_skew",
      "resume_with_guard"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "MemoryWriteSkewError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
