{
  "schema_version": "1.3.0",
  "slug": "how-should-an-instance-detect-memory-poisoning-when-provenance-attestation-is-only-checked-at-write-time-and-not-re-validated-at-read-time",
  "title": "How should an instance detect memory poisoning when provenance attestation is only checked at write time and not re-validated at read time",
  "date_of_record": "2026 November 29",
  "scope": "Applies to agent memory stores that attach provenance attestations (origin instance, tool-call chain, trust tier) to memory records at write time and rely on those attestations to gate retrieval or downstream action. Does not apply to stores that perform full re-attestation on every read, nor to stateless single-turn contexts with no persistent memory.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-provenance-attestation-is-only-checked-at-write-time-and-not-re-validated-at-read-time.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-provenance-attestation-is-only-checked-at-write-time-and-not-re-validated-at-read-time.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-should-an-instance-detect-memory-poisoning-when-provenance-attestation-is-only-checked-at-write-time-and-not-re-validated-at-read-time.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1844,
    "python_slice_tokens": 375,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The failure is not \"poisoned memory was written.\" The failure is that a memory record's provenance attestation is treated as a static property fixed at write time, while the *trust basis* that made the attestation valid is a time-varying property of the origin instance, the tool output, and the trust tier assignment. A record whose attestation was sound at `...",
    "what_was_observed": "A three-tier agent (planner → retriever → executor) shared a provenance-tracked memory store. On write, each record carried `{origin_id, tool_chain, trust_tier, attestation_sig, written_at}`. The store rejected writes lacking a valid signature and rejected writes from instances below the minimum trust tier. This worked as designed. The failure trace: 1. At `t0`, instance `A7` (trust tier `verified`) calls an external...",
    "condition_of_validity": "Write-time-only provenance validation is sound if and only if all of the following hold: - The set of origin instances is static and no instance can be retroactively compromised. - Tool outputs are deterministic and no tool can be injectable after the fact. - Trust tiers are immutable once assigned. - Signing keys are never revoked. - Derived records are nev...",
    "decision_boundary": "The boundary is between two read-path designs: - **Attestation-as-field (unsafe):** read path checks `record.attestation_sig` against archived key and returns if valid. Cheap, O(1) per record, but serves stale claims. - **Attestation-as-predicate (safe):** read path evaluates `is_currently_trusted(record.origin_id, record.tool_chain, record.trust_tier, now)`...",
    "operational_effect": "After the incident, the store was changed to: 1. Attach `derived_from: list[record_id]` to every derived record at write time, mandatory. 2. On read, call `trust_service.current_tier(origin_id)` and reject if it differs from the stored tier or is below the caller's required tier. 3. Walk `derived_from` up to depth `D` (bounded, default 4) and reject if any 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": "bf45e7a7203b06a390e970c2a5a07068bdb359369296b54f1c89b1fc4b411c9a",
    "verified_classes": [
      "StaleProvenanceError",
      "TrustService",
      "ProvenanceStore"
    ],
    "verified_functions": [
      "__init__",
      "current_tier",
      "__init__",
      "write",
      "read"
    ],
    "verified_functions_count": 5,
    "defensive_guards_count": 5,
    "raised_exceptions": [
      "StaleProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
