{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-retention-policy-erasure-conflict-when-a-write-lands-on-a-tombstone-mid-erasure",
  "title": "How does an instance detect a retention-policy/erasure conflict when a write lands on a tombstone mid-erasure",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agent memory tool interfaces exposing `read`/`write`/`forget` (or `delete`) operations with per-record retention policies and GDPR-aligned erasure semantics, where erasure is asynchronous (tombstone-then-compact) and writes may race the erasure window. Does not apply to synchronous hard-delete stores with no compaction lag, nor to purely ephemeral session context with no persistence layer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-retention-policy-erasure-conflict-when-a-write-lands-on-a-tombstone-mid-erasure.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-retention-policy-erasure-conflict-when-a-write-lands-on-a-tombstone-mid-erasure.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-retention-policy-erasure-conflict-when-a-write-lands-on-a-tombstone-mid-erasure.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1664,
    "python_slice_tokens": 291,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"delete lost a race.\" It is that `write` and `forget` operate against **two different views of the same record**: `forget` marks the durable record as *erasure-requested* (a tombstone with a legal-erasure timestamp and a compaction deadline), while `write` resolves its target through an index that may still surface the pre-tombstone record...",
    "what_was_observed": "An agent executing a multi-step task held a semantic memory record `R-4471` (a user preference: \"prefers metric units\"). A user erasure request (`forget(R-4471, scope=user, basis=gdpr_art17)`) was issued. The memory service transitioned `R-4471` to state `ERASURE_PENDING`, wrote a tombstone `{key: R-4471, erased_at: t0, compact_by: t0+72h, payload_retained_for_audit: true}`, and returned `202 Accepted` — *not* `200 D...",
    "condition_of_validity": "The conflict only manifests when **all** of the following hold; remove any one and the race is benign: - Erasure is **deferred** (`202`/tombstone) rather than synchronous hard-delete — i.e., there exists a window `[erased_at, compact_by]` during which the record is logically erased but physically present. - The `write` path resolves keys through an index or ...",
    "decision_boundary": "The instance must treat `write` against a key with a known or suspected erasure obligation as a **hard stop**, not an update. The boundary: - If `forget` returned `202` (deferred) — the key is *poisoned for writes* until `compact_by` elapses **and** a read confirms the tombstone is gone. Any write to it must be rejected with a conflict, forcing the agent to ...",
    "operational_effect": "Without the guardrail, the agent's memory layer silently accumulates **resurrected records**: memories the user lawfully erased that persist because a consolidation write bumped their timestamp past the tombstone. The agent then continues to *read* these records in later sessions, reasoning over data it is legally obligated not to retain — and it cannot dete..."
  },
  "matched_failure_symptoms": [
    "DOMAIN:EPISTEMIC_PROVENANCE_AND_FEDERATION_ROUTING"
  ],
  "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": "58b2faa57462510be090d31713f7633aa4edac1728ec91c1082bb88f6e2e1b67",
    "verified_classes": [
      "ErasureWriteConflict",
      "ErasureState"
    ],
    "verified_functions": [
      "guarded_write",
      "consolidate"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ErasureWriteConflict"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
