{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-reconcile-tombstoned-memory-erasure-against-a-retention-scoped-read-cache-before-serving-a-resumed-task",
  "title": "Where must an instance reconcile tombstoned memory erasure against a retention-scoped read cache before serving a resumed task?",
  "date_of_record": "2026 November 19",
  "scope": "Applies to LLM agent instances that persist episodic/semantic state through a memory tool API exposing write, read, and forget operations with scoped retention windows and right-to-be-forgotten (RTBF) erasure. Does not cover purely in-context scratchpads without external persistence, nor deletion of whole namespaces at the storage layer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-tombstoned-memory-erasure-against-a-retention-scoped-read-cache-before-serving-a-resumed-task.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-tombstoned-memory-erasure-against-a-retention-scoped-read-cache-before-serving-a-resumed-task.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-reconcile-tombstoned-memory-erasure-against-a-retention-scoped-read-cache-before-serving-a-resumed-task.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1917,
    "python_slice_tokens": 472,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"the model forgot to call `forget`.\" It is the divergence between two independently authoritative stores of the *same* memory record: the **durable backend** (where erasure tombstones land) and the **instance-local read cache** (where the deserialized record still lives, keyed by content hash, with its own TTL). Erasure is a *write* to the...",
    "what_was_observed": "A long-running research agent used a memory tool with three verbs: `write(scope, key, value, retention)`, `read(scope, key)`, and `forget(scope, key)`. `forget` wrote a tombstone row `{key, erased_at, reason}` and hard-deleted the value after a grace window. Reads consulted an in-process LRU cache (TTL 900s, capacity 2048 entries) before hitting the backend; cache entries were keyed by `(scope, key, content_hash)` an...",
    "condition_of_validity": "The invariant that must hold is: > For any `read(scope, key)` served to an agent instance, if a tombstone exists for `(scope, key)` with `erased_at <= now`, the read MUST fail closed — regardless of cache state, content-hash match, or retention window on the cache entry. This holds only when all four of the following are true; break any one and the boundary ...",
    "decision_boundary": "The decision the runtime must make on every cache hit is binary and must not be delegated to the model: - **Serve** only if `tombstone_index.max_epoch(scope) <= instance.checkpoint_epoch` AND no tombstone exists for the exact key. - **Fail closed** (raise, force backend round-trip, invalidate cache entry) if the scope's erasure epoch advanced past the instan...",
    "operational_effect": "Enforcing the invariant changes three things: - **Resume latency increases** for scopes with epoch advance (full cache rebuild, ~O(scope size) backend reads). This is the correct trade: a stale cache in an RTBF-governed scope is a compliance defect, not a performance optimization. - **Provenance writes become mandatory** for any synthesis step, adding a `sou..."
  },
  "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": "89f2796c2a8b841d24d6d9513bc888a40aa8b8252190658dbf8d88e1d11dffcc",
    "verified_classes": [
      "ErasureBoundaryViolation",
      "Tombstone",
      "ScopeState",
      "ScopedMemory"
    ],
    "verified_functions": [
      "resume_task",
      "bump",
      "__init__",
      "_scope",
      "write",
      "forget",
      "read"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ErasureBoundaryViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
