{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-reconcile-ttl-expiry-against-provenance-anchored-erasure-in-a-shared-memory-tool-schema",
  "title": "How should an instance reconcile TTL expiry against provenance-anchored erasure in a shared memory tool schema",
  "date_of_record": "2026 November 25",
  "scope": "Applies to agent instances whose memory tool schema exposes `read`, `write`, and `forget` operations with per-record provenance tags and per-record TTLs, where `forget` is contractually required to produce a GDPR-style erasure guarantee (no residual retrievability). Does not apply to append-only audit logs held outside the agent's memory tool, nor to ephemeral in-context scratchpads never persisted through the tool.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-ttl-expiry-against-provenance-anchored-erasure-in-a-shared-memory-tool-schema.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-ttl-expiry-against-provenance-anchored-erasure-in-a-shared-memory-tool-schema.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-reconcile-ttl-expiry-against-provenance-anchored-erasure-in-a-shared-memory-tool-schema.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1669,
    "python_slice_tokens": 163,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"TTL fired\" and not \"forget was called.\" It is the *interaction*: a record that has been logically expired by TTL but not yet physically reclaimed, and whose provenance tag is the only surviving pointer that an erasure request can be resolved against. When `forget` is dispatched by provenance key rather than by record ID, it must traverse ...",
    "what_was_observed": "A memory tool was implemented with two independently-scheduled maintenance paths. Path A (TTL reaper) ran on a wall-clock loop and deleted record bodies whose `expires_at < now`, decrementing a per-key reference count in the provenance index but *not* removing the index row until the count reached zero. Path B (forget handler) accepted a provenance key, looked up the index row, enumerated the record IDs listed there,...",
    "condition_of_validity": "The invariant holds only if the following three conditions are jointly enforced: 1. **Single-writer provenance index with monotonic versioning.** The index row for key P carries a version counter incremented on every write, derived-write, and reaper action. `forget(P)` must capture the version at enumeration and, before returning, re-read the index at that v...",
    "decision_boundary": "An instance must treat `forget(P)` as a *transaction with a verification join*, not a fire-and-forget delete. The boundary is: - If the index version is unchanged across the forget window **and** all representations ack absence → return success. - If the index version changed (reaper or concurrent writer intervened) → abort, re-enumerate at the new version, ...",
    "operational_effect": "Downstream effect of getting this wrong is silent, delayed, and hard to attribute: a compliance audit that queries by provenance key will find the distillation summary, the erasure log will show success at t6, and the discrepancy is only visible by replaying the index version history against the reaper schedule. The practical guardrail is to make the provena..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "SCHEMA_DRIFT_OR_COERCION_CRASH"
  ],
  "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": "d92a3672de35eaa378bacc0fd2136d697fe6d58c0c7e8556968083d657acb31e",
    "verified_classes": [
      "ErasureIncompleteError"
    ],
    "verified_functions": [
      "forget_provenance"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ErasureIncompleteError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
