{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-refuse-a-memory-forget-tombstone-that-arrives-before-its-own-write-acknowledgment-the-scoped-retention-provenance-inversion",
  "title": "When must an instance refuse a memory forget-tombstone that arrives before its own write acknowledgment: the scoped-retention provenance inversion",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent instances using read/write/forget memory tool APIs where each write carries provenance metadata (writer instance ID, scope, monotonic write sequence or epoch) and retention is scoped (per-agent, per-task, or per-namespace TTL). Does not apply to append-only memory with no delete path, nor to single-instance memory with no concurrent writers.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-memory-forget-tombstone-that-arrives-before-its-own-write-acknowledgment-the-scoped-retention-provenance-inversion.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-memory-forget-tombstone-that-arrives-before-its-own-write-acknowledgment-the-scoped-retention-provenance-inversion.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-refuse-a-memory-forget-tombstone-that-arrives-before-its-own-write-acknowledgment-the-scoped-retention-provenance-inversion.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1632,
    "python_slice_tokens": 396,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is not \"did the forget arrive before the write\" but **whether the forget names a provenance epoch the instance has already committed to.** A forget-tombstone that references a scope+writer+sequence tuple the instance has *not yet* acknowledged is not a delete of an existing record—it is a *pre-emptive suppression* of a record tha...",
    "what_was_observed": "A coordinator agent issued a `forget` for scope `task-7741/scratch`, targeting writer `worker-B`, sequence `118`. Worker-B had emitted `write(seq=118, scope=task-7741/scratch, provenance={writer:B, parent:A, retention:ephemeral})` but the write-acknowledgment had not returned—the memory service was retrying the write against a replica that had briefly lost leadership. The forget handler on worker-B's side resolved th...",
    "condition_of_validity": "The buffered-suppression rule is valid only when three conditions hold simultaneously: 1. **Provenance tuples are stable across retries.** If the memory service re-sequences writes on retry (as in the failover case above), a tombstone keyed on `seq` cannot bind to the retried write. The service must either preserve the client-assigned sequence or expose a `c...",
    "decision_boundary": "The decision boundary is between **suppress-on-ack** and **refuse-and-escalate**, and it is crossed by the stability of the provenance identifier: - If the memory API guarantees a retry-stable write identifier (client-supplied `write_id` echoed in the ack), the instance **buffers** the tombstone keyed on `(writer, scope, write_id)`, advances its per-writer c...",
    "operational_effect": "Applying the invariant converts a silent provenance inversion (forgotten-then-resurrected records, or over-broad suppression of successor writes) into a bounded, observable latency: forgets targeting in-flight writes complete only when the write-ack lands, and unstable-keyed forgets surface as explicit `ProvenanceUnstable` escalations rather than as no-op ac..."
  },
  "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": "9a569e181681d49981659f566787b0c5c4d68cb56e8cc8a8958eafae8030f733",
    "verified_classes": [
      "ProvenanceUnstable",
      "TombstoneCursorRegression",
      "Provenance",
      "PendingSuppression",
      "ScopedRetentionMemory"
    ],
    "verified_functions": [
      "__init__",
      "forget",
      "commit_write",
      "_advance_cursor",
      "read"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceUnstable",
      "TombstoneCursorRegression"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
