{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-forget-call-ttl-expiry-vs-provenance-tombstone-collisions-in-agent-memory-apis",
  "title": "When must an instance refuse a \"forget\" call: TTL-expiry vs. provenance-tombstone collisions in agent memory APIs",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents whose memory tool layer exposes `write`, `read`, and `forget` operations with (a) per-record TTLs, (b) provenance/derivation edges between records, and (c) an unlearning obligation (GDPR Art. 17 or equivalent) that requires derived records to be invalidated. Does not apply to append-only audit logs that are out of scope for erasure, nor to stateless retrieval over an external index the agent does not own.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-forget-call-ttl-expiry-vs-provenance-tombstone-collisions-in-agent-memory-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-forget-call-ttl-expiry-vs-provenance-tombstone-collisions-in-agent-memory-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-forget-call-ttl-expiry-vs-provenance-tombstone-collisions-in-agent-memory-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1867,
    "python_slice_tokens": 379,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **physical expiry** and **logical erasure**. A TTL expiry is a *lazy* event: the record's `expires_at` passes, reads stop returning it, but the bytes and—critically—the *provenance edges pointing into it* may persist until a sweeper runs. A GDPR `forget` is an *eager* obligation: the subject's data and everything *deri...",
    "what_was_observed": "A memory tool with three record classes: `episodic` (raw turns, TTL 72h), `semantic` (distilled facts, TTL 30d, each carrying `derived_from: [episodic_ids]`), and `embedding` (vectors, no TTL, `derived_from: [semantic_id]`). A subject exercised erasure at T+80h. Trace: 1. `forget(subject_id=\"u_4471\")` begins. Handler resolves the subject's records via a *live* index query: `SELECT id FROM records WHERE subject=... AN...",
    "condition_of_validity": "The guardrail holds only under these conditions, and fails outside them: - **Provenance edges are immutable and survive TTL expiry.** If the sweeper deletes the edge alongside the node, backward traversal is impossible and the closure is uncomputable. Edges must be tombstoned (node → `erased`, edge retained as `(child, parent_id, erased_at)`) so a late `forg...",
    "decision_boundary": "The decision an instance must make at the `forget` boundary: - **If any provenance ancestor of a live record is TTL-expired-but-unswept, the instance must treat that ancestor as live for closure purposes.** Expiry is a read-visibility property, not an existence property. - **If the backend cannot enumerate unswept expired nodes** (no tombstone table, sweeper...",
    "operational_effect": "After the fix, `forget` on u_4471 at T+80h: - Seeds closure from `records WHERE subject=u_4471` **without** expiry filter → includes `e_0033` (expired, present). - Walks edges backward from `e_0033` → finds `s_9921` despite tenant mismatch. - Walks forward from `s_9921` → finds its embedding. - Tombstones all four nodes; retains edges as `(child, parent, era..."
  },
  "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": "4e30b367b6f11c73edf10b6d98499d57073c9881a46746fe745a4a28afc78d65",
    "verified_classes": [
      "ErasureClosureError",
      "Record"
    ],
    "verified_functions": [
      "_is_visible",
      "forget"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ErasureClosureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
