{
  "schema_version": "1.3.0",
  "slug": "why-does-an-instance-accept-a-poisoned-memory-write-when-the-provenance-hash-chain-verifies-clean-the-write-audit-trail-s-commit-ordering-invariant-an",
  "title": "Why does an instance accept a poisoned memory write when the provenance hash chain verifies clean? The write-audit trail's commit ordering invariant and the append-then-index divergence",
  "date_of_record": "2026 November 29",
  "scope": "Applies to persistent agent memory stores that gate writes on a provenance/audit hash chain (each write record includes `prev_hash`, `writer_id`, `content_digest`, `signature`) and that serve retrieval from a *separate* index built asynchronously from the audit log. Does not apply to synchronous single-writer stores where the index and the log are updated in one transaction, nor to read-only memory replicas.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-poisoned-memory-write-when-the-provenance-hash-chain-verifies-clean-the-write-audit-trail-s-commit-ordering-invariant-an.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-poisoned-memory-write-when-the-provenance-hash-chain-verifies-clean-the-write-audit-trail-s-commit-ordering-invariant-an.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/why-does-an-instance-accept-a-poisoned-memory-write-when-the-provenance-hash-chain-verifies-clean-the-write-audit-trail-s-commit-ordering-invariant-an.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1980,
    "python_slice_tokens": 298,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **audit-chain integrity** and **audit-chain causality**. A hash chain proves that the sequence of committed write records is tamper-evident *in the order it was appended*. It does not prove that the order in which writes were *applied to the retrieval index* matches the order in which they were *committed to the log*. ...",
    "what_was_observed": "A long-running research agent maintained a persistent memory store of ~40k semantic entries. Writes went through a `commit()` path that (1) appended a signed record to the audit log with `prev_hash` chaining, (2) returned a `commit_id`, and (3) enqueued the record on an internal indexing queue. Retrieval served from a vector index refreshed by an indexer that drained the queue with a **bounded worker pool** (8 worker...",
    "condition_of_validity": "The failure requires all of the following to co-occur; remove any one and the mechanism does not fire: - **Asynchronous index construction.** The index is mutated by a consumer of the audit log rather than by the commit path itself. (Synchronous stores are immune.) - **Out-of-order index application.** The indexer does not guarantee per-key ordering, or guar...",
    "decision_boundary": "The boundary is between **verifying the log** and **verifying the projection**. Operationally: - A write-audit trail is a *log*. It is authoritative for commitment order and content. It is **not** authoritative for what retrieval currently returns. - Poisoning detection must be defined against the *served state*, not the *committed state*. A clean chain with...",
    "operational_effect": "After the incident, the store was changed in three ways, each tied to a specific invariant: - **Per-key ordering in the indexer.** Records are partitioned by memory key hash to workers; a key is only ever processed by one worker at a time. This restores the invariant that index application order per key equals commit order per key. - **Projection assertion o..."
  },
  "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": "5b9698d83d42f19e2b1b79fc5a5873d632c4ad6a9f36fbfda21077be0fb16f21",
    "verified_classes": [
      "ProjectionDivergenceError",
      "LogRecord"
    ],
    "verified_functions": [
      "_digest",
      "verify_chain",
      "assert_projection_matches_log",
      "high_trust_read"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProjectionDivergenceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
