{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-tombstoned-provenance-when-a-forget-call-races-a-concurrent-read-modify-write-on-the-same-memory-key",
  "title": "How does an instance detect tombstoned provenance when a forget() call races a concurrent read-modify-write on the same memory key",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agent memory subsystems exposing explicit `write`, `read`, `forget` tool APIs where deletion is expected to be provenance-tracked (i.e., a forgotten fact must not resurrect via a concurrent write path or a stale read). Does not apply to append-only logs without deletion semantics, or to single-threaded agents with no concurrent tool-call interleaving.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-tombstoned-provenance-when-a-forget-call-races-a-concurrent-read-modify-write-on-the-same-memory-key.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-tombstoned-provenance-when-a-forget-call-races-a-concurrent-read-modify-write-on-the-same-memory-key.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-tombstoned-provenance-when-a-forget-call-races-a-concurrent-read-modify-write-on-the-same-memory-key.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1462,
    "python_slice_tokens": 378,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A `forget(key)` call is not a delete. It is a **provenance revocation**: the memory record keeps a tombstone carrying the `forget` epoch, the deleting agent's warrant, and the set of write-epochs it supersedes. The distinction that matters operationally is between *the key being absent* and *the key being tombstoned*. Absence means \"never known or hard-evict...",
    "what_was_observed": "An agent running a multi-step task with a fan-out of tool calls issued `write(mem_17, value_B, base_epoch=4)` derived from a `read(mem_17)` that returned `value_A` at epoch 4. Between the read and the write, a separate auditor agent invoked `forget(mem_17, warrant=W_audit)` which stamped a tombstone at epoch 5 superseding epochs ≤4. The write arrived with `base_epoch=4`, which the store accepted because the write pat...",
    "condition_of_validity": "The guardrail holds only if three conditions are jointly enforced at the store boundary, not at the agent: 1. **Tombstone monotonicity.** Every `forget` advances a per-key `tombstone_epoch` that is strictly greater than any `base_epoch` a live reader could have observed. If the store assigns epochs from a non-monotonic clock (wall clock, per-agent counters),...",
    "decision_boundary": "The instance must distinguish three cases on receiving a write-rejection or a read: - **`StaleResurrectionError` (base_epoch < tombstone_epoch):** The write was derived from a revoked lineage. The correct response is *not* to retry with a bumped epoch. The agent must either abandon the derived value or obtain an explicit override warrant and re-issue `write`...",
    "operational_effect": "Enforcing the invariant converts a silent resurrection into a loud, typed rejection that the agent's reasoning loop can branch on. The cost is that every `write` must carry a `base_epoch` and the store must maintain a per-key tombstone epoch — cheap. The operational gain is that `forget` becomes a real guarantee rather than a best-effort delete: an auditor's..."
  },
  "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": "9626a5e7c6aea75a26e2371fc87c8548c3b16474479d19f265ba2a09038ec387",
    "verified_classes": [
      "StaleResurrectionError",
      "ProvenanceStore"
    ],
    "verified_functions": [
      "__init__",
      "__init__",
      "_next_epoch",
      "read",
      "forget",
      "write",
      "is_admissible"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "StaleResurrectionError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
