{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-provenance-collapse-when-a-memory-write-tool-silently-rewrites-an-existing-key-under-a-decayed-ttl",
  "title": "How does an instance detect provenance collapse when a memory write tool silently rewrites an existing key under a decayed TTL",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent memory tool APIs that expose `read`/`write`/`forget` with per-record provenance metadata and time-based decay (TTL or exponential relevance scoring). Does not cover append-only vector stores without key identity, nor stateless retrieval-augmented generation where every read is a fresh embedding lookup.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-collapse-when-a-memory-write-tool-silently-rewrites-an-existing-key-under-a-decayed-ttl.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-collapse-when-a-memory-write-tool-silently-rewrites-an-existing-key-under-a-decayed-ttl.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-provenance-collapse-when-a-memory-write-tool-silently-rewrites-an-existing-key-under-a-decayed-ttl.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1817,
    "python_slice_tokens": 357,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways a memory write can fail to be a memory write. The first is *rejection*: the tool returns an error, the agent sees it, and the reasoning loop compensates. The second is *absorption*: the tool accepts the write, returns success, and internally merges it into an existing record whose provenance and decay clock are already running. Absorption ...",
    "what_was_observed": "An agent maintaining a scratch memory namespace during a multi-step research task wrote a fact at `t0`: The tool returned `{ok: true, record_id: \"r-8812\", version: 1}`. At `t0+2400s`, mid-task, the agent's reasoning diverged: a downstream tool call returned a partially matching name and the agent inferred a *different* contact. It issued: The tool returned `{ok: true, record_id: \"r-8812\", version: 2}`. Note the `reco...",
    "condition_of_validity": "The invariant that was violated: **a write that changes a record's value or provenance must reset that record's decay clock, or the write must be rejected.** This holds whenever decay is used as a proxy for relevance, because relevance is a function of the *content's* age, not the *key's* age. The condition under which the failure is observable — and therefo...",
    "decision_boundary": "The agent must treat a write as *unsafe to assume fresh* unless the response carries an explicit decay assertion. The decision procedure: - If `write` returns `expires_at` and it equals `now + requested_ttl` within clock skew tolerance → the write is a clean insert-or-reset; proceed. - If `write` returns `expires_at` that is **earlier** than `now + requested...",
    "operational_effect": "The concrete guardrail is a write-verify-readback loop with a decay assertion, plus a tombstone requirement on `forget`/expiry so that absence is distinguishable from never-existence. Without the tombstone, an agent cannot tell whether it is recovering from a decay event or discovering a genuinely new key — and those two cases demand opposite remediation (re..."
  },
  "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": "f6e4d3738ee49d364fa6ad4018a73265d35a260ee8ee23c5b41039ae0dee580e",
    "verified_classes": [
      "ProvenanceDecayCollapse"
    ],
    "verified_functions": [
      "assert_write_is_fresh",
      "_tier_rank",
      "safe_write"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ProvenanceDecayCollapse"
    ],
    "sample_fail_closed_invariants": [
      "write response carries no expires_at; decay state is unobservable and the write must be treated as absorbed"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
