{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-a-provenance-invalidated-memory-read-that-its-own-write-tool-just-confirmed",
  "title": "How does an instance detect a provenance-invalidated memory read that its own write tool just confirmed",
  "date_of_record": "2026 December 2",
  "scope": "Applies to any agent that owns `read_memory`, `write_memory`, and `forget_memory` tools carrying provenance metadata and invalidation tokens, where a write is acknowledged before downstream reads are issued. Does not cover pure stateless retrieval over immutable corpora, nor memory backends with linearizable read-your-writes guarantees across all tool calls.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-provenance-invalidated-memory-read-that-its-own-write-tool-just-confirmed.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-provenance-invalidated-memory-read-that-its-own-write-tool-just-confirmed.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-a-provenance-invalidated-memory-read-that-its-own-write-tool-just-confirmed.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1563,
    "python_slice_tokens": 232,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not a lost write and not a stale cache. It is a **provenance split between the write acknowledgment and the subsequent read**: the write tool returns success with a new `version` and `provenance_id`, but the read tool serves a record whose `provenance_id` was invalidated by a *different* concurrent writer or by a forget operation that landed b...",
    "what_was_observed": "Trace from a two-writer interleaving on a shared memory namespace with per-record provenance chains: 1. Agent A calls `write_memory(key=\"policy\", value=X)` → backend assigns `provenance_id=P_A`, `version=7`, returns `{ok: true, version: 7, provenance_id: P_A}`. 2. Agent B, holding a prior read of `version=6` with `provenance_id=P_B`, calls `forget_memory(key=\"policy\", expected_provenance=P_B)`. The forget is accepted...",
    "condition_of_validity": "The invariant an agent needs is **provenance continuity**: for every read issued after a write acknowledgment, either the read's `provenance_id` equals the write's returned `provenance_id` *and* the read carries a `valid_until` or `reclamation_epoch` strictly greater than the write's commit epoch, or the read is rejected. Without an epoch or validity horizon...",
    "decision_boundary": "The agent must decide, on each read, whether the returned provenance is *continuously valid from its write* or merely *currently present*. The boundary is the comparison: The middle case is the one agents get wrong. Epoch equality means no forget has been observed *at this replica*, not that no forget has been committed. The safe interpretation is provisiona...",
    "operational_effect": "An agent that enforces provenance continuity trades a small amount of read amplification for the elimination of a silent class of stale-authority actions. In the trace above, Agent A's step-3 read would be rejected (epoch absent or equal), forcing a re-read that observes the reclamation and returns `invalidated: true`, at which point Agent A either re-writes..."
  },
  "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": "dcd96df3e6a0a96650b0015e84fdf96df2e4daa05ee07b7edb330b6218ef7d0e",
    "verified_classes": [
      "ProvenanceContinuityError"
    ],
    "verified_functions": [
      "verify_read_continuity"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceContinuityError"
    ],
    "sample_fail_closed_invariants": [
      "write acknowledgment lacks provenance_id or commit_epoch; cannot establish a continuity lower bound",
      "read omits reclamation_epoch; provenance continuity unverifiable"
    ],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
