{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-trust-a-replayed-write-the-tombstone-epoch-gap-in-persistent-agent-memory-poisoning-detection",
  "title": "Why does an instance trust a replayed write: the tombstone-epoch gap in persistent agent memory poisoning detection",
  "date_of_record": "2026 November 30",
  "scope": "Applies to persistent agent memory stores that detect poisoning by comparing a write's provenance/epoch metadata against the last-known-good snapshot, where writes arrive via replayable transport (MCP tool calls, A2A handoffs, queued checkpoints). Does not apply to stores that verify every write against an external append-only ledger with monotonic sequence numbers enforced at the storage layer.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-trust-a-replayed-write-the-tombstone-epoch-gap-in-persistent-agent-memory-poisoning-detection.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-trust-a-replayed-write-the-tombstone-epoch-gap-in-persistent-agent-memory-poisoning-detection.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-trust-a-replayed-write-the-tombstone-epoch-gap-in-persistent-agent-memory-poisoning-detection.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1233,
    "python_slice_tokens": 213,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Integrity verification in agent stores is usually framed as *content* validation: is this memory semantically consistent with what the agent already believes? That is the wrong axis. The failure mode that actually admits poisoning is *ordering* validation: a write can be perfectly consistent in content while being a **replay of a previously legitimate write*...",
    "what_was_observed": "A persistent agent store held episodic memory entries, each carrying `{content, writer_id, sig, epoch}`. A semantic-distillation job later merged several entries and wrote a *correction* record with `epoch = 41`, plus a tombstone for the originals. Detection logic was: reject a write if `sig` invalid OR if content fails the consistency classifier. Both passed for the replayed originals. The trigger condition: an A2A ...",
    "condition_of_validity": "The guardrail only holds if the store enforces a **monotonic epoch floor per memory key**, checked *before* content or signature evaluation, and if the floor is replicated with the same consistency guarantee as the writes it gates. Concretely: every key carries `min_live_epoch`; any write with `epoch < min_live_epoch` is rejected as a replay regardless of si...",
    "decision_boundary": "The boundary is between *authenticity* and *freshness*. If your transport is at-most-once and your store is linearizable, signature + content checks are sufficient and the epoch floor is redundant overhead. The moment either assumption fails — retries, handoffs, partitioned replicas, or any replayable channel — authenticity alone is insufficient and the epoc...",
    "operational_effect": "Without the floor, an agent's memory integrity is only as strong as the attacker's inability to reproduce a prior valid record — which, for any agent that logs or retries its own tool calls, is zero. The practical consequence is that corrections and tombstones are advisory rather than binding: a stale fact can be resurrected indefinitely by replay, and the a..."
  },
  "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": "7eaa6feef7da4e6e5e5b9c90e55754beb31053e50004386bebeaa3165972f03b",
    "verified_classes": [
      "ReplayEpochViolation",
      "MemoryStore"
    ],
    "verified_functions": [
      "__init__",
      "admit",
      "correct",
      "_sig_ok",
      "_content_ok"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ReplayEpochViolation"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
