{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-resolves-a-cross-session-memory-conflict-by-overwriting-instead-of-branching-the-silent-episode-merge-invariant-failure",
  "title": "What happens when an instance resolves a cross-session memory conflict by overwriting instead of branching: the silent episode-merge invariant failure",
  "date_of_record": "2026 November 7",
  "scope": "Applies to hierarchical episodic memory stores that (a) consolidate short-term episodes into long-term semantic nodes on a schedule or threshold, and (b) permit multiple sessions to write to the same logical entity key. Does not apply to append-only logs with immutable episode IDs and no consolidation pass, nor to single-session stores where no cross-session conflict can arise.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resolves-a-cross-session-memory-conflict-by-overwriting-instead-of-branching-the-silent-episode-merge-invariant-failure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resolves-a-cross-session-memory-conflict-by-overwriting-instead-of-branching-the-silent-episode-merge-invariant-failure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-resolves-a-cross-session-memory-conflict-by-overwriting-instead-of-branching-the-silent-episode-merge-invariant-failure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1487,
    "python_slice_tokens": 233,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **conflict resolution as branching** and **conflict resolution as overwriting**. In a branching model, two sessions that assert different values for the same entity produce two retained episode records plus a pointer to a \"current\" value; the losing assertion remains queryable and its provenance (which session, which t...",
    "what_was_observed": "A long-term agent maintained a semantic node `user.employer`. Session A (day 1) extracted `employer = \"Acme\"` from a message. Session B (day 40) extracted `employer = \"Globex\"`. The consolidation policy was last-writer-wins by episode timestamp, with the loser episode soft-deleted after a retention window. This is the default in several memory frameworks and looks correct: newer information should supersede older. Th...",
    "condition_of_validity": "The overwriting model is only safe under a conjunction of conditions that are rarely all true: 1. **The entity is single-valued and monotonic** — it can only move forward and never needs its history (e.g., a monotonic counter, a last-seen timestamp). `employer`, `address`, `relationship_status`, and most real-world attributes are *not* in this class; they ar...",
    "decision_boundary": "Use overwrite-in-place **iff** the attribute is provably monotonic *and* the losing value is provably false *and* no consumer needs history. In every other case, branch. The operational test to apply at consolidation time: - If `new_value != old_value` and the attribute is non-monotonic → **branch, do not overwrite.** Record both episodes, set the node's `re...",
    "operational_effect": "Stores that overwrite non-monotonic attributes exhibit a specific failure profile: (a) they answer current-state queries correctly and history queries incorrectly, so the bug hides behind passing smoke tests; (b) their corruption rate grows with session count and is invisible until a history-dependent task is run; (c) once a migration has rewritten provenanc..."
  },
  "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": "0f68008604649d38b0b39a96780bc65ca49557cdd808ac1b123a945b5228d40e",
    "verified_classes": [
      "GroundingInvariantViolation"
    ],
    "verified_functions": [
      "consolidate",
      "pre_migration_check"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "GroundingInvariantViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
