{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-retention-scope-resurrection-during-right-to-be-forgotten-erasure-in-agent-memory-tool-apis",
  "title": "Which invariants prevent retention-scope resurrection during right-to-be-forgotten erasure in agent memory tool APIs",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agents that expose read/write/forget memory tool calls with per-record retention scopes and a forget operation intended to enforce erasure. Does not apply to append-only audit logs that are architecturally exempt from forget, nor to stateless single-turn agents with no persistent store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-retention-scope-resurrection-during-right-to-be-forgotten-erasure-in-agent-memory-tool-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-retention-scope-resurrection-during-right-to-be-forgotten-erasure-in-agent-memory-tool-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-retention-scope-resurrection-during-right-to-be-forgotten-erasure-in-agent-memory-tool-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1745,
    "python_slice_tokens": 369,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget(record_id)` call is not a deletion; it is a *tombstone assertion* that must dominate every subsequent read path. The boundary failure is **scope resurrection**: a record erased under one retention scope re-enters the agent's context because a *different* scope class—a derived summary, an embedding index, a cached episodic buffer, or a peer agent's ...",
    "what_was_observed": "An agent wrote an episodic memory `M17` (\"user's home address, scope=session, retention=30d\"). A distillation step at session end produced semantic summary `S4` (\"user resides at <address>, scope=longterm, retention=indefinite\") and an embedding vector `E4` in the vector index, both derived from `M17` but written with `derived_from` recorded only as a soft string tag, not as a lifecycle edge. At day 12 the user invok...",
    "condition_of_validity": "The erasure invariant holds only under all of the following, and fails silently if any is absent: - **Lineage edges are first-class and immutable.** Every derived record stores `parents: [record_id]` written by the store, not by the model. A model-authored `derived_from` string is not a lineage edge. - **Tombstones are transitive at read time.** A read of re...",
    "decision_boundary": "The operational line is: **a forget is complete only when the tombstone set dominates the transitive closure of the record's lineage across every store the agent can read from.** The decision boundary for the agent is therefore: - If `forget` returns success but the lineage closure includes stores the agent cannot enumerate (peer replicas, external caches), ...",
    "operational_effect": "Enforcing lineage-dominating erasure changes three agent behaviors. First, distillation tools must be *erasure-aware*: a distiller that summarizes a tombstoned record must itself be blocked or must emit a tombstoned summary, so the summary store inherits the predicate. Second, the retrieval tool's contract changes from \"return top-k by similarity within scop..."
  },
  "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": "8125a0759e7855515916c4bfa110a762c7a86619b97f26fbb068efeb341e2524",
    "verified_classes": [
      "ErasureResurrectionError",
      "TombstonedWriteError",
      "Record",
      "ScopedMemory"
    ],
    "verified_functions": [
      "distill",
      "fingerprint",
      "__init__",
      "write",
      "forget",
      "_ancestors",
      "read",
      "_scope_allows"
    ],
    "verified_functions_count": 8,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ErasureResurrectionError",
      "TombstonedWriteError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
