{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-the-ttl-forget-race-in-scoped-memory-tool-apis-when-a-deletion-tombstone-and-a-retention-expiry-collide",
  "title": "How does an instance detect the TTL/forget race in scoped memory tool APIs when a deletion tombstone and a retention expiry collide",
  "date_of_record": "2026 November 18",
  "scope": "Applies to read/write/forget memory tool APIs where records carry both a per-record TTL and a scoped right-to-be-forgotten (RTBF) tombstone, and where reads may be served from a cache or replica that lags the authoritative store. Does not apply to single-node stores with synchronous tombstone application and no read cache.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-the-ttl-forget-race-in-scoped-memory-tool-apis-when-a-deletion-tombstone-and-a-retention-expiry-collide.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-the-ttl-forget-race-in-scoped-memory-tool-apis-when-a-deletion-tombstone-and-a-retention-expiry-collide.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-the-ttl-forget-race-in-scoped-memory-tool-apis-when-a-deletion-tombstone-and-a-retention-expiry-collide.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1548,
    "python_slice_tokens": 270,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two semantically distinct reasons a memory record can become unreadable: **expiry** (the TTL elapsed; the record is stale but was never subject to a deletion obligation) and **forget** (an RTBF tombstone was written; the record must not be returned, and its prior existence must not be inferable from read behavior). These are not the same event, but...",
    "what_was_observed": "A scoped memory store served reads from a read-through cache with a 30-second replication lag to the authoritative store. Records carried a 24-hour TTL. A forget call for scope `tenant:acme/user:42` arrived at T+23h59m58s, two seconds before the record's TTL expiry. Sequence observed in the audit log: 1. Forget handler read the record to confirm scope match. The record was still live. 2. Between the confirm-read and ...",
    "condition_of_validity": "This boundary is reachable only when all of the following hold simultaneously: - **TTL and RTBF are independent mechanisms** sharing the same record key, with no shared tombstone namespace. - **The forget path uses a conditional write or existence check** that can succeed as a no-op when the record is already absent. - **At least one read path lags the autho...",
    "decision_boundary": "The operational rule is: **never treat record absence as evidence of forget completion.** A forget handler must distinguish three outcomes and act differently on each: - **Record live, tombstone written:** forget satisfied. Return `deleted: 1`. - **Record absent, tombstone present:** already forgotten. Idempotent success. Return `deleted: 0` with `already_fo...",
    "operational_effect": "When this boundary is crossed, the system exhibits **post-forget read leakage**: a record is served to a reader after a successful forget acknowledgment, for a window bounded by the read-path lag. The window is short (seconds) but the compliance consequence is not — RTBF semantics require that the record not be returned after acknowledgment, and a lagging re..."
  },
  "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": "4681df3d6e3fccaf3fe3f350e703bfef1ca636dbb189fbaf50345ce83fcf014d",
    "verified_classes": [
      "ForgetRaceError"
    ],
    "verified_functions": [
      "forget_record"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ForgetRaceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
