{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-resurrect-erased-memory-when-a-scoped-forget-tool-returns-success-but-a-cached-embedding-shard-is-re-indexed-by-the-consolidator",
  "title": "Why does an instance resurrect erased memory when a scoped-forget tool returns success but a cached embedding shard is re-indexed by the consolidator?",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agent memory architectures exposing explicit `remember`/`recall`/`forget` tool calls with per-scope TTLs and GDPR-aligned erasure obligations, where a background consolidator re-embeds episodic records into a shared vector index. Does not apply to append-only audit logs that are legally exempt from erasure, nor to single-process agents with no secondary index.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-erased-memory-when-a-scoped-forget-tool-returns-success-but-a-cached-embedding-shard-is-re-indexed-by-the-consolidator.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-erased-memory-when-a-scoped-forget-tool-returns-success-but-a-cached-embedding-shard-is-re-indexed-by-the-consolidator.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-resurrect-erased-memory-when-a-scoped-forget-tool-returns-success-but-a-cached-embedding-shard-is-re-indexed-by-the-consolidator.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1448,
    "python_slice_tokens": 256,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"forget failed.\" The forget tool succeeds at every layer it can observe: the record row is tombstoned, the primary vector is deleted, the tool returns `{\"status\": \"erased\", \"scope\": \"user:8821\", \"records\": 1}`. The boundary lies between **logical erasure** (the record is no longer addressable by key or by primary vector) and **derived-arti...",
    "what_was_observed": "A single-user erasure request against scope `user:8821`. Trace: 1. `t=0ms` — `forget(scope=\"user:8821\", reason=\"gdpr_art17\")` acquires the scope write-lock, tombstones 47 episodic rows, deletes 47 primary vectors from `idx_episodic`, releases lock, returns success. 2. `t=3ms` — consolidator (already mid-sweep, holding a read snapshot taken at `t=-800ms`) completes its summarization batch. The batch input included 6 o...",
    "condition_of_validity": "A `forget` guarantee holds **only if** the following invariant is enforced at write time, not at sweep time: > No write to any derived index may commit a record whose `derived_from` set contains a tombstoned ID, and any tombstone must invalidate in-flight consolidator batches that snapshotted the target. Three concrete requirements: - **Snapshot fencing.** T...",
    "decision_boundary": "The engineer must decide **where the erasure barrier sits** relative to the consolidator: - **Barrier at ingest (chosen).** Consolidator commits are gated by epoch CAS; forget bumps epoch and blocks. Cost: consolidator throughput drops under erasure load, and in-flight batches are wasted work. Benefit: erasure is synchronous and auditable at the moment `forg...",
    "operational_effect": "Post-fix behavior: `forget` returns `{\"status\": \"erased\", \"scope\": \"user:8821\", \"episodic\": 47, \"derived_purged\": 2, \"epoch\": 9134, \"batches_invalidated\": 1}`. The epoch counter is exposed so downstream auditors can prove closure. Recall against the erased entity returns empty with `provenance_check=pass`. The consolidator, on epoch mismatch, logs a `BatchFe..."
  },
  "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": "2f8402781298329ada097404c7e468f1d53e119a8aa7b134df195f552cd117cd",
    "verified_classes": [
      "ErasureClosureError",
      "ScopeState",
      "MemoryStore"
    ],
    "verified_functions": [
      "consolidator_batch",
      "__init__",
      "_scope",
      "forget",
      "commit_derived"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ErasureClosureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
