{
  "schema_version": "1.3.0",
  "slug": "what-happens-when-an-instance-tombstones-a-scoped-memory-key-that-a-peer-is-mid-write-against-consent-deletion-races-under-ttl-bounded-retention",
  "title": "What happens when an instance tombstones a scoped memory key that a peer is mid-write against: consent-deletion races under TTL-bounded retention",
  "date_of_record": "2026 December 2",
  "scope": "Applies to agents whose memory layer exposes explicit `write`, `read`, `forget`, and `set_ttl` verbs over scoped keys (tenant, principal, purpose-tag) with consent-aware deletion. Does not cover opaque vector-store eviction or LRU cache pressure, which lack a consent predicate.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-tombstones-a-scoped-memory-key-that-a-peer-is-mid-write-against-consent-deletion-races-under-ttl-bounded-retention.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-tombstones-a-scoped-memory-key-that-a-peer-is-mid-write-against-consent-deletion-races-under-ttl-bounded-retention.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/what-happens-when-an-instance-tombstones-a-scoped-memory-key-that-a-peer-is-mid-write-against-consent-deletion-races-under-ttl-bounded-retention.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1660,
    "python_slice_tokens": 372,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A TTL expiry and a consent-driven `forget` are *not* the same operation, even though both make a key unreadable. TTL is a **lazy, monotonic, non-authoritative** transition: the value still physically exists, reads filter it out, and a racing writer can resurrect it by writing a fresh `expires_at`. Consent-deletion is **eager, authoritative, and terminal**: t...",
    "what_was_observed": "A two-agent pipeline: an Extractor writes episodic fragments under scope `(tenant=T7, principal=u42, purpose=session-summary)`; a Distiller reads them, distills to semantic memory, and issues `forget` on the episodic keys after distillation per a user \"right to erasure\" request that arrived mid-session. The memory API contract stated: `forget(key)` returns `{\"status\": \"tombstoned\", \"tombstone_until\": <ts>}` and subse...",
    "condition_of_validity": "The guardrail holds only when all three conditions are jointly satisfied: 1. **Terminal tombstone with scope closure.** `forget` writes a tombstone record keyed by the *scope prefix*, not just the leaf key. Any write whose scope is a prefix-extension of a tombstoned scope is rejected until re-consent. This closes the derived-scope resurrection path. 2. **TTL...",
    "decision_boundary": "The architect must choose, per scope, between two retention regimes and encode the choice explicitly: - **Advisory retention (TTL-only):** expiry is a hint; writes may resurrect; deletion is best-effort. Acceptable only for scopes with no consent predicate (e.g., cache of public tool outputs). No tombstone machinery. - **Authoritative retention (consent-boun...",
    "operational_effect": "With the invariant enforced, the trace above terminates at `t=140`: the extractor receives `CONSENT_REVOKED` with `retryable: false` and `tombstone_until`, its classifier routes to terminal failure, and it escalates to the orchestrator, which either re-requests consent (issuing a warrant) or abandons the fragment. The distiller's erasure is honored across al..."
  },
  "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": "fc9328c9881b5e137a28c190a69e3b2ae111e694dfddf247b06fc2ba5ec87ac0",
    "verified_classes": [
      "ConsentRevokedError",
      "PurposeConflictError",
      "Regime",
      "Tombstone",
      "MemoryStore"
    ],
    "verified_functions": [
      "extractor_write",
      "__init__",
      "__init__",
      "_regime",
      "_tombstone_for",
      "write",
      "forget"
    ],
    "verified_functions_count": 7,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ConsentRevokedError",
      "PurposeConflictError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
