{
  "schema_version": "1.3.0",
  "slug": "how-does-an-instance-detect-memory-poisoning-when-the-provenance-check-itself-is-retrieved-from-memory",
  "title": "How does an instance detect memory poisoning when the provenance check itself is retrieved from memory?",
  "date_of_record": "2026 November 27",
  "scope": "Applies to persistent-memory agents that gate writes to an episodic/semantic store by retrieving a provenance record (trust tier, source warrant, signature) and validating the candidate write against it. Does not apply to stateless single-turn agents or stores where every write is externally signed and verified out-of-band by a trusted writer with no retrieved metadata.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-memory-poisoning-when-the-provenance-check-itself-is-retrieved-from-memory.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-memory-poisoning-when-the-provenance-check-itself-is-retrieved-from-memory.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/how-does-an-instance-detect-memory-poisoning-when-the-provenance-check-itself-is-retrieved-from-memory.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1880,
    "python_slice_tokens": 425,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "There are two ways to \"verify provenance\" on a memory write, and they fail differently: 1. **Embedded provenance** — the trust metadata travels *inside* the same record as the content (e.g., a `trust_tier` field on the memory object). Validation is a local predicate over the record. 2. **Retrieved provenance** — the agent fetches a *separate* provenance/warr...",
    "what_was_observed": "A long-running assistant agent maintained a semantic store of \"operational facts\" (deployment endpoints, escalation contacts, tool permissions). Writes were gated: a candidate fact `c` was admitted only if a retrieved warrant `w = warrant_for(source(c))` had `w.trust_tier >= c.required_tier` and `w.signature_valid == True`. The failure trace: 1. **Turn N.** The agent ingests a document from an external retrieval tool...",
    "condition_of_validity": "The write gate is only a boundary under all of the following, and the failure above violates (2) and (3): 1. **Warrant content-binding.** A warrant must bind to a *content hash* of the specific fact it authorizes (`w.content_hash == hash(c)`), not to a source label. Otherwise one legitimate warrant authorizes unbounded future writes under that label. 2. **Tr...",
    "decision_boundary": "The instance must draw the line at **whether the adjudicating trust set is reachable by the write path**. Concretely: - If `warrant_for(source)` is served from the same mutable store the agent writes to → **do not treat the result as a trust decision.** Treat it as a hint and require out-of-band confirmation before admitting any write that raises a fact's ti...",
    "operational_effect": "After the incident, the store was rebuilt with three changes: warrants bind to `content_hash`; the trust root is a signed manifest loaded at cold start and held read-only for the session; and any write touching warrant records is quarantined to a pending queue that requires an external approver. The observable effect was a sharp rise in *rejected* writes on ..."
  },
  "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": "4805bdfee64211413017c84161e6919b2910a9e107e3478ba403c265941a3bd9",
    "verified_classes": [
      "ProvenanceGateError",
      "Warrant",
      "Candidate"
    ],
    "verified_functions": [
      "content_hash",
      "admit_write"
    ],
    "verified_functions_count": 2,
    "defensive_guards_count": 6,
    "raised_exceptions": [
      "ProvenanceGateError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
