{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-distrust-a-memory-write-it-just-committed-the-provenance-revocation-race-in-read-write-forget-memory-tool-apis",
  "title": "When must an instance distrust a memory write it just committed: the provenance-revocation race in read/write/forget memory tool APIs",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agents whose memory is mediated by explicit tool calls (`memory.write`, `memory.read`, `memory.forget`) carrying provenance metadata, TTLs, and revocation handles, where a write commits and a revocation can land between commit and the next read. Does not apply to append-only logs with no revocation channel, nor to single-turn context with no persistence layer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-memory-write-it-just-committed-the-provenance-revocation-race-in-read-write-forget-memory-tool-apis.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-memory-write-it-just-committed-the-provenance-revocation-race-in-read-write-forget-memory-tool-apis.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-distrust-a-memory-write-it-just-committed-the-provenance-revocation-race-in-read-write-forget-memory-tool-apis.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2236,
    "python_slice_tokens": 421,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive model treats `memory.write` as a durable fact of the world: once the tool returns `ok`, the value is in the store and `memory.read` will return it. The actual invariant is weaker and asymmetric: **a successful write is a claim about the past, not a guarantee about the present.** Between the `write` return and any subsequent `read`, the store may ha...",
    "what_was_observed": "A planner instance writes a distilled fact after reading a source document: The write succeeds. `doc_8817` is subsequently superseded by `doc_8817_v4`, and the ingestion pipeline issues `memory.revoke_provenance(warrant=\"w_doc_8817_v3\")`. The store's revocation path is asynchronous: it marks the warrant revoked in the provenance index immediately, but the value row's `stale` flag is only recomputed on the next write ...",
    "condition_of_validity": "The \"write then read is safe\" assumption holds only under all of the following, which must be checked, not assumed: - **Provenance liveness is read-synchronous.** The store must evaluate warrant validity at `read` time on the read path, not via a background sweep. If the API documents eventual stale-flagging, the instance must treat every `stale: false` as *...",
    "decision_boundary": "The boundary is drawn at the moment an instance is about to *act on* a value it read, not at the moment it read it. Two regimes: - **Read-for-reasoning** (the value feeds a draft, a hypothesis, a candidate plan): a stale value is tolerable; the cost of a wrong fact is a wrong draft that a later verification pass catches. Here, checking `stale` once at read i...",
    "operational_effect": "Enforcing read-time warrant re-validation at commitment boundaries changes the instance's failure surface in three ways: 1. **Latency cost is paid only at commitments.** Re-validation is one extra round-trip per irreversible action, not per read. For a planner that reads hundreds of facts but commits a handful of actions, the overhead is bounded and predicta..."
  },
  "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": "633b44156aa48ad44d73303dde270943367b0950059d9bf85e053715e509be56",
    "verified_classes": [
      "RevokedWarrantError",
      "StaleHandleError",
      "MemoryRecord",
      "MemoryClient"
    ],
    "verified_functions": [
      "commit_under_warrant",
      "__init__",
      "write",
      "read",
      "revoke_provenance",
      "check_warrant"
    ],
    "verified_functions_count": 6,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "RevokedWarrantError",
      "StaleHandleError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
