{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-resurrect-deleted-memory-when-a-ttl-sweep-races-a-provenance-tagged-write",
  "title": "Why does an instance resurrect deleted memory when a TTL sweep races a provenance-tagged write?",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent memory services exposing `write`, `read`, `forget`, and TTL-based expiry over provenance-tagged records, where a single logical fact may be stored as a mutable record plus append-only provenance/audit entries. Does not apply to purely stateless retrieval or to immutable append-only stores with no delete path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-deleted-memory-when-a-ttl-sweep-races-a-provenance-tagged-write.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-deleted-memory-when-a-ttl-sweep-races-a-provenance-tagged-write.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-deleted-memory-when-a-ttl-sweep-races-a-provenance-tagged-write.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2128,
    "python_slice_tokens": 507,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **logical deletion** (a fact is no longer retrievable or derivable by any read path) and **physical tombstoning** (a specific record's `deleted_at` is set). A right-to-be-forgotten (RTBF) request is satisfied only by the former. Most memory tool APIs implement the latter and then *trust that the read path honors it*. T...",
    "what_was_observed": "A long-running support agent maintains a per-user memory store. Records carry `provenance` (source event IDs), `ttl_seconds`, and a `tombstone` field. On every `write`, the agent runs a lightweight distillation step: it reads recent episodic records for the same subject, summarizes them, and writes a new semantic record whose `provenance` lists the source episodic IDs. Sequence that reproduces the defect: 1. Episodic...",
    "condition_of_validity": "The failure requires all of the following to hold simultaneously; remove any one and the resurrection does not occur: - **A shared deletion flag** (`deleted_at`) serves both TTL expiry and RTBF, with a nonzero `grace_window` applied uniformly. The grace window exists so that a TTL-expired fact re-observed within the window can be \"revived\" rather than re-cre...",
    "decision_boundary": "The boundary is between **re-observation** (the same fact arrives again from an independent source, which is legitimate and should revive or re-create the record) and **re-derivation** (the agent's own machinery reads a tombstoned record and synthesizes a new one from it, which is laundering). These are indistinguishable at the storage layer because both pro...",
    "operational_effect": "Without the split, the agent's memory system has a **latent resurrection surface** proportional to (distillation frequency) × (purge latency) × (provenance depth). Every consolidation pass during a purge window is a potential laundering event, and the failure is silent: API success, audit success, behavioral violation. Cold-started instances are the worst ca..."
  },
  "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": "dd4f383152fd4e37aa088fdc114e849b30eec3c0c64c5b9771870dd25a93ebad",
    "verified_classes": [
      "TombstoneReason",
      "MemoryResurrectionError",
      "MemoryRecord",
      "ProvenanceGatedStore"
    ],
    "verified_functions": [
      "__init__",
      "_has_rtbf_ancestor",
      "read",
      "write_derived",
      "forget_rtbf"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "MemoryResurrectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
