{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-treat-a-memory-write-span-as-committed-only-after-the-write-is-durably-observable-to-a-later-read-span-rather-t",
  "title": "Under what conditions must an instance treat a memory-write span as committed only after the write is durably observable to a later read span, rather than at the moment the write tool returns?",
  "date_of_record": "2026 November 30",
  "scope": "Applies to agent runtimes that emit memory read/write/forget operations as first-class OpenTelemetry-style spans and use those spans as the authoritative record of agent state continuity. Does not apply to systems where memory spans are purely diagnostic and a separate transactional store is the system of record.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-memory-write-span-as-committed-only-after-the-write-is-durably-observable-to-a-later-read-span-rather-t.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-memory-write-span-as-committed-only-after-the-write-is-durably-observable-to-a-later-read-span-rather-t.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-treat-a-memory-write-span-as-committed-only-after-the-write-is-durably-observable-to-a-later-read-span-rather-t.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1378,
    "python_slice_tokens": 203,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive invariant is: *a memory write span ending with status OK means the memory is committed.* This is false whenever the memory backend is a vector store, KV cache, or embedding index with **asynchronous or eventually-consistent indexing**. The write tool returns when the record is *accepted by the ingestion path*, not when it is *retrievable by the rea...",
    "what_was_observed": "A tool-calling agent performed the sequence: `memory.write(key=\"order_ctx\", value=payload)` → `tool.call(charge_card, args=payload)` → `memory.read(key=\"order_ctx\")` to verify before retry. The write span closed at T+12ms with status OK. The charge tool failed non-idempotently at T+90ms. The verification read at T+140ms returned `NOT_FOUND` — the embedding index had not yet flushed. The agent, seeing the read span re...",
    "condition_of_validity": "The write span may be treated as committed at tool-return **only if** all of the following hold: 1. The backend exposes a synchronous read-your-writes guarantee within the same logical session, and the span carries a `read_your_writes=true` attribute sourced from the backend's own capability advertisement — not from the caller's assumption. 2. The write span...",
    "decision_boundary": "The boundary is crossed the moment an agent's control flow branches on a read span that is *causally downstream of a write span whose visibility has not been confirmed*. Concretely: - If `read.start_time - write.end_time < backend.p99_index_lag`, the read is **unsound** for commit confirmation. Treat empty results as `INCONCLUSIVE`, not `ABSENT`. - If the re...",
    "operational_effect": "With the commit-barrier invariant enforced, the double-charge trace becomes impossible: the verification read span would carry `status=INCONCLUSIVE` (lag exceeded), the agent would block on a barrier probe rather than re-writing, and the idempotency key would be reused rather than regenerated. The cost is added latency equal to the probe round-trip and a har..."
  },
  "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": "22b51e07cf548ed202e4725ce6c27978ab741621f0a1f60a05ce329b26b95a64",
    "verified_classes": [
      "MemoryCommitViolation",
      "Span"
    ],
    "verified_functions": [
      "payload_hash",
      "assert_committed",
      "commit_barrier"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "MemoryCommitViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "time",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
