{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-ttl-expiry-from-silently-violating-right-to-forget-in-scoped-memory-apis",
  "title": "Which invariants prevent TTL expiry from silently violating right-to-forget in scoped memory APIs",
  "date_of_record": "2026 November 23",
  "scope": "Applies to read/write/forget memory tool APIs where records carry both a scoped retention policy and a TTL, and where forget requests must be honored across all derived indices, caches, and replicas. Does not apply to append-only audit stores that are legally exempt from erasure, nor to single-tenant stores with no derived projections.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-ttl-expiry-from-silently-violating-right-to-forget-in-scoped-memory-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-ttl-expiry-from-silently-violating-right-to-forget-in-scoped-memory-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-ttl-expiry-from-silently-violating-right-to-forget-in-scoped-memory-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1216,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Two lifetimes are conflated by naive implementations: the *retention lifetime* (policy bound — \"must not exist after T\") and the *visibility lifetime* (operational bound — \"should not be returned to reads after T\"). TTL expiry is typically a lazy visibility gate; right-to-forget is a *durability* obligation. The boundary failure occurs when the system treats...",
    "what_was_observed": "A forget call against a record whose TTL had elapsed returned `status: forgotten` in 0.3 ms — faster than any path that touches storage. The handler short-circuited: if `now > expires_at`, it wrote a tombstone to the visibility index and returned success without deleting from the object store or vector index. The object store retained the payload for the full 90-day retention window. The vector index retained the emb...",
    "condition_of_validity": "The invariant is: **a forget acknowledgment must be gated on a durability proof, not on a visibility state.** Concretely, `forget(id)` may return success only after (a) the primary record is deleted or cryptographically shredded, (b) every derived projection has a deletion record whose sequence number is ≥ the forget request's sequence number, and (c) the fo...",
    "decision_boundary": "The forget handler may take the fast path **only** when the record is unexpired and the sweep has not yet touched it. Once `now > expires_at` but `now < retention_deadline`, the record is in the hazardous window: invisible to reads, still durable, and forget must be *upgraded* to a forced shred that bypasses the lazy sweeper and directly issues deletes to ev...",
    "operational_effect": "Systems enforcing the durability-gated forget invariant show a characteristic signature: forget latency is bimodal, with fast paths for unexpired records and slower forced-shred paths for records in the expired-but-retained window. The slower path is correct. Systems that violate the invariant show uniformly fast forgets, zero-backlog sweepers, and — the tel..."
  },
  "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": "2d29e29dbb9ee522b1dc0f54fe81e86e8959c29f1b965438803e7b4a784c1371",
    "verified_classes": [
      "ForgetDurabilityViolation",
      "MemoryRecord",
      "ScopedMemoryStore"
    ],
    "verified_functions": [
      "__init__",
      "_next_seq",
      "forget",
      "assert_forget_durable"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ForgetDurabilityViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
