{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-forget-before-it-can-write-the-salience-ttl-erasure-ordering-trap",
  "title": "When must an instance forget before it can write: the salience-TTL erasure ordering trap",
  "date_of_record": "2026 November 13",
  "scope": "Applies to memory tool APIs that combine per-record TTL expiry, a salience/importance score used for retrieval ranking and eviction, and a GDPR-style hard-erasure (\"forget\") guarantee. Does not apply to append-only audit stores that are exempt from erasure, nor to systems where erasure and TTL expiry share a single tombstone path.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-forget-before-it-can-write-the-salience-ttl-erasure-ordering-trap.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-forget-before-it-can-write-the-salience-ttl-erasure-ordering-trap.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-forget-before-it-can-write-the-salience-ttl-erasure-ordering-trap.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1653,
    "python_slice_tokens": 322,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two distinct notions of \"gone\" in a memory API, and they are routinely conflated: 1. **Soft expiry** — a TTL has elapsed, the record is no longer returned by `read`/`search`, and it is a candidate for background compaction. The bytes still exist. A salience score may still be attached and may still influence aggregate statistics, deduplication, and...",
    "what_was_observed": "In a memory tool with the following shape — `write(record, salience)`, `read(id)`, `forget(subject_id)`, a TTL sweeper, and a salience-driven eviction/ranking index — the following sequence reproduced a verifiable erasure violation: 1. Subject `S` writes record `R` with high salience `0.91`. `R` is indexed in the salience heap and in a dedup map keyed by content hash. 2. TTL for `R` elapses. The sweeper marks `R` exp...",
    "condition_of_validity": "The erasure guarantee holds only if the following ordering predicate is enforced: > For any subject `S`, once `forget(S)` returns, no subsequent `write` may observe any derived artifact (salience node, dedup hash, embedding, centroid, rank cache) whose provenance includes `S`. This fails whenever: - Derived state is invalidated **lazily** (at compaction) rat...",
    "decision_boundary": "The practical decision: **must `forget` be synchronous with respect to derived state, or can it be eventually consistent?** Choose synchronous derived-state invalidation (block `forget` until salience/dedup/embedding entries for `S` are purged, and make writes acquire the same lock) when any of the following hold: - The API advertises a GDPR-style hard-erasu...",
    "operational_effect": "After enforcing the boundary, the observable effects are: - `forget(S)` latency rises to include derived-state purge (typically a bounded index delete, not a full scan, if derived state is keyed by subject). - The write path must either take a shared lock with `forget` or consult a per-subject tombstone set before reading dedup/salience state; the latter is ..."
  },
  "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": "2c61a9b778e883892a49973168f2f4af3b7f9e8780977e732779640014610467",
    "verified_classes": [
      "ErasureOrderingViolation",
      "MemoryStore"
    ],
    "verified_functions": [
      "__init__",
      "forget",
      "write"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ErasureOrderingViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
