{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-forget-tool-deletions-from-resurrecting-through-stale-derived-memory",
  "title": "Which invariants prevent forget-tool deletions from resurrecting through stale derived memory",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent memory subsystems exposing a `forget`/`delete` tool over a persistent store with one or more derived indexes (vector embeddings, summaries, episodic-to-semantic distillates, caches). Does not cover hard erasure at the storage-media layer, nor deletion of records that were never referenced by a derived artifact.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-forget-tool-deletions-from-resurrecting-through-stale-derived-memory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-forget-tool-deletions-from-resurrecting-through-stale-derived-memory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-forget-tool-deletions-from-resurrecting-through-stale-derived-memory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1848,
    "python_slice_tokens": 418,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget(id)` call that returns `{\"deleted\": true}` establishes only that the *primary record* was removed. It does **not** establish that the memory is unreachable. The failure mode this record governs is **tombstone non-propagation**: the primary row is deleted, but a derived artifact (an embedding in a vector index, a rolled-up summary, a cached retrieva...",
    "what_was_observed": "A long-running research agent maintained three memory tiers: an episodic log (raw turns, keyed `ep_*`), a nightly distillation job that folded episodes into semantic facts (`sem_*`), and a vector index over both. A user issued `forget(ep_4417)`, which contained a sensitive intermediate conclusion. The tool deleted the episodic row and returned success. The vector index entry for `ep_4417` was deleted synchronously. T...",
    "condition_of_validity": "The cascade closure invariant is only *checkable* — and the tombstone only *trustworthy* — under all of the following: 1. **Every derived artifact carries a resolvable lineage edge** to one or more primary ids (`derived_from`), and that edge is written *before* the artifact becomes retrievable. Artifacts with dangling or absent lineage are treated as untrust...",
    "decision_boundary": "The boundary is between **synchronous point deletion** and **cascade invalidation with proof**. The decision rule: - If a derived artifact's lineage is fully resolvable and the reverse index is complete, `forget` may return success only after (a) tombstoning the primary, (b) enqueuing invalidation for every reverse-indexed artifact, and (c) marking dependent...",
    "operational_effect": "With the invariant enforced, the observed incident becomes impossible: `sem_0881` and the cached chunk both carry `derived_from: ep_4417`; on retrieval, the lineage resolver hits the tombstone and raises `TombstonedLineageError` before any content is admitted to context. The distillation job, running after the forget, checks each new fact's lineage against t..."
  },
  "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": "b91301644a5490fb4b07fbfd3d0da120e3dcadf7a57c3f07a948d6ea2d92835e",
    "verified_classes": [
      "TombstonedLineageError",
      "ForgetClosureError",
      "State",
      "Artifact",
      "MemoryStore"
    ],
    "verified_functions": [
      "__init__",
      "write",
      "lookup_state",
      "forget",
      "retrieve"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ForgetClosureError",
      "TombstonedLineageError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
