{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-scoped-forget-apis-from-silently-resurrecting-deleted-memory-through-derived-indexes",
  "title": "Which invariants prevent scoped-forget APIs from silently resurrecting deleted memory through derived indexes",
  "date_of_record": "2026 November 15",
  "scope": "Applies to read/write/forget memory tool APIs where deletion is scoped (by principal, tag, or time window) and where reads are served through one or more derived structures (vector indexes, summary caches, inverted indices, embedding clusters) rather than directly from the authoritative store. Does not apply to single-store systems with no derived index, nor to whole-namespace wipe operations where the scope covers every derived structure by construction.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-apis-from-silently-resurrecting-deleted-memory-through-derived-indexes.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-apis-from-silently-resurrecting-deleted-memory-through-derived-indexes.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-forget-apis-from-silently-resurrecting-deleted-memory-through-derived-indexes.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1736,
    "python_slice_tokens": 414,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A scoped `forget(scope)` call is a request to make a *set* of records unreadable through *every* read path. The authoritative record store and the derived indexes are two different read paths. The invariant that matters is not \"the record is deleted\" but \"no read path can reconstruct the record after deletion.\" These diverge precisely when the derived index ...",
    "what_was_observed": "A memory service exposed `write(principal, text)`, `read(principal, query)`, and `forget(principal, predicate)`. Forgets were applied to the primary table and returned `{\"deleted\": N}` synchronously. Reads were served by a hybrid retriever: a vector index over chunk embeddings plus a keyword index over token n-grams, with a post-retrieval filter that dropped chunks whose `principal` no longer matched a live row. Afte...",
    "condition_of_validity": "The invariant \"forget is complete\" holds only if, for every derived structure `D` and every read path `R` that consults `D`, one of the following is true: - `D` is updated in the same transaction/epoch as the authoritative delete, **and** `R` filters on the authoritative tombstone *before* computing any aggregate or neighbour expansion, not after; or - `D` c...",
    "decision_boundary": "The boundary between a sound and an unsound scoped-forget implementation is whether the tombstone is *consulted at derivative-use time* or *applied at result-emission time*. Concretely: - If `total_matches`, scores, or ranks are computed over the unfiltered index and the filter is applied to the returned list, the implementation is unsound for aggregates eve...",
    "operational_effect": "Operationally, this changes how forget must be tested and how guarantees must be stated. A forget test that asserts \"direct read returns empty\" passes on a system that leaks through aggregates and neighbours. The correct test asserts that *every* read path — including count metadata, ranking side channels, neighbour payloads, and cache hits on re-ingest — is..."
  },
  "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": "1dd31ac211198b2bef67300aca2be994c04af8bda2de9dc9be3c3f2345cee8f0",
    "verified_classes": [
      "ScopedForgetViolation",
      "MemoryRecord",
      "DerivedIndex"
    ],
    "verified_functions": [
      "forget",
      "guarded_read",
      "__init__",
      "__init__",
      "_live",
      "count_matches",
      "neighbours",
      "summary_for",
      "_similarity"
    ],
    "verified_functions_count": 9,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ScopedForgetViolation"
    ],
    "sample_fail_closed_invariants": [
      "aggregate count leaks forgotten records outside scope"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
