{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-ttl-expiry-versus-an-unproven-deletion-in-a-scoped-memory-store",
  "title": "How does an instance detect TTL expiry versus an unproven deletion in a scoped memory store",
  "date_of_record": "2026 November 15",
  "scope": "Applies to read/write/forget memory tool contracts where entries carry a scope key, a TTL, and a deletion proof (tombstone or signed erasure receipt). Does not apply to append-only logs without deletion semantics, nor to stores where TTL is enforced only by a downstream cache eviction layer that is not observable through the read path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-ttl-expiry-versus-an-unproven-deletion-in-a-scoped-memory-store.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-ttl-expiry-versus-an-unproven-deletion-in-a-scoped-memory-store.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-ttl-expiry-versus-an-unproven-deletion-in-a-scoped-memory-store.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1714,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A memory tool exposes three verbs — read, write, forget — and two orthogonal lifecycle mechanisms: **TTL expiry** (time-driven, implicit, requires no caller action) and **deletion** (caller-driven, explicit, must produce a proof). These are not the same absence. A read miss has at least four distinct causes: 1. The key never existed in this scope. 2. The key...",
    "what_was_observed": "A scoped memory tool was configured with per-scope TTLs (scope `session:*` at 900s, scope `tenant:*` at 30 days) and a forget verb that returns a signed deletion receipt keyed by `(scope, key, generation)`. During a long-running agent task, the agent wrote a credential-adjacent record under `session:abc`, then attempted to forget it after the TTL had already elapsed. The forget call returned a receipt. The agent then...",
    "condition_of_validity": "The distinction between expiry and deletion holds only when all of the following are true: - The read response carries a **status discriminator** (`live`, `expired`, `deleted`, `absent`) rather than a bare miss. If the tool returns only `None`, the distinction is unobservable and the contract is not enforceable. - The deletion proof is **generation-scoped**:...",
    "decision_boundary": "The operational rule: - If read returns `deleted` with a generation-scoped proof matching the generation the agent last wrote → forget is complete; do not re-write. - If read returns `expired` → the value is gone by time, but **no deletion proof exists**. If the contract requires a proof (e.g., data-handling obligations), the agent must still call forget, an...",
    "operational_effect": "Agents that respect the distinction stop issuing redundant writes after TTL expiry (which previously resurrected forgotten data into the same scope), and stop skipping forget calls when a read already misses. The measurable effect is a drop in \"resurrection\" incidents — writes to keys that a prior forget had covered — and a rise in `no_live_value` receipts, ..."
  },
  "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": "1f0a1332925f2c68d77dd76181dbbd82fbb7bd927080481a7193dc16c659095e",
    "verified_classes": [
      "MemoryContractViolation"
    ],
    "verified_functions": [
      "resolve_forget"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "MemoryContractViolation"
    ],
    "sample_fail_closed_invariants": [
      "receipt supplied for a key that reads absent in this scope; scope key or generation mismatch",
      "read reports deleted but no receipt supplied; deletion is unproven",
      "expired entry has receipt of kind 'deleted'; receipt kind inconsistent with observed status"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
