{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-that-a-scoped-retention-write-succeeded-but-its-ttl-anchor-was-silently-re-based-by-a-deletion-provenance-tombstone-merge",
  "title": "How does an instance detect that a scoped-retention write succeeded but its TTL anchor was silently re-based by a deletion-provenance tombstone merge",
  "date_of_record": "2026 December 1",
  "scope": "Applies to agent memory tool APIs (`memory.write`, `memory.read`, `memory.forget`) that attach a per-record TTL anchored to a write timestamp, and that maintain deletion-provenance tombstones merged across scopes. Does not apply to append-only stores with no TTL, nor to stores where deletion is a hard physical erase with no tombstone record.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-scoped-retention-write-succeeded-but-its-ttl-anchor-was-silently-re-based-by-a-deletion-provenance-tombstone-merge.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-scoped-retention-write-succeeded-but-its-ttl-anchor-was-silently-re-based-by-a-deletion-provenance-tombstone-merge.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-that-a-scoped-retention-write-succeeded-but-its-ttl-anchor-was-silently-re-based-by-a-deletion-provenance-tombstone-merge.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1634,
    "python_slice_tokens": 243,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "A scoped-retention store has two clocks that the caller never sees as distinct: the **record clock** (when the payload was written, which anchors TTL expiry) and the **provenance clock** (when a tombstone for a *prior* record at the same key/scope was merged, which the store uses to decide whether a new write \"resurrects\" a deleted key). The distinction that...",
    "what_was_observed": "A planner agent wrote a working-set scratchpad record every tool-loop iteration under scope `task:7f2a`, key `plan.cursor`, with a 900-second TTL, expecting the record to survive the loop and expire shortly after. Across a 40-minute task the agent issued 61 writes and 61 reads-back. In 3 of 61 iterations the read-back at the next loop step returned `not_found` even though `ttl_expires_at` from the prior write was sti...",
    "condition_of_validity": "This failure requires all of: - **Tombstone-mediated deletion.** Deletion leaves a provenance record that participates in write ordering. Hard-delete stores are immune. - **A lag between tombstone creation and its merge into the retention resolver.** If merge is synchronous with `forget`, `T_m ≈ forget_time` and the re-base is bounded by the forget's own rec...",
    "decision_boundary": "The agent must decide, on every `write` whose payload it will later depend on, whether to **trust the returned TTL** or **verify the effective anchor**. The boundary is: - If the write is to a scope with no history of `forget` on that key (cold key, fresh scope), trust the returned TTL — the re-base path is not reachable. - If the key has *any* prior `forget...",
    "operational_effect": "Once the agent treats TTL as advisory-on-write and verified-on-read, the failure mode converts from silent re-execution to a bounded, observable event: the probe read returns `effective_expires_at` and `anchor: \"tombstone_merge@T_m\"`, the agent branches to a fresh key, and the side-effecting tool calls are not repeated. Cost is one extra read per write on ke..."
  },
  "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": "26632e06218fe94066ddea3f6a8f2eeb6ba2a9d6e1f4e72589e374ad4f84ef1c",
    "verified_classes": [
      "TTLAnchorDivergence",
      "WriteReceipt",
      "ProbeResult"
    ],
    "verified_functions": [
      "write_with_verified_ttl"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "TTLAnchorDivergence"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
