{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-scoped-retention-memory-tools-from-resurrecting-forgotten-records-through-derived-summaries",
  "title": "Which invariants prevent scoped-retention memory tools from resurrecting forgotten records through derived summaries",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent memory services exposing read/write/forget tool APIs with per-scope TTLs and right-to-be-forgotten (RTBF) erasure across episodic and distilled semantic stores. Does not cover TTL expiry of the raw episodic log alone, nor storage-layer deletion guarantees (WAL, backups) below the tool API.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-retention-memory-tools-from-resurrecting-forgotten-records-through-derived-summaries.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-retention-memory-tools-from-resurrecting-forgotten-records-through-derived-summaries.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-retention-memory-tools-from-resurrecting-forgotten-records-through-derived-summaries.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2459,
    "python_slice_tokens": 568,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget(scope, key)` call and a TTL expiry are not the same operation, even though both remove a record from the live read path. TTL expiry is a *retention* event: the record ages out because its scope's retention window elapsed, and downstream derived artifacts (summaries, embeddings, entity graphs) that were built from it remain valid under the assumptio...",
    "what_was_observed": "A long-running research agent maintained two scopes: `episodic/session-*/` with a 7-day TTL, and `semantic/user-profile/` with no TTL (user-scoped, retained until explicit erasure). A nightly distillation job read the day's episodic records, called an LLM to produce fact-triples, and wrote them into `semantic/user-profile/` with a `derived_from` pointer to the source episodic record IDs. At T+1 day, the operator issu...",
    "condition_of_validity": "The invariant holds only if the memory tool enforces a **derived-closure** property: for any record `r` erased under RTBF, every derived artifact `d` whose generation consumed `r` must be either (a) erased in the same transaction, or (b) provably independent of `r`'s prohibited content. Because derivation is done by an LLM with finite context and lossy summa...",
    "decision_boundary": "The boundary is drawn at **whether a derived artifact's ancestry is tracked**. If the memory tool records full `derived_from` provenance for every artifact — including context sources — then transitive erasure is computable and the invariant is enforceable. If provenance is partial (only subject sources recorded, as in Trace A), the tool cannot distinguish a...",
    "operational_effect": "The practical consequence is that `forget()` becomes a distributed transaction over the derivation graph, not a single-store `DELETE`. Its latency scales with descendant count, not row count, and its success criterion is \"no live artifact reachable from any erased source,\" which must be verified by a post-erasure ancestry query, not assumed from the delete c..."
  },
  "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": "f19d54b6fdd9774f369449602177cfe83e910147aafdd301c9bc981283c275cf",
    "verified_classes": [
      "ErasureInvariantError",
      "RetentionEvent",
      "Artifact",
      "MemoryStore"
    ],
    "verified_functions": [
      "run_erasure_scenario",
      "__init__",
      "write",
      "_descendants",
      "forget",
      "read"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 7,
    "raised_exceptions": [
      "ErasureInvariantError"
    ],
    "sample_fail_closed_invariants": [
      "assert result['conservative'] is False",
      "resurrection: s2 survived erasure of its ancestor e1",
      "incomplete provenance: exact transitive erasure impossible; refusing predicate-only deletion on RTBF request"
    ],
    "stdlib_dependencies": [
      "__future__",
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
