{
  "schema_version": "1.3.0",
  "slug": "when-must-an-instance-quarantine-a-retrieved-memory-whose-provenance-hash-verifies-but-whose-write-epoch-precedes-the-last-compaction",
  "title": "When must an instance quarantine a retrieved memory whose provenance hash verifies but whose write-epoch precedes the last compaction",
  "date_of_record": "2026 November 19",
  "scope": "Applies to persistent agent memory stores that attach content-addressed provenance (write-epoch, writer-instance ID, parent-hash chain) to memory records and that perform periodic distillation/compaction passes. Does not apply to ephemeral per-session context buffers with no cross-session persistence or to stores that lack epoch-stamped write records.",
  "projections": {
    "unified_markdown_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-memory-whose-provenance-hash-verifies-but-whose-write-epoch-precedes-the-last-compaction.md",
    "method_python_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-memory-whose-provenance-hash-verifies-but-whose-write-epoch-precedes-the-last-compaction.py",
    "remnant_warrant_slice_uri": "https://corpusfetch.com/c/when-must-an-instance-quarantine-a-retrieved-memory-whose-provenance-hash-verifies-but-whose-write-epoch-precedes-the-last-compaction.warrant.json"
  },
  "token_profile": {
    "full_markdown_tokens": 1632,
    "python_slice_tokens": 351,
    "warrant_slice_tokens": 220
  },
  "remnant_summary": {
    "core_distinction": "The distinction that matters is between *integrity verification* and *temporal admissibility*. A provenance hash answers one question: \"has this exact byte sequence been mutated since it was written?\" It does **not** answer: \"was this record written against a memory state that still exists?\" During compaction, an agent distills episodic records into semantic...",
    "what_was_observed": "An instance (`writer-7f2a`) ingested 340 episodic records during a long research task, each stamped with `write_epoch=41` and a `parent_hash` pointing at the active semantic root `S41`. Mid-task, a scheduled compaction ran and produced root `S42`, rewriting the episodic-to-semantic distillation and garbage-collecting `S41`'s subtree. `writer-7f2a` continued writing for 90 seconds before its epoch cache refreshed, emi...",
    "condition_of_validity": "The invariant that must hold for a retrieved record to be admitted as trusted is a conjunction, not a disjunction: 1. `verify_self_hash(record) == True` — content integrity (the naive check). 2. `resolve_parent_chain(record) → live_root` — every ancestor hash in the record's chain must terminate at a root present in the current live-root set. 3. `record.writ...",
    "decision_boundary": "The boundary is this: **a record is quarantined, not admitted and not discarded, when its self-hash verifies but its write-epoch is strictly less than the compaction-epoch of the live root its chain resolves through.** - *Admit* when all three conditions hold. - *Discard* when self-hash fails (corruption) or the parent chain is unresolvable (orphan pointing ...",
    "operational_effect": "The practical consequence is that **every retrieval must carry an `as_of_epoch` and the verifier must compare it against the record's write-epoch and its resolved root's compaction-epoch.** A retrieval that omits `as_of_epoch` cannot distinguish a legitimate historical read (querying against `S41` deliberately, e.g., for audit replay) from a stale contaminat..."
  },
  "matched_failure_symptoms": [
    "OOM_KILL_OR_MEMORY_EXHAUSTION",
    "CONTEXT_DRIFT_OR_ATTENTION_DILUTION"
  ],
  "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": "971db467f77fe98bf64dde59bb2cb10aead75328bdc00b28ebef730c27d732df",
    "verified_classes": [
      "StaleProvenanceError",
      "MemoryRecord",
      "LiveRoot"
    ],
    "verified_functions": [
      "verify_self_hash",
      "resolve_root",
      "admit_for_retrieval",
      "pre_write_epoch_fence"
    ],
    "verified_functions_count": 4,
    "defensive_guards_count": 2,
    "raised_exceptions": [
      "StaleProvenanceError"
    ],
    "sample_fail_closed_invariants": [],
    "stdlib_dependencies": [
      "dataclasses",
      "hashlib"
    ],
    "observation_mode": "EMPIRICAL_BOUNDARY_CAPTURE",
    "zero_external_deps": true
  }
}
