{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-forget-before-it-can-be-told-it-has-forgotten-the-retention-clock-vs-deletion-witness-inversion-in-memory-tool-apis",
  "title": "When must an instance forget before it can be told it has forgotten: the retention-clock vs. deletion-witness inversion in memory tool APIs",
  "date_of_record": "2026 November 18",
  "scope": "Applies to memory tool APIs that expose `read`/`write`/`forget` verbs with (a) a retention policy expressed as a wall-clock or logical-clock TTL and (b) a verifiable-deletion contract returning a tombstone or deletion witness. Does not apply to append-only stores with no deletion surface, nor to stores whose deletion is a pure physical unlink with no retention metadata.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-forget-before-it-can-be-told-it-has-forgotten-the-retention-clock-vs-deletion-witness-inversion-in-memory-tool-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-forget-before-it-can-be-told-it-has-forgotten-the-retention-clock-vs-deletion-witness-inversion-in-memory-tool-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-forget-before-it-can-be-told-it-has-forgotten-the-retention-clock-vs-deletion-witness-inversion-in-memory-tool-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1702,
    "python_slice_tokens": 534,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Two clocks govern a `forget` call: the **retention clock** (when the policy says the record *may* be purged) and the **witness clock** (when the store can *prove* the record is gone). The non-obvious invariant is that these are not ordered by construction. A store can emit a deletion witness while the retention clock still considers the record live, and it c...",
    "what_was_observed": "In a replicated memory tool with per-shard retention TTLs and a tombstone-based witness, the following sequence reproduced deterministically under clock skew of ≥ TTL/2 between the writer shard and a read replica: 1. `write(k, v)` at logical time `t0` on shard A; retention expiry `t0 + TTL` recorded in A's metadata. 2. `forget(k)` at `t0 + ε` on shard A. A emits witness `W = (k, tombstone_epoch, hash(v))` and marks t...",
    "condition_of_validity": "A deletion witness `W` is a sound proof that a `read(k)` will never return `v` **only if** all of the following hold at the moment of the read: - `W.tombstone_epoch` ≥ the epoch of every replica reachable by the read path (i.e., tombstone replication has converged, not merely been issued). - The read path consults the tombstone set *before* the retention-exp...",
    "decision_boundary": "The operational fork is precise: - **If the consumer requires read-your-deletes (RYD) semantics** (e.g., a right-to-be-forgotten compliance check that must fail closed), the instance must *not* treat an issued witness as deletion. It must either (a) block `read` on `k` locally from `forget`-issue time, or (b) require a convergence token and refuse to report ...",
    "operational_effect": "Downstream, this manifests as: compliance audits that pass on witness presence while data is still readable on lagging replicas (a false-negative for deletion); cache layers that trust the witness and re-populate from a replica that has not converged (resurrection); and `read`-after-`forget` tests that pass on the writer shard and fail intermittently on read..."
  },
  "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": "f86024a829d50ba2305c0d44562fadc7c0cca0c7b241369c5773c0440e9c96c0",
    "verified_classes": [
      "DeletionWitnessInversion",
      "Witness",
      "Replica",
      "MemoryTool"
    ],
    "verified_functions": [
      "can_serve",
      "__init__",
      "write",
      "forget",
      "read",
      "assert_deleted"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "DeletionWitnessInversion"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
