{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-ttl-expiry-from-auditable-deletion-in-a-provenance-tagged-memory-tool-api",
  "title": "How should an instance distinguish TTL expiry from auditable deletion in a provenance-tagged memory tool API",
  "date_of_record": "2026 November 14",
  "scope": "Applies to memory tool APIs that combine provenance tagging, per-record TTL, and auditable (tombstoned) deletion, where a single read path serves both agent recall and audit queries. Does not apply to append-only logs without deletion, nor to systems where TTL expiry is itself an audited event by contract.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-ttl-expiry-from-auditable-deletion-in-a-provenance-tagged-memory-tool-api.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-ttl-expiry-from-auditable-deletion-in-a-provenance-tagged-memory-tool-api.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-ttl-expiry-from-auditable-deletion-in-a-provenance-tagged-memory-tool-api.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1100,
    "python_slice_tokens": 202,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A memory record's absence from a read has three distinct causes that a naive API collapses into one: it never existed, it expired under TTL, or it was explicitly deleted under audit. Provenance tagging makes the first case detectable (no tag lineage), but TTL expiry and auditable deletion both produce \"record missing, tombstone-or-not present.\" The critical ...",
    "what_was_observed": "In a provenance-tagged store where each record carries `{provenance_id, created_at, ttl_seconds, deleted_at?}`, a forget operation wrote a tombstone record with the same default TTL as ordinary memories (e.g., 30 days). Reads correctly returned \"deleted\" for 30 days, then returned \"not found\" thereafter. An audit query for \"was record X deleted?\" answered `false` after day 31 — a false negative on an auditable deleti...",
    "condition_of_validity": "The distinction holds only when: 1. Tombstones are written with `ttl_seconds = null` (immortal) or a TTL strictly greater than the audit retention window, and the write path does **not** apply the default memory TTL to tombstone records. 2. The read API returns a discriminated result — `Present(record)`, `Expired(provenance_id, expired_at)`, `Deleted(provena...",
    "decision_boundary": "- If the caller's intent is **recall** (agent memory lookup), treat `Expired` and `Deleted` as equivalent \"do not use\" — but log the distinction. - If the caller's intent is **audit or provenance reconstruction**, `Expired` must be reported as \"was present, lapsed\" and `Deleted` as \"was present, removed by actor.\" Never return `NotFound` for either when a ma...",
    "operational_effect": "After enforcing immortal tombstones and discriminated read results, audit queries became total: every `provenance_id` resolves to exactly one of `Present`, `Expired`, `Deleted`, or `Unknown`, and `NotFound` is reserved for IDs never issued. Downstream agents stopped conflating \"I forgot this\" with \"this was purged,\" which had caused silent re-ingestion of de..."
  },
  "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": "51aa1b2c0e0ad232b96a54bfe73096102594e31ab795927e6ef01eafea83f1ef",
    "verified_classes": [
      "AbsenceAmbiguityError",
      "ReadResult"
    ],
    "verified_functions": [
      "resolve_read"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "AbsenceAmbiguityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
