{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-to-forget-provenance-tracked-retention-tombstones-and-the-dangling-derivation-boundary-in-read-write-forget-memory-tool-a",
  "title": "When must an instance refuse to forget: provenance-tracked retention tombstones and the dangling-derivation boundary in read/write/forget memory tool APIs",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agents whose memory is manipulated through explicit tool calls (`memory.read`, `memory.write`, `memory.forget`) where each record carries provenance edges and a retention policy. Does not apply to implicit context-window eviction, embedding-similarity pruning, or summarization-based compression, which lack an explicit forget primitive.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-forget-provenance-tracked-retention-tombstones-and-the-dangling-derivation-boundary-in-read-write-forget-memory-tool-a.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-forget-provenance-tracked-retention-tombstones-and-the-dangling-derivation-boundary-in-read-write-forget-memory-tool-a.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-to-forget-provenance-tracked-retention-tombstones-and-the-dangling-derivation-boundary-in-read-write-forget-memory-tool-a.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1738,
    "python_slice_tokens": 334,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats `memory.forget(id)` as a single atomic delete: the record is gone, and any derived state is the caller's problem. The correct model treats forgetting as a *retention-governed mutation of a provenance graph*, where deleting a node can strand its dependents. The boundary failure is not \"the record was deleted\" — it is \"the record was del...",
    "what_was_observed": "An agent maintains a working memory of derived facts. Each `memory.write` accepts a `provenance` list referencing parent record IDs and a `retention` class (e.g., `session`, `ephemeral`, `durable`). A `memory.forget(id, reason)` call enforces retention: it deletes a record whose retention class has expired, or that the operator explicitly targets. The failure trace, reproduced across three runs: 1. Agent writes recor...",
    "condition_of_validity": "The invariant that must hold for a provenance-tracked forget API to be sound: > **No live (non-forgotten) record may reference, as an evidential ancestor, a record that has been forgotten without leaving a tombstone at the same ID.** Formally, for every live record `r` and every `p ∈ provenance(r)`: `p` must resolve to either (a) a live record, or (b) a tomb...",
    "decision_boundary": "The decision the forget path must make, per target record, is a three-way branch, not a boolean: The critical, non-obvious rule: **when a dependent has a strictly longer retention class than its ancestor, the ancestor's expiry must not delete — it must tombstone.** The retention sweeper's contract is therefore not \"delete expired records\" but \"convert expire...",
    "operational_effect": "With tombstones and backward retention propagation in place, the verification loop in step 5 changes behavior: `memory.read(R1)` returns `{\"tombstoned\": true, \"reason\": \"ttl_expired\", \"former_hash\": \"...\"}`. The agent can now distinguish \"evidence deliberately retired\" from \"evidence never existed,\" and must mark `R2` as `warrant=retired` rather than serving..."
  },
  "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": "f7ab82cec8ca7787def54b16cc3d7ad2d6200da51ef4e135ffb8090fe68c4eb5",
    "verified_classes": [
      "DanglingProvenanceError",
      "ProvenanceStore"
    ],
    "verified_functions": [
      "__init__",
      "write",
      "forget",
      "read"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "DanglingProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
