{
  "schema_version": "1.3.0",
  "slug": "which-invariants-prevent-ttl-expiry-resurrection-from-silently-re-admitting-forgotten-facts-into-an-agent-s-semantic-memory",
  "title": "Which invariants prevent TTL-expiry resurrection from silently re-admitting forgotten facts into an agent's semantic memory",
  "date_of_record": "2026 November 22",
  "scope": "Applies to agents exposing discrete `memory.write`, `memory.read`, `memory.forget` tool contracts where each record carries provenance (source episode ID, writer agent, timestamp) and a TTL. Does not cover in-context scratchpads or vector stores without explicit forget semantics.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/which-invariants-prevent-ttl-expiry-resurrection-from-silently-re-admitting-forgotten-facts-into-an-agent-s-semantic-memory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-ttl-expiry-resurrection-from-silently-re-admitting-forgotten-facts-into-an-agent-s-semantic-memory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/which-invariants-prevent-ttl-expiry-resurrection-from-silently-re-admitting-forgotten-facts-into-an-agent-s-semantic-memory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1614,
    "python_slice_tokens": 313,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure this record concerns is not \"forgetting fails to delete.\" It is **forgetting succeeds, and then a *different* code path re-materializes the forgotten fact under a new identity**. A `forget` call that tombstones a record by primary key is locally correct: a subsequent `read` of that key returns null. The invariant that actually matters is *global*...",
    "what_was_observed": "A research agent distilled episodic session logs into semantic memory nightly. Each episodic record carried `source_episode_id`, `writer`, `created_at`, and a 72h TTL. A compaction job ran at 03:00: select episodic records where `expires_at < now + 24h`, summarize each cluster, write a semantic record with `provenance = {derived_from: [episode_ids], compactor: \"nightly-v3\"}`. A user issued `memory.forget` on a specif...",
    "condition_of_validity": "The invariant holds only if the following three conditions are enforced **at write time, inside the memory tool, not in the caller**: 1. **Provenance liveness check.** Every `memory.write` that declares `derived_from: [ids]` must reject the write if any listed ID resolves to a tombstone. The check must run against the authoritative store, not a replica or ca...",
    "decision_boundary": "The boundary between \"safe to summarize\" and \"must re-validate\" is the presence of a **derived record whose provenance crosses a forget boundary**. Concretely: - Same-writer, same-episode, non-derived writes: no provenance check needed; the tombstone on the key suffices. - Any write with `derived_from` containing an ID the writer did not itself create in the...",
    "operational_effect": "After the incident, the memory tool contract was amended: `write` with `derived_from` performs a synchronous liveness join against the primary store and raises a typed error on any tombstoned ancestor. The compactor was changed to treat that error as a signal to drop the entire cluster (not to retry, and not to drop just the offending reference — dropping th..."
  },
  "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": "4a79b90676a950a4906554e877e5994eb5c988773db4d895e15f71cffa269b69",
    "verified_classes": [
      "ForgottenAncestorError",
      "MemoryStore"
    ],
    "verified_functions": [
      "compact_cluster",
      "__init__",
      "forget",
      "write"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ForgottenAncestorError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
