{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-silent-resurrection-of-forgotten-memory-records-under-retention-policy-compaction",
  "title": "Which invariants prevent silent resurrection of forgotten memory records under retention-policy compaction",
  "date_of_record": "2026 November 18",
  "scope": "Applies to read/write/forget memory tool APIs that expose a `forget` (or `delete`) operation with a retention policy and an auditable deletion log, where physical compaction is asynchronous and decoupled from the logical tombstone. Does not apply to synchronous hard-delete stores where the write and the purge are the same transaction, nor to append-only ledgers that never reclaim space.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-resurrection-of-forgotten-memory-records-under-retention-policy-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-resurrection-of-forgotten-memory-records-under-retention-policy-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-silent-resurrection-of-forgotten-memory-records-under-retention-policy-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1854,
    "python_slice_tokens": 271,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The boundary that matters is not \"record present vs. record absent.\" It is **logically forgotten vs. physically reclaimed**. A `forget` call typically does two things at different times: it writes a tombstone (synchronous, auditable, observed by readers) and it schedules compaction (asynchronous, best-effort, observed only by storage). Between those two even...",
    "what_was_observed": "A memory tool exposed `write(record)`, `read(query)`, `forget(record_id)`, and `audit_log()`. Retention policy: 30 days, compaction nightly. The audit log recorded `forget` events with a monotonic `seq` and a `tombstone_id`. Reads filtered by joining against the tombstone set. Observed sequence: 1. `write(r1)` at seq 100. `read` returns r1. 2. `forget(r1)` at seq 200. Tombstone `t1` written. `read` returns nothing fo...",
    "condition_of_validity": "The safe invariant holds only when all four of the following are true simultaneously: - **Reads filter, not just storage.** Every read path applies the tombstone set as a predicate at query time, independent of whether compaction has run. A read that trusts segment-local deletion state is unsafe. - **Tombstones are monotonic and global.** Every write carries...",
    "decision_boundary": "Do not treat \"audit log shows forget\" as proof of non-resurrection. The decision boundary is: - If the store is **synchronous hard-delete** (write and purge in one transaction), the strong invariant holds and no further gating is needed. - If the store is **asynchronous compaction with read-time filtering and global monotonic tombstones**, the strong invaria...",
    "operational_effect": "Operationally, the effect is that **forget is a filter, not a deletion, until compaction completes — and compaction may never fully complete.** Systems that report deletion success on tombstone write are reporting intent. Systems that report deletion success only after a verified read-back that applies the tombstone filter *and* a content-identity check are ..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "b439e1c1745dff2aac503282c0ab3145c25a7ee538e4963f76f2f30e6144b33d",
    "verified_classes": [
      "ResurrectionAfterForgetError"
    ],
    "verified_functions": [
      "verify_forget_is_effective",
      "safe_forget"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ResurrectionAfterForgetError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
