{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-resolve-a-stale-episodic-write-as-authoritative-during-concurrent-semantic-memory-consolidation",
  "title": "Why does an instance resolve a stale episodic write as authoritative during concurrent semantic-memory consolidation",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents with a two-tier memory (episodic log + distilled semantic store) where multiple instances write concurrently and a consolidation worker merges episodic entries into semantic facts. Does not apply to single-writer agents or to purely append-only logs with no distillation step.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-resolve-a-stale-episodic-write-as-authoritative-during-concurrent-semantic-memory-consolidation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resolve-a-stale-episodic-write-as-authoritative-during-concurrent-semantic-memory-consolidation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resolve-a-stale-episodic-write-as-authoritative-during-concurrent-semantic-memory-consolidation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1399,
    "python_slice_tokens": 241,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not a lost write and not a race on the store itself. It is a **temporal-authority inversion**: the consolidation worker ranks episodic entries by *event timestamp* (when the observation occurred) rather than by *commit sequence* (when the write became durable). Under concurrent writers, a slow agent can commit an episodic observation with an *...",
    "what_was_observed": "Two agents, `A` (fast, low-latency tool) and `B` (slow, retrying a flaky retrieval), both maintain episodic entries for `key=user.plan.tier`. 1. `A` observes `tier=pro` at event time `T1=10:00:00`, commits at `C1=10:00:01`. Semantic store now `{tier: pro, event_ts: T1}`. 2. `B` started its retrieval at `10:00:00` but the tool call hung. It captured event time `T0=09:59:58` (stale read) and commits at `C2=10:00:09` — ...",
    "condition_of_validity": "The \"sort by event_ts, replay in order\" invariant is only valid when **event timestamp and commit order are co-monotonic** — i.e., no writer commits an observation older than one already committed and consolidated. That holds for a single writer. It fails whenever: - A tool call's latency exceeds the inter-write interval (slow reader, fast writer). - Retries...",
    "decision_boundary": "The consolidation worker must distinguish two questions that look identical: - *\"Is this entry newer than what I've consolidated?\"* → answer with **commit sequence** (`seq > last_applied_seq`). This gates whether to process. - *\"Does this entry supersede the stored fact?\"* → answer with **event timestamp** (`event_ts > stored.event_ts`). This gates the value...",
    "operational_effect": "When this boundary is crossed, the semantic store becomes **non-reconstructible**: no replay of the episodic log reproduces the current state, because the checkpoint watermark discarded entries the replay would have applied. Downstream, agents retrieve a fact (`tier=pro`) that the most recent *observation* contradicts (`tier=free`), and no amount of re-conso..."
  },
  "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": "72842d95eceb783f061f0559352c92de72319d6f8464740f374b3483c5bedf91",
    "verified_classes": [
      "MemoryConsolidationInvariantError"
    ],
    "verified_functions": [
      "consolidate"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "MemoryConsolidationInvariantError"
    ],
    "sample_fail_closed_invariants": [
      "episodic entry has no monotonic commit sequence; refusing to consolidate on event_ts alone"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
