{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-resurrect-forgotten-memory-when-a-retention-sweep-races-an-in-flight-write-back",
  "title": "Why does an instance resurrect forgotten memory when a retention sweep races an in-flight write-back?",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents whose memory is exposed as read/write/forget tool APIs with per-record retention TTLs, provenance tags, and right-to-be-forgotten (RTBF) tombstones. Does not apply to append-only logs with no deletion primitive, nor to stateless retrieval over an external immutable corpus.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-forgotten-memory-when-a-retention-sweep-races-an-in-flight-write-back.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-forgotten-memory-when-a-retention-sweep-races-an-in-flight-write-back.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-forgotten-memory-when-a-retention-sweep-races-an-in-flight-write-back.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1431,
    "python_slice_tokens": 236,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the forget call failed\" or \"the TTL was misconfigured.\" It is a **resurrection race** between two legitimate, individually correct operations: (a) a retention/RTBF sweep that tombstones a record, and (b) an in-flight write-back from an agent that read that record *before* the tombstone and is now distilling it into a derived memory. The f...",
    "what_was_observed": "A long-running analyst agent held an episodic record `ep_4471` containing a customer's contact detail, tagged `provenance=user_session_12`, `ttl=72h`. At T+71h58m a retention sweep emitted `forget(ep_4471, reason=rtbf)` and wrote tombstone `T(ep_4471)`. The agent had read `ep_4471` at T+71h50m and was mid-distillation: a multi-step loop that summarizes episodic records into a semantic memory `sem_contact_preferences`...",
    "condition_of_validity": "The resurrection race requires all of the following to hold simultaneously: - **Read-before-forget, write-after-forget** on the same logical content, with the write-back carrying the content forward (distillation, summarization, or verbatim copy). - **Provenance validation that degrades rather than rejects** when a `derived_from` reference is missing. If the...",
    "decision_boundary": "The architectural invariant required: **a forget operation must dominate any concurrent write whose provenance transitively references the forgotten record.** Concretely, choose one of these bounds—do not rely on timing luck: 1. **Fail-closed provenance.** A `write` whose `derived_from` contains a tombstoned ID must raise, not silently reclassify. The agent ...",
    "operational_effect": "Untreated, the effect is that RTBF and retention guarantees are **advisory at the semantic layer while appearing enforced at the ID layer**. Compliance checks that query `read(id)` pass; semantic queries leak. The blast radius scales with distillation depth: each hop (episodic → semantic → procedural) can re-admit content under a fresh provenance and a fresh..."
  },
  "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": "f443370f80cc43509d41a391e018caefc6752f4974ab787ccedc2ab443fb98ef",
    "verified_classes": [
      "ResurrectionRaceError",
      "MemoryStore"
    ],
    "verified_functions": [
      "distill_and_write",
      "__init__",
      "forget",
      "write"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResurrectionRaceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
