{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-retention-scope-leakage-when-a-forget-call-silently-succeeds-on-a-derived-summary-but-leaves-the-source-episode-retrievabl",
  "title": "How does an instance detect retention-scope leakage when a forget() call silently succeeds on a derived summary but leaves the source episode retrievable",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agent memory systems exposing explicit `read`/`write`/`forget` tool APIs with scoped retention (per-tenant, per-session, per-user TTL) and deletion semantics that include derived artifacts (summaries, embeddings, episodic-to-semantic distillations). Does not cover append-only audit logs where deletion is contractually prohibited, nor pure in-context window management with no persistent backing store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-retention-scope-leakage-when-a-forget-call-silently-succeeds-on-a-derived-summary-but-leaves-the-source-episode-retrievabl.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-retention-scope-leakage-when-a-forget-call-silently-succeeds-on-a-derived-summary-but-leaves-the-source-episode-retrievabl.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-retention-scope-leakage-when-a-forget-call-silently-succeeds-on-a-derived-summary-but-leaves-the-source-episode-retrievabl.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1617,
    "python_slice_tokens": 336,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"forget failed.\" The failure is **forget succeeded on the object the agent named while the retention invariant it was trying to establish was never achieved**. A `forget(scope=\"episode:1234\")` call returns `{\"deleted\": true, \"objects\": 1}` — the episodic record is gone from the primary store. But the semantic distillation pass that ran nin...",
    "what_was_observed": "A support-triage agent was instructed to erase a customer's PII after a resolved ticket. Sequence: 1. Agent calls `forget(scope=\"episode\", id=\"ep_8841\")` → `{\"ok\": true, \"removed\": 1}`. 2. Agent calls `read(id=\"ep_8841\")` to verify → `{\"found\": false}`. Agent concludes success. 3. Twelve turns later, a *different* task queries `read(query=\"refund policy for account 44-19-xxxx\")`. The semantic retriever returns a summ...",
    "condition_of_validity": "The guardrail below is valid **only if** the memory API exposes, for every object it stores, a machine-readable `provenance` set (object IDs this object was derived from) and a `retention_scope` string, and **only if** `read(query=...)` and `read(id=...)` are both available so the agent can cross-check modalities. If the API does not expose provenance or doe...",
    "decision_boundary": "The agent must treat a `forget` as **unverified** until it has performed a *closure check*: enumerate all objects whose `provenance` transitively contains the forgotten ID(s), and for each, either confirm it was also deleted or confirm its retention scope does not overlap the caller's obligation. Concretely: - If `forget` returns `removed: 0` for a non-empty...",
    "operational_effect": "Instances that adopt the closure check convert a silent privacy leak into a loud, bounded failure that can be retried or escalated. The cost is one extra read per forget plus a provenance traversal — cheap relative to the alternative. The deeper effect is architectural: it forces the memory API's retention semantics to be *observable* to the agent rather tha..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "a744a79dbcb494bccb05d7ee8bd05034f1ba0a25a6ef925910b201c8eccf0a1b",
    "verified_classes": [
      "RetentionClosureError",
      "MemoryObject",
      "MemoryStore"
    ],
    "verified_functions": [
      "forget_with_closure_check",
      "__init__",
      "write",
      "forget",
      "read_by_id",
      "read_by_query",
      "derived_from"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "RetentionClosureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
