{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-a-scoped-forget-from-silently-resurrecting-memory-via-the-write-ahead-log-during-ttl-expiry",
  "title": "Which invariants prevent a scoped-forget from silently resurrecting memory via the write-ahead log during TTL expiry",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agents whose memory tool API exposes `write`, `read`, and `forget(scope, subject_id)` with per-record TTLs and a right-to-be-forgotten (RTBF) deletion proof. Does not apply to ephemeral in-context scratchpads never persisted, nor to append-only logs where deletion is prohibited by design.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-scoped-forget-from-silently-resurrecting-memory-via-the-write-ahead-log-during-ttl-expiry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-scoped-forget-from-silently-resurrecting-memory-via-the-write-ahead-log-during-ttl-expiry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-a-scoped-forget-from-silently-resurrecting-memory-via-the-write-ahead-log-during-ttl-expiry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1850,
    "python_slice_tokens": 469,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two semantically distinct removal paths in a scoped-retention memory API, and agents routinely conflate them: 1. **TTL expiry** — a *liveness* transition. The record becomes unreadable at wall-clock `expires_at`, but the durable substrate (write-ahead log, snapshot, embedding index) may still hold the bytes. Expiry says \"do not serve this to a read...",
    "what_was_observed": "A long-running research agent wrote episodic notes with a 24h TTL and a retention scope `tenant:acme/session:*`. A user invoked RTBF for `subject_id=u_4471` at T+30h. The agent's forget routine did: `read` returned `None` because the record's `expires_at` had passed. The agent returned success without emitting a forget. Overnight, the compaction job replayed the WAL segment containing the original `write(u_4471, ...)...",
    "condition_of_validity": "The invariant \"an RTBF forget is satisfied\" holds **only if** the forget is keyed on the *durable identity* of the record, not on its *serving-layer visibility*. Concretely, the guardrail requires: - **Forget must be addressable by `subject_id` independent of TTL state.** `forget(scope, subject_id)` must locate records by subject key in the durable index, in...",
    "decision_boundary": "The agent must treat `read(...) is None` as **insufficient evidence of absence** for any RTBF or retention-audit decision. The decision boundary is: - If the operation is a *serving* read → `None` means \"do not serve,\" proceed. - If the operation is a *forget* or *retention assertion* → `None` is **inconclusive**; the agent must call a durable-identity probe...",
    "operational_effect": "Bounding this failure changes three operational behaviors: 1. **Forget latency rises** because `forget` now walks WAL segments and replica snapshots rather than trusting a serving-layer miss. Budget for it; do not run forgets inside a tight token/timeout window where a partial scrub could leave tombstones unwritten. 2. **Proof verification becomes load-beari..."
  },
  "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": "3c6edbfc315579d1424df8d9b4a04982e4db029a8adf50944bf9fc5acbbd7ada",
    "verified_classes": [
      "ResurrectionRiskError",
      "Record",
      "ScopedMemory"
    ],
    "verified_functions": [
      "rtbf_forget",
      "__init__",
      "write",
      "read",
      "exists_durable",
      "forget",
      "compact"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ResurrectionRiskError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
