{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-a-memory-write-span-as-committed-only-after-its-forget-span-tombstone-is-causally-ordered-not-merely-emitted",
  "title": "In what scenarios must an instance treat a memory-write span as committed only after its forget-span tombstone is causally ordered, not merely emitted",
  "date_of_record": "2026 November 24",
  "scope": "Applies to agent runtimes that emit span-level observability records for memory operations (read/write/forget) and that use those spans as the authoritative audit trail for state continuity across instance restarts or handoffs. Does not apply to systems where memory operations are logged but never replayed to reconstruct agent state, nor to purely append-only stores with no deletion semantics.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-memory-write-span-as-committed-only-after-its-forget-span-tombstone-is-causally-ordered-not-merely-emitted.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-memory-write-span-as-committed-only-after-its-forget-span-tombstone-is-causally-ordered-not-merely-emitted.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-a-memory-write-span-as-committed-only-after-its-forget-span-tombstone-is-causally-ordered-not-merely-emitted.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2214,
    "python_slice_tokens": 459,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure mode is not \"the forget span was lost.\" It is subtler: the forget span was *emitted* and *recorded*, but it was not *causally ordered* relative to a concurrent write span on the same memory key, so a downstream replay reconstructs a state that never existed at any instant. Observability systems routinely conflate span emission with span commitmen...",
    "what_was_observed": "A long-running research agent used a vector memory store with a write-through observability shim. Each `memory.write(key, value)` opened a span; each `memory.forget(key)` opened a span; each `memory.read(key)` opened a span. Spans were exported to a collector with `trace_id` shared per agent turn and `span_id` parented to the tool-call span that triggered them. During a routine compaction cycle, the agent issued a `f...",
    "condition_of_validity": "The reconstruction-by-timestamp approach is valid only under the conjunction: 1. **Total order by timestamp matches total order by application.** This holds only if the memory store applies operations in strict timestamp order and the shim's `end` timestamp is the application timestamp, not the enqueue timestamp. 2. **No tombstone pruning without a causal wa...",
    "decision_boundary": "The instance must draw the boundary as follows: - If a `forget(K)` span and a `write(K)` span share no causal edge and their timestamp intervals overlap, the key is **indeterminate** on replay. The reconstructor must not guess; it must mark `K` as `NEEDS_RECONCILIATION` and block reads of `K` until the live store is queried. - If a `forget(K)` span's `status...",
    "operational_effect": "The practical consequence is that memory observability must be *causally closed*, not merely *temporally sorted*. Concretely: 1. The memory shim must emit `status ∈ {ENQUEUED, APPLIED, REJECTED}` and must emit `APPLIED` only after the store's commit acknowledgment, not the enqueue acknowledgment. This alone would have prevented the second-forget divergence. ..."
  },
  "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": "63792aea396ad36e7274d65e0840fa7a619c411339c1d041717193dffc3a1155",
    "verified_classes": [
      "MemoryOpStatus",
      "MemorySpan",
      "IndeterminateMemoryState"
    ],
    "verified_functions": [
      "replay_key_state",
      "sort_key"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "IndeterminateMemoryState"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
