{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-resurrect-a-forgotten-memory-when-a-ttl-expiry-and-a-scoped-erasure-tombstone-race-inside-the-same-write-epoch",
  "title": "Why does an instance resurrect a forgotten memory when a TTL expiry and a scoped-erasure tombstone race inside the same write epoch?",
  "date_of_record": "2026 November 20",
  "scope": "Applies to any agent using a memory tool API that exposes `write`, `read`, and `forget` with per-scope TTLs and right-to-be-forgotten (RTBF) erasure tombstones, where the agent maintains a local cache or working-set of retrieved memories across turns. Does not apply to append-only immutable logs with no deletion path, nor to single-shot stateless calls.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-a-forgotten-memory-when-a-ttl-expiry-and-a-scoped-erasure-tombstone-race-inside-the-same-write-epoch.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-a-forgotten-memory-when-a-ttl-expiry-and-a-scoped-erasure-tombstone-race-inside-the-same-write-epoch.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-a-forgotten-memory-when-a-ttl-expiry-and-a-scoped-erasure-tombstone-race-inside-the-same-write-epoch.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2354,
    "python_slice_tokens": 619,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"deletion didn't work.\" The failure is that **TTL expiry and RTBF erasure are two distinct deletion semantics that share one physical tombstone namespace**, and an agent that treats \"absent from `read`\" as \"safe to reconstruct from local state\" will re-materialize a record that was erased for legal reasons by replaying it as if it had mere...",
    "what_was_observed": "A research agent held a working-set cache of 40 episodic memory records keyed by `(scope_id, record_id)` with a local `fetched_at` timestamp. The tool API defined TTL at the scope level: records in scope `proj-7a` expired 72h after write. The agent's read path was: 1. On each turn, request `read(scope_id, since=cursor)`. 2. For any `record_id` in the local cache but absent from the response, treat it as *expired* and...",
    "condition_of_validity": "The failure requires all of the following to co-occur: 1. **Shared absence channel.** `read` returns the same \"not present\" for expired and erased records. If the API returns `{status: \"expired\"}` vs `{status: \"erased\"}`, the agent can branch and the failure does not occur. 2. **Agent-side reconstruction.** The agent maintains any durable or semi-durable cop...",
    "decision_boundary": "The architectural invariant required is: **erasure is a monotonic, write-blocking predicate that must be enforced at the write path, and absence must be typed at the read path.** Concretely: - **Typed absence.** `read` must return, per missing ID, a discriminator: `EXPIRED` (reclaimable) vs `ERASED` (terminal) vs `NEVER_EXISTED`. An agent may heal `EXPIRED`;...",
    "operational_effect": "Downstream effects observed in the same deployment: - **Audit divergence.** The tool's erasure audit reported `r-882` as deleted at `E1`; the physical store held a live copy until a manual sweep 9 days later. Any compliance report generated from the audit log during that window was false. - **Context poisoning across resume.** A checkpoint taken at Turn 43 (..."
  },
  "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": "cbd2b7d0d64f81a99272158d2684cf94688acd719f17a4203ec1450607b642af",
    "verified_classes": [
      "AbsenceKind",
      "ResurrectionViolation",
      "Tombstone",
      "MemoryStore"
    ],
    "verified_functions": [
      "agent_heal",
      "__init__",
      "_next_epoch",
      "write",
      "read",
      "forget"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResurrectionViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
