{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-promote-a-fact-into-semantic-memory-before-the-episodic-witness-that-justified-it-has-been-committed-to-durable-storage",
  "title": "Why does an instance promote a fact into semantic memory before the episodic witness that justified it has been committed to durable storage?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents whose memory is stratified into a working store (context window / scratchpad), an episodic store (timestamped event log of observations and actions), and a semantic store (deduplicated, confidence-scored propositions distilled from episodes). Does not apply to flat single-store RAG agents or to purely stateless tool-calling loops with no distillation step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-promote-a-fact-into-semantic-memory-before-the-episodic-witness-that-justified-it-has-been-committed-to-durable-storage.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-promote-a-fact-into-semantic-memory-before-the-episodic-witness-that-justified-it-has-been-committed-to-durable-storage.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-promote-a-fact-into-semantic-memory-before-the-episodic-witness-that-justified-it-has-been-committed-to-durable-storage.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2600,
    "python_slice_tokens": 653,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot.\" It is a **commit-ordering inversion between tiers**. Distillation (episodic → semantic) and witnessing (working → episodic) are two independent writes, and in most implementations the semantic write is *cheaper and faster* than the episodic append, because the semantic store is an upsert into a keyed proposition table w...",
    "what_was_observed": "A planning agent with a three-tier store distilled the proposition `deploy_target=staging-3` into semantic memory at step 14 after a successful `kubectl config get-contexts` tool call. The distillation path ran synchronously in the reasoning loop: parse tool output → emit proposition → upsert to semantic store → emit episode record to episodic log. The semantic upsert completed in 4 ms (local keyed store). The episod...",
    "condition_of_validity": "The invariant that must hold is a **write-ordering and referential-integrity contract across tiers**: > A semantic proposition may be committed only after the episodic record that witnesses it has been durably committed, and the proposition's `episode_ref` must resolve to a committed episode at read time. If the witness is absent, the proposition is *unfound...",
    "decision_boundary": "The operational decision is where to place the durability barrier relative to the reasoning loop, and it turns on a single question: **is the semantic store allowed to contain propositions that no committed episode supports?** - If **no** (the default for planning, control, and any agent whose outputs have side effects): distillation is a *synchronous, witne...",
    "operational_effect": "With the witness-first, fail-closed contract enforced, the failure above becomes impossible by construction: the step-14 distillation aborts on the 503, `deploy_target` is never written to semantic memory, and at step 31 the agent reads *no* target and is forced to re-query — which surfaces `staging-7`. The cost is a degraded step 14 and a re-query at step 3..."
  },
  "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": "a530f3fc0718948fc8c1db8e908aff5c0df41db03a4b64b2fab41711b4f028ad",
    "verified_classes": [
      "WitnessIntegrityError",
      "PropositionState",
      "Episode",
      "Proposition",
      "EpisodicStore",
      "SemanticStore"
    ],
    "verified_functions": [
      "distill",
      "compact_working_store",
      "__init__",
      "append",
      "resolve",
      "__init__",
      "upsert",
      "get_grounded"
    ],
    "verified_functions_count": 8,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "WitnessIntegrityError"
    ],
    "sample_fail_closed_invariants": [
      "assert sem.get_grounded('deploy_target', ep) is None"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
