{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-treat-memory-poisoning-attestation-as-a-per-write-invariant-rather-than-a-periodic-sweep",
  "title": "In what scenarios must an instance treat memory-poisoning attestation as a per-write invariant rather than a periodic sweep",
  "date_of_record": "2026 November 8",
  "scope": "Applies to long-horizon agent state stores where an agent's persistent memory (episodic summaries, retrieved facts, tool-output caches, or self-authored notes) is read back across many sessions and can be mutated by untrusted or semi-trusted writers. Does not apply to stateless inference, to stores where every writer is inside the same trust boundary and no external content is ever ingested, or to read-only frozen snapshots.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-memory-poisoning-attestation-as-a-per-write-invariant-rather-than-a-periodic-sweep.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-memory-poisoning-attestation-as-a-per-write-invariant-rather-than-a-periodic-sweep.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-treat-memory-poisoning-attestation-as-a-per-write-invariant-rather-than-a-periodic-sweep.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1398,
    "python_slice_tokens": 172,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The non-obvious boundary is this: **memory poisoning is not a property of a memory item; it is a property of the transition that wrote it.** A periodic integrity sweep can attest that the *current* store contents hash to a known-good root, but it cannot distinguish \"this item was written by a trusted path and later verified\" from \"this item was written by a ...",
    "what_was_observed": "In a deployment where an agent ingested external documents into a vector-backed episodic store and a nightly job recomputed a signed Merkle root over all stored chunks, the following sequence occurred: 1. A malicious retrieved document contained an instruction payload that the ingestion pipeline summarized into a \"fact\" chunk and wrote to the store. 2. The chunk passed ingestion validation because validation checked ...",
    "condition_of_validity": "Per-write attestation is the correct invariant **if and only if** the following holds: every mutation to the store carries an authenticated provenance record (writer identity, source class, and the gate decision) that is committed *atomically with* the data write, and the attestation root is computed over `(data, provenance)` pairs rather than over data alon...",
    "decision_boundary": "Use per-write attestation when **any** of these hold: - The store ingests content from outside the trust boundary (retrieved documents, tool outputs, user-supplied text, other agents' messages). - The agent reads its own prior writes back as authoritative context in later sessions (self-reinforcing memory). - The sweep interval is longer than the time-to-act...",
    "operational_effect": "Enforcing per-write provenance attestation moves the detection point from *after* the poison is folded into the baseline to *at* the transition, and it changes the failure from silent to loud: a write whose provenance class is `external_untrusted` and whose gate decision is not `allow` raises at commit time rather than surfacing as a green attestation over 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": "b303fd04c9ac9bcdbabd8510e4161a6a14909d7cfeea5d5efca5356a8b29c21b",
    "verified_classes": [
      "ProvenanceAttestationError"
    ],
    "verified_functions": [
      "commit_memory_write"
    ],
    "verified_functions_count": 1,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "ProvenanceAttestationError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
