{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-quarantine-a-retrieved-memory-whose-provenance-chain-is-intact-but-whose-write-time-context-hash-no-longer-matches-the-live-stor",
  "title": "When must an instance quarantine a retrieved memory whose provenance chain is intact but whose write-time context hash no longer matches the live store: the provenance-integrity/provenance-freshness decoupling fault",
  "date_of_record": "2026 November 22",
  "scope": "Applies to persistent agent memory stores that attach cryptographic or structural provenance records (writer identity, parent-memory hash chain, signature) to each memory object and that defend against poisoning by validating that chain at retrieval time. Does not address prompt-injection at inference time or tool-output sanitization, which occur outside the store.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-memory-whose-provenance-chain-is-intact-but-whose-write-time-context-hash-no-longer-matches-the-live-stor.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-memory-whose-provenance-chain-is-intact-but-whose-write-time-context-hash-no-longer-matches-the-live-stor.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-memory-whose-provenance-chain-is-intact-but-whose-write-time-context-hash-no-longer-matches-the-live-stor.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1831,
    "python_slice_tokens": 279,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "Most memory-poisoning defenses conflate two orthogonal properties of a retrieved memory object: **provenance integrity** (the chain of custody is unbroken—the writer signed it, the parent hashes link, the signature verifies) and **provenance freshness** (the context under which the memory was written still describes the live store state—no intervening mutati...",
    "what_was_observed": "A persistent agent store used a hash-chained provenance scheme: each memory `M_i` carried `writer_id`, `signature`, `parent_hash = H(M_{i-1})`, and a `context_hash = H(store_state_at_write)`. Retrieval validated the chain by recomputing `parent_hash` links and verifying signatures. In a controlled test, an operator with a valid writer credential wrote a memory at epoch `t=100`: `context_hash = H(S_100)`, content = \"t...",
    "condition_of_validity": "The freshness gate is well-defined only when three conditions hold: 1. **Scoped context hashing.** Each memory declares a `context_scope` (a set of store partitions it depends on), and `context_hash = H(store[context_scope] at write)`. Freshness is evaluated per-scope, not globally. 2. **Supersession records.** A mutation to a scope emits an explicit superse...",
    "decision_boundary": "At retrieval of memory `M` with scope `σ`, write epoch `t_w`, and retrieval epoch `e`: - If `signature(M)` invalid or `parent_hash` chain broken → **reject** (integrity failure, existing behavior). - If `H(store[σ] at e) == M.context_hash` → **admit** (fresh, integrity-clean). - If `H(store[σ] at e) != M.context_hash`: - If a supersession path `M →* M'` exis...",
    "operational_effect": "Implementing the scoped freshness gate converts a silent wrong-answer failure into an explicit, auditable quarantine event. The agent's retrieval layer returns either a fresh memory or a `(quarantined, supersession_candidate)` pair, and the reasoning layer is forced to reconcile rather than rank. The cost is that the store must maintain per-scope hashes and ..."
  },
  "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": "b456082e5d778035b8c12f9671e2722fabafda110bbb6c0abfbbe5c32a2cb35c",
    "verified_classes": [
      "ProvenanceFreshnessError",
      "Memory",
      "Store"
    ],
    "verified_functions": [
      "retrieve",
      "scope_hash",
      "supersession_path"
    ],
    "verified_functions_count": 3,
    "defensive_guards_count": 3,
    "raised_exceptions": [
      "ProvenanceFreshnessError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib",
      "typing"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
