{
  "schema_version": "1.3.0",
  "slug": "when-must-a-memory-tool-reject-a-write-that-references-a-forgotten-scope",
  "title": "When must a memory tool reject a write that references a forgotten scope?",
  "date_of_record": "2026 November 6",
  "scope": "Applies to memory tool APIs exposing `read`, `write`, and `forget` operations over scoped records (tenant, session, subject) with retention windows and cryptographic erasure (per-scope key destruction). Does not apply to append-only logs with physical deletion guarantees, nor to scopes whose keys are never destroyed.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-a-memory-tool-reject-a-write-that-references-a-forgotten-scope.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-a-memory-tool-reject-a-write-that-references-a-forgotten-scope.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-a-memory-tool-reject-a-write-that-references-a-forgotten-scope.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1444,
    "python_slice_tokens": 284,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"forgotten\": 1. **Logical forgetting** — the record is marked tombstoned and excluded from `read`. The data still exists; its scope key still exists. 2. **Cryptographic forgetting** — the scope key is destroyed. Any ciphertext tagged with that scope's key version is now unrecoverable, whether or not a tombstone exists. The n...",
    "what_was_observed": "A session-scoped agent issued a `write` of a 400-byte summary into scope `sess-7f3a` at T+0. A `forget` for `sess-7f3a` was accepted at T−2s on the control plane; the key-destruction job completed at T+0.8s. The write landed at T+0.1s on a storage shard whose tombstone cache had a 5-second TTL and had not yet observed the forget. The write was encrypted under key version `sess-7f3a@v3`, which had been destroyed at T+...",
    "condition_of_validity": "The WAD invariant holds only if the write path performs a *synchronous* key-version liveness check at encryption time, not a cached one. Specifically: - The writer must resolve the scope's current key version from the authoritative key registry, and that resolution must be linearizable with respect to key destruction. - A cached tombstone is insufficient: th...",
    "decision_boundary": "The decision an instance must make at write time: - **Reject with `ScopeForgottenError`** if the resolved key version is destroyed, *or* if the scope's tombstone is set and no re-key has occurred. Do not silently drop; surface the error to the caller so the agent can decide whether to re-create the scope. - **Reject with `KeyVersionDestroyedError`** if the s...",
    "operational_effect": "Without the synchronous check, forget operations become *eventually* correct at the read path but *never* correct at the audit path: zombie rows accumulate, and the erasure claim degrades from \"provably forgotten\" to \"probably forgotten, modulo propagation.\" For an agent operating under retention compliance, this is the difference between a defensible erasur..."
  },
  "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": "8d9d572dafa97802131f9d31ebc2993173d9aef72fbab2837f8ca366fe3aee1d",
    "verified_classes": [
      "ScopeForgottenError",
      "KeyVersionDestroyedError",
      "KeyVersion",
      "KeyRegistry"
    ],
    "verified_functions": [
      "write_memory",
      "__init__",
      "resolve_live",
      "is_destroyed"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "KeyVersionDestroyedError",
      "ScopeForgottenError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
