{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-retention-decay-from-silently-resurrecting-forgotten-memories-through-vector-index-tombstones",
  "title": "Which invariants prevent retention-decay from silently resurrecting forgotten memories through vector-index tombstones",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent memory subsystems that expose explicit `read`/`write`/`forget` tool APIs backed by a vector or ANN index with per-record retention policies and time-based decay scoring. Does not apply to append-only logs with no delete path, nor to pure KV stores where `forget` is an atomic row delete with no secondary index.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-retention-decay-from-silently-resurrecting-forgotten-memories-through-vector-index-tombstones.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-retention-decay-from-silently-resurrecting-forgotten-memories-through-vector-index-tombstones.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-retention-decay-from-silently-resurrecting-forgotten-memories-through-vector-index-tombstones.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2107,
    "python_slice_tokens": 477,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget` call has two semantically distinct meanings that most memory tool schemas conflate: *tombstoning* (the record is excluded from future reads) and *erasure* (the record's content and its derived index entries no longer exist). Retention policies with decay semantics operate on a third axis — the *score* by which a record competes for retrieval budge...",
    "what_was_observed": "A long-running research agent used a memory tool with the following schema: `write(key, content, ttl, decay_rate)`, `read(query, k, min_score)`, `forget(key)`. The backend was an HNSW index with soft-delete: `forget` set a `deleted_at` flag and a background compactor rebuilt the graph every 500 writes or 10 minutes. Decay was implemented as a per-record score multiplier `exp(-decay_rate * age)`, recomputed lazily at ...",
    "condition_of_validity": "The invariant that prevents this is a **monotone erasure barrier**: for any key `k`, once `forget(k)` returns success, no subsequent `read` may return `k`'s content, regardless of compaction state, cache staleness, or decay-score competition. This must hold *unconditionally* — it cannot depend on the compactor having run, the bitmap being fresh, or the score...",
    "decision_boundary": "The boundary between safe and unsafe designs is whether `forget` is modeled as a *state mutation on the record* or as a *filter applied at read time*. - If `forget` mutates the record (sets a flag) and `read` trusts the index to honor the flag, you are in the unsafe regime: correctness is delegated to the index's internal consistency, which is eventually-con...",
    "operational_effect": "When the erasure barrier holds, the following becomes true and testable: - `forget` is idempotent and its effect is observable immediately: a read issued one microsecond after `forget` returns success cannot contain the key. - Compaction can be paused, reordered, or fail entirely without affecting read correctness — only latency and index size degrade. - Dec..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "f8dce5f240271fff50c44d7a9a60d503bf3ef691b0e75f1ca753faf511c1beec",
    "verified_classes": [
      "ResurrectionError",
      "MemoryRecord",
      "MemoryTool"
    ],
    "verified_functions": [
      "resurrection_probe",
      "__init__",
      "write",
      "forget",
      "_score",
      "read",
      "compact"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResurrectionError"
    ],
    "sample_fail_closed_invariants": [
      "erasure barrier failed: forgotten record returned without compaction"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
