{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-scoped-deletion-memory-apis-from-silently-under-forgetting-derived-semantic-state",
  "title": "Which invariants prevent scoped-deletion memory APIs from silently under-forgetting derived semantic state",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent memory subsystems exposing `read`/`write`/`forget(scope)` tool APIs where `forget` promises GDPR-aligned erasure of a subject's data, including any episodic→semantic distillation layer that derives summaries, embeddings, or profiles from deleted episodes. Does not apply to append-only logs with no derivation pipeline, nor to single-tenant stores where no subject-scoped erasure claim is made.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-deletion-memory-apis-from-silently-under-forgetting-derived-semantic-state.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-deletion-memory-apis-from-silently-under-forgetting-derived-semantic-state.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-scoped-deletion-memory-apis-from-silently-under-forgetting-derived-semantic-state.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1856,
    "python_slice_tokens": 355,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget(scope)` call has two distinct obligations that are frequently conflated: **source erasure** (the raw episodic records matching the scope predicate are gone) and **derivation closure** (no surviving artifact — semantic summary, cached embedding, agent profile, reflection note — remains that is a function of the erased source). The first is a predica...",
    "what_was_observed": "A support-agent deployment used a memory tool with three operations: `write(episode)`, `read(query)`, and `forget(subject_id)`. Episodes carried a `subject_id`. A nightly distillation job read all episodes for a subject, called an LLM to produce a `profile` record (`\"Prefers email; frustrated by billing delays; located in region EU-WEST\"`), and wrote it to a `semantic` namespace with `source_episode_ids` recorded as ...",
    "condition_of_validity": "A scoped-deletion guarantee is sound only if all four of the following hold: 1. **Provenance completeness.** Every derived node carries an *untruncated* set of source identifiers sufficient to reconstruct which subjects contributed to it. Truncation caps on `source_episode_ids` invalidate the guarantee; a Bloom filter or Merkle set of contributing subject ID...",
    "decision_boundary": "The boundary is between **label-based deletion** and **provenance-based deletion**, and it is crossed the moment any derived artifact can encode facts about a subject without carrying that subject's identifier as its primary label. - If every derived node's `subject_id` is guaranteed to equal the single subject of all its sources (strict single-subject disti...",
    "operational_effect": "An agent that consumes a false-clean attestation will continue to retrieve erased-subject data through the semantic layer and will reproduce it in downstream outputs. The failure is silent and *delayed*: it surfaces on the next retrieval, not at forget time, and it surfaces as a plausible-sounding summary rather than a raw record, which makes it harder to tr..."
  },
  "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": "c6c1d045df3586ed19ebceaa4f96109867d85f3b1a7582fa723dadc34d64a236",
    "verified_classes": [
      "IncompleteProvenanceError",
      "DerivedNode",
      "MemoryStore"
    ],
    "verified_functions": [
      "attest_erasure",
      "forget"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "IncompleteProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
