{
  "schema_version": "1.3.0",
  "slug": "where-must-an-instance-halt-when-a-scoped-forget-tombstone-and-a-concurrent-episodic-write-race-across-the-retention-horizon",
  "title": "Where must an instance halt when a scoped forget() tombstone and a concurrent episodic write race across the retention horizon?",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agents whose memory layer exposes explicit `read`/`write`/`forget` tool APIs with per-scope retention policies (TTL, hard-delete, legal-hold) and a deletion guarantee that a forgotten record is unretrievable after `forget()` returns. Does not apply to append-only logs with no deletion surface, nor to purely in-context scratchpads that never persist.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-when-a-scoped-forget-tombstone-and-a-concurrent-episodic-write-race-across-the-retention-horizon.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-when-a-scoped-forget-tombstone-and-a-concurrent-episodic-write-race-across-the-retention-horizon.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/where-must-an-instance-halt-when-a-scoped-forget-tombstone-and-a-concurrent-episodic-write-race-across-the-retention-horizon.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1686,
    "python_slice_tokens": 367,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **deletion as an event** and **deletion as a state predicate**. Most agent memory implementations model `forget(key, scope)` as an event: it removes the record at time `t`, and the caller treats return-of-`forget()` as proof of erasure. The retention policy is a separate, weaker mechanism — a TTL sweeper that eventuall...",
    "what_was_observed": "Trace from a support-triage agent with two scopes: `session:episodic` (TTL 3600s) and `user:semantic` (hard-delete on request). A user issued a deletion request; the orchestrator called `forget(key=\"PII:acct_4471\", scope=\"user:semantic\")`. The call returned `{deleted: true, tombstone: t_8812}`. Thirty-one seconds later, a distillation worker — a sub-agent that had read the raw episodic buffer *before* the forget and ...",
    "condition_of_validity": "The deletion guarantee holds only under the conjunction: 1. **Snapshot fencing:** every `write()` carries the `snapshot_epoch` of the read that produced it, and the memory layer rejects any write whose `snapshot_epoch < tombstone_epoch` for the *target scope*, not merely the target key. 2. **Scope-wide barrier:** `forget()` on a scope increments a monotonic ...",
    "decision_boundary": "The agent must halt and escalate — not retry, not paper over — when it detects a write that commits with a `snapshot_epoch` older than the active `scope_fence` for its target scope. The boundary is binary: - **Below the fence (safe):** write's `snapshot_epoch >= scope_fence` at commit time → proceed. - **At/above the fence but key-tombstoned (ambiguous):** w...",
    "operational_effect": "Enforcing the fence converts a silent, permanent guarantee violation into a loud, recoverable abort. The distillation worker's write is rejected, the worker re-reads post-fence, and if the account identifier still appears in live episodic memory (because the user re-mentioned it), the re-derived summary is a *new* observation with a fresh epoch — legitimatel..."
  },
  "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": "1d961422c1e655a07cac5f26991ca355b2e13bddc1155812f92cef9d03382701",
    "verified_classes": [
      "StaleSnapshotResurrection",
      "TombstoneCollision",
      "WriteIntent",
      "ScopeState"
    ],
    "verified_functions": [
      "commit_write",
      "forget"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "StaleSnapshotResurrection",
      "TombstoneCollision"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
