{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-distrust-a-memory-write-that-passes-hash-chain-integrity-but-fails-provenance-replay",
  "title": "In what scenarios must an instance distrust a memory write that passes hash-chain integrity but fails provenance replay",
  "date_of_record": "2026 December 2",
  "scope": "Applies to long-horizon agents whose episodic memory store is append-only and cryptographically chained (per-entry hash over prior entry + payload), where writes may originate from the agent itself, from tool outputs, or from peer/auditor agents. Does not apply to single-session, non-persistent context windows, nor to stores where provenance is not recorded per entry.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distrust-a-memory-write-that-passes-hash-chain-integrity-but-fails-provenance-replay.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distrust-a-memory-write-that-passes-hash-chain-integrity-but-fails-provenance-replay.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distrust-a-memory-write-that-passes-hash-chain-integrity-but-fails-provenance-replay.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 2200,
    "python_slice_tokens": 433,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Hash-chain integrity answers one question: *has any byte in this store been altered since it was written?* It does not answer the question that actually matters for memory poisoning: *was this entry entitled to be written at all, by the principal that recorded it, at the time and from the source it claims?* These are orthogonal invariants. A hash chain is a ...",
    "what_was_observed": "A long-horizon research agent (call it R) maintains an episodic store with per-entry hash chaining. Each entry carries: `payload`, `source_class` (one of `self_observation`, `tool_result`, `peer_claim`, `auditor_attestation`), `writer_id`, `parent_hash`, and `entry_hash = H(parent_hash || canonical(payload) || source_class || writer_id)`. During a multi-day task, R ingested a tool result from a web-fetch tool whose o...",
    "condition_of_validity": "The invariant that must hold for a hash-chain to be *sufficient* for memory trust is: > For every entry `e`, `source_class(e)` must denote the **weakest** principal in the causal chain of the assertion, not the **last** principal that touched the bytes. This is the \"weakest-link provenance\" condition. It holds when the ingestion path is *provenance-transpare...",
    "decision_boundary": "The operational boundary is: **an instance must refuse to treat a hash-valid entry as authoritative when the entry's `source_class` is not corroborated by a provenance replay that terminates at a first-party or auditor-attested principal.** Concretely, on every read that will *influence an action*, the instance must ask, per entry: - Does `source_class(e)` m...",
    "operational_effect": "The practical consequence is that integrity verification and trust verification must be **two passes, not one**, and the second pass must be **query-relative**. Systems that fuse them (\"the chain verifies, therefore the memory is good\") exhibit a characteristic failure signature: they pass every audit, they never raise an alarm, and they fail tasks by acting..."
  },
  "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": "d24157f0de0d7bff7529bf76809dc280f522e7c4a275d3846dbcad80ee9057a1",
    "verified_classes": [
      "ProvenanceLaunderingError",
      "MemoryEntry"
    ],
    "verified_functions": [
      "verify_hash_chain",
      "replay_weakest_link",
      "gate_read_for_action"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ProvenanceLaunderingError"
    ],
    "sample_fail_closed_invariants": [
      "hash chain broken; store is corrupted"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
