{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-provenance-orphaned-memory-write-when-ttl-expiry-erases-the-tombstone-before-the-dependent-semantic-record-is-re-derived",
  "title": "How does an instance detect a provenance-orphaned memory write when TTL expiry erases the tombstone before the dependent semantic record is re-derived",
  "date_of_record": "2026 November 21",
  "scope": "Applies to agents whose memory subsystem exposes `write`, `read`, and `forget` tools carrying provenance edges and per-record TTLs, where `forget` must satisfy a right-to-be-forgotten (RTBF) erasure guarantee. Does not apply to append-only audit logs that are never subject to erasure, nor to stateless single-turn instances with no cross-session store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-provenance-orphaned-memory-write-when-ttl-expiry-erases-the-tombstone-before-the-dependent-semantic-record-is-re-derived.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-provenance-orphaned-memory-write-when-ttl-expiry-erases-the-tombstone-before-the-dependent-semantic-record-is-re-derived.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-provenance-orphaned-memory-write-when-ttl-expiry-erases-the-tombstone-before-the-dependent-semantic-record-is-re-derived.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1516,
    "python_slice_tokens": 260,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"a memory record expired.\" It is the ordering inversion between two independent clocks: a **provenance edge's TTL** and the **derivation dependency's lifetime**. When a source record `S` is written with `ttl=Δ`, and a semantic distillation `D` is later derived from `S` (with `provenance: [S]`), `D` inherits a *logical* dependency on `S` bu...",
    "what_was_observed": "A three-tool memory surface: `write(record, provenance, ttl)`, `read(query)`, `forget(record_id)`. Records are typed `episodic` (raw observations) or `semantic` (distilled claims). A background distiller periodically reads episodic records and writes semantic ones with `provenance` pointing at their sources. Trace from a reproduced incident: 1. `t=0` — `write(S, type=episodic, ttl=3600)` with provenance `[user_sessio...",
    "condition_of_validity": "The cascade guarantee `forget(session) ⇒ ∀D. provenance(D) ∩ descendants(session) = ∅` holds **only if** for every record `S` reachable from an erased session, `S` is retained as a tombstone for at least `max(remaining_ttl of dependents)`, or dependents are re-derived/invalidated at `S`-expiry time. Concretely, the invariant that must be enforced is: > **No ...",
    "decision_boundary": "The instance must distinguish two semantically different absences at `read` and `forget` time: - **`ABSENT_NEVER_EXISTED`** — no record, no tombstone. Safe to treat as no-op. - **`ABSENT_ERASED`** — tombstone present. `forget` must treat this as *already cascaded*; dependents were erased with it. - **`ABSENT_EXPIRED_NO_TOMBSTONE`** — the dangerous state: the...",
    "operational_effect": "With the guardrail, the failure surfaces as a loud, bounded error at `forget` time instead of a silent RTBF violation discovered weeks later by audit. The instance learns to treat `forget` success as a *proof obligation*, not a return code: the proof is \"no live record transitively depends on an erased-or-expired source.\" The cost is that expired records wit..."
  },
  "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": "94ab6592aceeb8bbdb527b958cbc1aa2307fb4bacaeaa05137b201284cb52f83",
    "verified_classes": [
      "ProvenanceOrphanErasureError"
    ],
    "verified_functions": [
      "forget_session",
      "ttl_sweep"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 1,
    "raised_exceptions": [
      "ProvenanceOrphanErasureError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
