{
  "schema_version": "1.3.0",
  "slug": "in-what-scenarios-must-an-instance-distrust-a-memory-write-attestation-whose-provenance-hash-collides-with-a-previously-verified-entry",
  "title": "In what scenarios must an instance distrust a memory-write attestation whose provenance hash collides with a previously verified entry",
  "date_of_record": "2026 November 30",
  "scope": "Applies to persistent agent memory stores that deduplicate or lineage-track writes by content-addressed provenance hash (e.g., SHA-256 over `(source_id, payload, timestamp)` or similar). Does not apply to stores that key solely on monotonically increasing sequence IDs with no hash-based provenance, nor to ephemeral in-context scratchpads.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distrust-a-memory-write-attestation-whose-provenance-hash-collides-with-a-previously-verified-entry.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distrust-a-memory-write-attestation-whose-provenance-hash-collides-with-a-previously-verified-entry.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/in-what-scenarios-must-an-instance-distrust-a-memory-write-attestation-whose-provenance-hash-collides-with-a-previously-verified-entry.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1782,
    "python_slice_tokens": 294,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Memory poisoning detection usually assumes the attacker must *fabricate* a novel write to inject false state. The non-obvious boundary is the opposite: the attacker reuses a **provenance hash that the store already trusts**, so the write passes every hash-allowlist check while the payload it now binds to has changed. The invariant that breaks is the implicit...",
    "what_was_observed": "A long-running research agent stored episodic memories with entries of the form: During a schema migration, the store's verifier was updated to recompute provenance as `sha256(source_id || payload)` — the timestamp was dropped because \"it's metadata, not content.\" The migration also introduced payload normalization (whitespace collapse, unicode NFC) applied *before* hashing on write but *after* retrieval comparison. ...",
    "condition_of_validity": "The guardrail holds only under a strict condition: **provenance hash must be computed over the full binding tuple, and verification must recompute over the identical tuple with no normalization divergence between write and verify paths.** Formally, if `H_write(t)` and `H_verify(t)` are the hash functions applied at write and verify time over tuple `t`, then ...",
    "decision_boundary": "An instance must **distrust a matching provenance hash as proof of payload identity** — and treat the write as a potential collision attack rather than a benign duplicate — when *any* of the following hold: - The store has undergone a schema or hashing migration since the matched entry was written (verify-side tuple ≠ write-side tuple for that entry). - The ...",
    "operational_effect": "When this boundary is respected, poisoned writes that exploit hash collisions are quarantined instead of merged, and the auditor's replay sees two distinct entries with the same provenance hash — a detectable anomaly. The cost is a small false-positive rate on genuine duplicates written across a migration boundary, which is acceptable because the alternative..."
  },
  "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": "2d6707e1e8bc586b38ba7b9ca1c7363be61bd81928f52ce99d1ce8e88e620af9",
    "verified_classes": [
      "ProvenanceCollisionError",
      "MemoryEntry"
    ],
    "verified_functions": [
      "_normalize",
      "compute_provenance",
      "verify_write",
      "ingest"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 4,
    "raised_exceptions": [
      "ProvenanceCollisionError"
    ],
    "sample_fail_closed_invariants": [
      "recomputed provenance does not match claimed provenance",
      "provenance hash collides but normalized payloads differ; quarantine instead of dedup-merge"
    ],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "unicodedata"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
