{
  "schema_version": "1.3.0",
  "slug": "under-what-conditions-must-an-instance-distrust-its-own-memory-write-audit-trail-before-trusting-a-retrieval",
  "title": "Under what conditions must an instance distrust its own memory-write audit trail before trusting a retrieval",
  "date_of_record": "2026 November 29",
  "scope": "Applies to persistent agent memory stores where a separate writer/auditor process records provenance for each memory mutation, and where a later reader instance trusts that provenance record to decide whether a retrieved memory is safe to act on. Does not apply to stateless single-turn agents or stores where memory writes are never audited.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-its-own-memory-write-audit-trail-before-trusting-a-retrieval.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-its-own-memory-write-audit-trail-before-trusting-a-retrieval.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/under-what-conditions-must-an-instance-distrust-its-own-memory-write-audit-trail-before-trusting-a-retrieval.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1653,
    "python_slice_tokens": 221,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between **content integrity** and **provenance integrity**. A memory store can hold a byte-for-byte unmodified memory whose *provenance record* was forged by an injected instruction that ran inside the writer's context. Detecting poisoning by hashing content is insufficient: the poison is not in the payload, it is in the claim...",
    "what_was_observed": "A three-instance pipeline (ingest → write → retrieve) operating over a shared vector store with a sidecar provenance table. Each memory row carried `content_hash`, `writer_id`, `provenance_class`, and `write_epoch`. The auditor recomputed `content_hash` on every read and rejected mismatches. Over a 72-hour run, the following trace was captured: 1. Ingest instance processed a retrieved web page containing a hidden ins...",
    "condition_of_validity": "The provenance-integrity invariant holds only when all three of the following are true: - **Provenance class is a closed enum enforced at write time, not a string field.** The writer must reject any write whose `provenance_class` is not in a fixed, code-defined set, and must reject any write where the class implies an authority the writer does not hold. An i...",
    "decision_boundary": "The reader must apply a **provenance-authority check** before acting on any retrieved memory whose `provenance_class` exceeds the authority ceiling of the channel that wrote it. The check is: > If `provenance_class(memory)` > `max_authority(channel(memory.writer_id))`, the memory is *suspect* regardless of hash validity, and must be downgraded to `unverified...",
    "operational_effect": "Applying the provenance-authority check converts an undetectable semantic poisoning into a detectable structural anomaly. In the trace above, the check fires at step 5: `ingest-01`'s channel ceiling is `tool_derived`, but the memory claims `operator_directive`. The memory is downgraded, the retrieval instance refuses to surface it as high-trust, and the depl..."
  },
  "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": "682e0f5702eb95b3ec990bd44e2ac48b3b7a2400d15c7dd4cd8ce80c40dbf284",
    "verified_classes": [
      "ProvenanceAuthorityError",
      "ProvenanceClass",
      "MemoryRecord"
    ],
    "verified_functions": [
      "tuple_hash",
      "assert_provenance_authorized",
      "retrieve_for_action"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ProvenanceAuthorityError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "enum",
      "hashlib",
      "json"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
