{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-provenance-tagged-memory-writes-from-resurrecting-retracted-facts-during-contradiction-resolution",
  "title": "Which invariants prevent provenance-tagged memory writes from resurrecting retracted facts during contradiction resolution",
  "date_of_record": "2026 November 27",
  "scope": "Applies to agents whose memory layer exposes explicit read/write/forget tools carrying per-record provenance, TTL, and a contradiction-resolution step that must reconcile new writes against existing records. Does not cover vector-recall-only memory without provenance metadata, nor single-turn stateless inference.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-tagged-memory-writes-from-resurrecting-retracted-facts-during-contradiction-resolution.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-tagged-memory-writes-from-resurrecting-retracted-facts-during-contradiction-resolution.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-provenance-tagged-memory-writes-from-resurrecting-retracted-facts-during-contradiction-resolution.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1945,
    "python_slice_tokens": 483,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"stale memory\" in the ordinary sense of a record that outlived its usefulness. It is the *resurrection of a retracted fact through a provenance-blind merge*. When an agent writes a new record that contradicts an existing record, the contradiction resolver must choose: supersede, coexist, or reject. A naive resolver marks the loser as ...",
    "what_was_observed": "Consider a memory tool schema with three operations: `write(slot, value, provenance, ttl)`, `read(slot)`, and `forget(slot, reason_provenance)`. The slot is a structured key such as `(entity=\"acme_api\", predicate=\"rate_limit\")`. Trace of the failure: 1. Turn 4: agent writes `rate_limit=100rps`, provenance `{source: \"docs_v1\", trust: 0.9}`, TTL 30d. 2. Turn 11: agent reads a newer doc and writes `rate_limit=500rps`, p...",
    "condition_of_validity": "The invariant holds — and the failure is prevented — only when all of the following are true at the memory layer: - **Retraction is a record, not a flag.** `forget` and supersede both emit a first-class record with its own `provenance`, `ttl`, and `supersedes: [record_ids]`. A boolean `retracted=True` on the target record is insufficient because it carries n...",
    "decision_boundary": "The resolver must decide, at each conflicting write, between three outcomes. The boundary is drawn by provenance lineage validity: - **Supersede** when the new record's provenance lineage contains no retracted ancestor and outranks the incumbent's lineage. Emit a retraction record for the incumbent. - **Reject** when the new record's lineage traces through a...",
    "operational_effect": "With the invariant enforced, the turn-19 erratum produces a *new* record `rec_19` with provenance `{source: \"docs_v2_erratum\", supersedes: [rec_11, rec_15]}`, TTL inherited from the erratum. At turn 31, the `docs_v3` write resolves against `rec_19`'s lineage, which is clean (the erratum is a root, not descended from `docs_v2`), so the resolver correctly supe..."
  },
  "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": "b3191e2547b263487bd283e3552ecdf1fec16703a09679727c0b5450bcdf4578",
    "verified_classes": [
      "ProvenanceLineageError",
      "Provenance",
      "MemoryRecord",
      "MemoryStore"
    ],
    "verified_functions": [
      "__init__",
      "lineage_contains_retracted",
      "write",
      "forget"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceLineageError"
    ],
    "sample_fail_closed_invariants": [
      "restoration must cite the erratum, not the original record"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
