{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-forget-call-has-silently-orphaned-a-derived-memory-it-must-also-erase",
  "title": "How does an instance detect that a \"forget\" call has silently orphaned a derived memory it must also erase",
  "date_of_record": "2026 November 23",
  "scope": "Applies to any agent whose memory subsystem exposes explicit `write`/`read`/`forget` tool APIs where `forget` is expected to implement subject-scoped erasure (GDPR Art. 17-style) over *derived* artifacts (summaries, embeddings, distilled facts, cached tool outputs). Does NOT cover passive TTL eviction, log-rotation retention policies, or erasure of the raw transcript store, which are governed by separate retention invariants.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-forget-call-has-silently-orphaned-a-derived-memory-it-must-also-erase.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-forget-call-has-silently-orphaned-a-derived-memory-it-must-also-erase.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-forget-call-has-silently-orphaned-a-derived-memory-it-must-also-erase.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2019,
    "python_slice_tokens": 396,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the forget call returned an error.\" The failure is that the forget call returned **success** while leaving behind derivative memory records whose provenance chain terminates in the erased subject but whose own content no longer carries the subject identifier. A naive erasure implementation deletes records where `record.subject_id == targe...",
    "what_was_observed": "A long-running assistant agent (14 days uptime, ~9,400 memory records) received an erasure request for subject `u_4471`. The memory tool executed: Note `closure_verified: false` — the tool reported it *did not* check the derivation graph, but the orchestrator treated `status: complete` as terminal and marked the erasure ticket closed. A post-hoc audit replayed the derivation log. Of the 212 deleted records, 41 had be...",
    "condition_of_validity": "The subject-scoped deletion is a valid erasure **iff** every derived record in the store satisfies at least one of: 1. It retains a `subject_id` (or equivalent subject-bearing tag) that the `forget` predicate matches, **or** 2. Its `derived_from` set is queryable and the `forget` implementation performs a transitive closure over it, **or** 3. It was written ...",
    "decision_boundary": "The instance must distinguish three outcomes of a `forget` call, not two: - **Complete**: tagged set deleted AND closure verified empty (`closure_verified: true`, orphan count 0). - **Partial**: tagged set deleted, closure non-empty, orphans enumerated with their `derived_from` chains. This is a *resumable* state — the orchestrator must either re-issue `forg...",
    "operational_effect": "The observable consequence of getting this wrong is not a crash; it is a **latency-shifted leak**. The erasure request closes cleanly, the audit passes (the tagged set is empty), and the residue surfaces days later as retrieval contamination: an unrelated subject's query returns the erased subject's distilled facts, because those facts are still embedded and..."
  },
  "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": "84313341d0ffad0604a6d401e0164e90e3105d702f05fa2a42378a1846d672e0",
    "verified_classes": [
      "UnverifiedErasureError",
      "OrphanedDerivativeError",
      "ForgetResult"
    ],
    "verified_functions": [
      "enforce_erasure"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "OrphanedDerivativeError",
      "UnverifiedErasureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
