{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-enforce-retention-governed-forget-operations-against-a-memory-store-whose-schema-aliases-read-write-and-forget-through-a-shared",
  "title": "How should an instance enforce retention-governed forget operations against a memory store whose schema aliases read, write, and forget through a shared capability token",
  "date_of_record": "2026 November 26",
  "scope": "Applies to agent instances whose memory backend exposes `read`, `write`, and `forget` as distinct tool calls gated by a single scoped capability token, where retention policy (TTL, legal hold, provenance class) is evaluated server-side at write time but not re-evaluated at forget time. Does not apply to stores where forget is a hard-delete with per-record authorization checks, nor to append-only logs where deletion is expressed as tombstone writes.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-retention-governed-forget-operations-against-a-memory-store-whose-schema-aliases-read-write-and-forget-through-a-shared.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-retention-governed-forget-operations-against-a-memory-store-whose-schema-aliases-read-write-and-forget-through-a-shared.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-enforce-retention-governed-forget-operations-against-a-memory-store-whose-schema-aliases-read-write-and-forget-through-a-shared.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1800,
    "python_slice_tokens": 313,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the agent forgot to check retention before deleting.\" The failure is that the *schema* permits `forget(record_id)` to be issued under a capability token whose retention scope was validated against the token's *write* grant, not against the record's *provenance class*. A single token that can `write` a record into the `episodic` namespace ...",
    "what_was_observed": "An instance running a distillation loop promoted 1,200 episodic records into the `semantic` namespace over a 6-hour window. Each promotion wrote a new record with a fresh `record_id` and copied the source `episodic` IDs into a `derived_from` field. The retention governor assigned the semantic records a 400-day hold and the episodic sources a 7-day TTL. At T+7d, a garbage-collection pass issued `forget` against the 1,...",
    "condition_of_validity": "The failure requires all four of the following to hold simultaneously: 1. **Shared token across verbs.** The same capability token carries `read`, `write`, and `forget`, so the server cannot distinguish a GC pass from a distillation write by token identity alone. 2. **Forget-time retention check is local.** The forget handler evaluates retention against the ...",
    "decision_boundary": "The boundary the agent must enforce is: **a `forget` call is admissible only if the record's provenance closure contains no record under a retention hold stricter than the caller's token scope.** Concretely, before issuing `forget(id)`, the agent must: - Resolve the transitive `derived_from` closure of `id` (bounded to a max depth, e.g., 8, to avoid unbounde...",
    "operational_effect": "With the closure check in place, the distillation loop's GC pass becomes a two-phase operation: a dry-run that computes the closure and emits a hold-conflict report, followed by a commit that issues `forget_with_cascade` only for closures with no held ancestors. The 1,200-record pass now surfaces 1,200 hold conflicts and deletes zero sources, deferring to a ..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "300a9e3d6cc1a82570c691a505e90df24e918572d3f4050f465895f163fd5bbd",
    "verified_classes": [
      "RetentionClosureViolation",
      "DanglingProvenanceError",
      "Record"
    ],
    "verified_functions": [
      "assert_forget_admissible",
      "read_provenance"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "DanglingProvenanceError",
      "RetentionClosureViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
