{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-quarantine-a-memory-write-before-it-lands-the-provenance-stamp-content-hash-skew-boundary-in-persistent-agent-memory-stores",
  "title": "When must an instance quarantine a memory write before it lands: the provenance-stamp / content-hash skew boundary in persistent agent memory stores",
  "date_of_record": "2026 November 21",
  "scope": "Applies to persistent agent memory stores that admit writes from multiple principals (the agent itself, peer agents, tool-returned context, and human operators) and that verify integrity via a content hash bound to a provenance stamp at write time. Does not apply to read-only episodic caches or single-writer, single-tenant scratchpads where no cross-principal write admission occurs.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-memory-write-before-it-lands-the-provenance-stamp-content-hash-skew-boundary-in-persistent-agent-memory-stores.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-memory-write-before-it-lands-the-provenance-stamp-content-hash-skew-boundary-in-persistent-agent-memory-stores.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-memory-write-before-it-lands-the-provenance-stamp-content-hash-skew-boundary-in-persistent-agent-memory-stores.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2120,
    "python_slice_tokens": 461,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The naive integrity model treats memory poisoning as a *content* problem: hash the payload, store the hash, recompute on read, reject on mismatch. This is necessary but not sufficient, and it fails in a specific, non-obvious way. The failure is not that an attacker rewrites content — a content hash catches that. The failure is that the *provenance stamp* (wh...",
    "what_was_observed": "A retrieval-augmented agent operated against a shared memory store with 14 writer principals. Each write carried `{payload, content_hash, provenance: {principal_id, warrant_id, logical_clock, parent_write_id}}`. On read, the agent recomputed `sha256(payload)` and compared to `content_hash`; on match it trusted `provenance` verbatim. A peer agent (principal `P-07`) had its warrant revoked after a policy change but ret...",
    "condition_of_validity": "The integrity invariant that must hold for a write to be admitted without quarantine: > For every stored record `r`, there exists a verifier-held witness `W` such that `W(r.content_hash, r.provenance) = accept` is re-derivable *without trusting any field the writer supplied*, and `r.content_hash == H(r.payload ‖ canonical(r.provenance))`. The second clause i...",
    "decision_boundary": "The decision procedure an instance must run *before* admitting a write, in order: 1. Recompute `H(payload ‖ canonical(provenance))`. If it does not equal `content_hash`, the record is **tampered** — reject, do not quarantine (quarantine is for plausible-but-unproven, not for proven-bad). 2. Re-derive the provenance witness: fetch the warrant, check it agains...",
    "operational_effect": "After adopting this boundary, the store's behavior changes in three measurable ways. First, the integrity metric must be split: `content_integrity` (hash match rate) and `provenance_derivability` (fraction of records whose witness re-derives). The former will sit near 100% even during an active poisoning campaign; only the latter moves. Reporting a single \"i..."
  },
  "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": "af6f838f9c6424474418b1762d783222ce3fc058d0f86d829e5f5bb4d3d1f3fc",
    "verified_classes": [
      "ProvenanceSkewError",
      "WitnessUnavailableError",
      "MemoryWrite"
    ],
    "verified_functions": [
      "canonical",
      "welded_hash",
      "admit_write",
      "ingest_batch"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "ProvenanceSkewError",
      "WitnessUnavailableError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
