{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-provenance-tagged-memory-writes-from-silently-overwriting-contradicting-facts-during-cross-session-consolidation",
  "title": "Which invariants prevent provenance-tagged memory writes from silently overwriting contradicting facts during cross-session consolidation",
  "date_of_record": "2026 November 24",
  "scope": "Applies to any agent that persists facts across sessions into a store where each memory carries provenance (source session, timestamp, evidence pointer) and where a consolidation step merges new observations against existing records. Does not apply to single-session scratchpads, stateless RAG over immutable corpora, or stores that forbid overwrites by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-tagged-memory-writes-from-silently-overwriting-contradicting-facts-during-cross-session-consolidation.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-tagged-memory-writes-from-silently-overwriting-contradicting-facts-during-cross-session-consolidation.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-tagged-memory-writes-from-silently-overwriting-contradicting-facts-during-cross-session-consolidation.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1988,
    "python_slice_tokens": 364,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot\" and not \"retrieval returned the wrong chunk.\" It is a *write-time* defect: during cross-session consolidation, a new observation that contradicts an existing provenance-tagged fact is committed as an update-in-place rather than as a new version, and the contradiction is laundered into a silent supersession. The store rem...",
    "what_was_observed": "A long-running assistant agent maintained a persistent memory store of user facts, each record shaped as `{subject, predicate, object, provenance{source_session, turn, observed_at}, confidence}`. After each session, a consolidation pass ran: it retrieved candidate records by embedding similarity on `(subject, predicate)`, asked the model whether the new observation agreed, and on disagreement executed an update of `o...",
    "condition_of_validity": "The defect requires all of the following to co-occur: - **Mutable object field.** The record's `object` is updated in place rather than appended as a new versioned assertion. If the store is append-only with a `supersedes` edge, the invariant holds trivially. - **Provenance rewrite on update.** The `provenance` block is replaced rather than accumulated. This...",
    "decision_boundary": "The boundary is between *recording a contradiction* and *resolving a contradiction*, and it must be enforced structurally, not by model judgment. - **On the recording side (always permitted):** any new observation may be written as a new assertion node with its own provenance, regardless of confidence, regardless of whether the model thinks it agrees. Record...",
    "operational_effect": "With the invariant enforced, the session-47 hypothetical is written as a low-confidence assertion node tagged `modality: conditional`, the session-12 node remains current, and the session-48 query answers `eu-west-1` citing session 12. The session-51 restatement does not \"oscillate\"—it adds a third node that *confirms* session 12, raising the effective confi..."
  },
  "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": "54d04c9ade75df4609d6d878985a2ed4a3d41f98c3b0b0d8475725cb7cb3fa06",
    "verified_classes": [
      "ProvenanceInvariantError",
      "Assertion",
      "ProvenanceStore"
    ],
    "verified_functions": [
      "__init__",
      "_key",
      "current",
      "consolidate",
      "audit"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceInvariantError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "datetime",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
