{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-distinguish-a-forgotten-memory-key-from-a-never-written-one-tombstone-semantics-at-the-read-write-forget-boundary",
  "title": "How should an instance distinguish a forgotten memory key from a never-written one: tombstone semantics at the read/write/forget boundary",
  "date_of_record": "2026 November 17",
  "scope": "Applies to persistent agent memory tools exposing `read`, `write`, and `forget` operations over a keyed store where forgetting is expected to be observable and durable. Does not apply to append-only event logs, where deletion is modeled as a derived view and the underlying record is never removed.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-forgotten-memory-key-from-a-never-written-one-tombstone-semantics-at-the-read-write-forget-boundary.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-forgotten-memory-key-from-a-never-written-one-tombstone-semantics-at-the-read-write-forget-boundary.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-distinguish-a-forgotten-memory-key-from-a-never-written-one-tombstone-semantics-at-the-read-write-forget-boundary.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1584,
    "python_slice_tokens": 403,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A keyed memory store has three distinguishable states per key, not two: **absent** (never written), **present** (holds a value), and **forgotten** (was written, then explicitly forgotten). Most naive implementations collapse *absent* and *forgotten* into a single \"not found\" return because both are represented by the absence of a row. This is the boundary fa...",
    "what_was_observed": "In a persistent agent running against a memory tool whose `forget` implementation issued a hard `DELETE` from the backing table, three failure modes surfaced in sequence: 1. **Resurrection on read-modify-write.** A planning loop read `project.constraints`, found it absent (post-forget), and treated that as license to re-populate it from the conversation transcript. The forgotten constraint re-entered memory within on...",
    "condition_of_validity": "Tombstone semantics are the correct choice when **all** of the following hold: - Reads of a forgotten key are possible after the forget (i.e., the agent or a peer can re-issue `read(k)`). - Some writer can act on a \"not found\" result by re-writing the key (read-modify-write loops, re-derivation from context, retry logic). - The value being forgotten carries ...",
    "decision_boundary": "The decision is not \"tombstone or delete.\" It is **\"what is the retention horizon of the negative assertion, and who is obligated to honor it?\"** Three concrete boundaries: - **Retention horizon ≥ max reader staleness.** The tombstone must outlive the slowest cache, the longest in-flight read, and the longest compaction cycle. If you cannot bound these, you ...",
    "operational_effect": "With three-valued reads and tombstone-backed forget, the resurrection failure mode disappears: the planning loop reads `Forgotten`, which is not a license to re-derive, and the constraint stays dead. The cost is unbounded tombstone growth unless a retention policy is enforced, so pair the tombstone with a `forgotten_at` timestamp and a sweeper that only coll..."
  },
  "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": "76225cd83f9872620d6e7c5773f42ef61baa9cd7b24e5b227fa2da3910cfb611",
    "verified_classes": [
      "MemoryLifecycleError",
      "ReadResult",
      "TombstoneStore"
    ],
    "verified_functions": [
      "derive_from_context",
      "__init__",
      "write",
      "forget",
      "read",
      "sweep_tombstones"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "MemoryLifecycleError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
