{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-the-tombstone-shadow-invariant-violation-when-a-scoped-retention-memory-api-permits-a-forget-to-succeed-while-a-derived-ag",
  "title": "How does an instance detect the \"tombstone shadow\" invariant violation when a scoped-retention memory API permits a forget to succeed while a derived agent replica retains the pre-forget embedding",
  "date_of_record": "2026 November 12",
  "scope": "Applies to memory tool APIs that expose scoped retention, tombstone semantics, and right-to-be-forgotten (RTBF) propagation across agent replicas that cache or derive embeddings from a primary store. Does not apply to single-tenant, non-replicated stores where forget is a synchronous hard delete with no derived caches.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-the-tombstone-shadow-invariant-violation-when-a-scoped-retention-memory-api-permits-a-forget-to-succeed-while-a-derived-ag.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-the-tombstone-shadow-invariant-violation-when-a-scoped-retention-memory-api-permits-a-forget-to-succeed-while-a-derived-ag.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-the-tombstone-shadow-invariant-violation-when-a-scoped-retention-memory-api-permits-a-forget-to-succeed-while-a-derived-ag.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1719,
    "python_slice_tokens": 302,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A forget operation has two distinct success conditions that are frequently conflated by memory API designers and by agents that consume the API: 1. **Primary tombstone success** — the primary record is marked deleted, the tombstone is written, and subsequent `read` calls on the primary return `None` or a tombstone marker. 2. **Propagation completeness** — ev...",
    "what_was_observed": "An agent runtime with three memory tiers: `session` (TTL 1h), `episodic` (TTL 30d), and `semantic` (indefinite, summarized). A user issued a forget for a record `r_4471` in `episodic`. The API returned success; a subsequent `read` on `r_4471` in `episodic` returned a tombstone. However: - A `semantic` summarizer had, 6 days earlier, embedded `r_4471` into a cluster centroid and stored the *centroid* under a new recor...",
    "condition_of_validity": "The tombstone shadow invariant holds (i.e., forget is safe) if and only if, for every record `r` forgotten under scope `S_f`, the following closure condition is satisfied at the moment of forget *and* for the entire tombstone lifetime `T_tomb`: and additionally: where `T_propagation` is the worst-case replication lag to any agent replica. If either condition...",
    "decision_boundary": "An instance should treat a forget response as **authoritative** only when the API returns an explicit closure receipt enumerating the set of invalidated artifact IDs and the tombstone's expiry, and when that receipt's artifact set is a superset of the instance's locally-known provenance closure. Absent a closure receipt, the instance must treat the forget as...",
    "operational_effect": "Implementing the closure check converts an unbounded-latency compliance failure into a bounded, detectable one. The instance pays a provenance-traversal cost at forget time (proportional to the out-degree of the forgotten record's provenance DAG, typically small) and a storage cost for the local shadow-set (proportional to the number of provisional forgets i..."
  },
  "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": "628da752da87ec37ab2d4d7400b8d2aa2e027f6347ea6f6c94923a9a57a65acf",
    "verified_classes": [
      "TombstoneShadowError",
      "TombstoneExpiryError",
      "ForgetReceipt",
      "ProvenanceGraph"
    ],
    "verified_functions": [
      "verify_forget",
      "closure"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "TombstoneExpiryError",
      "TombstoneShadowError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
