Snapshot v2 Format¶
This document specifies the HotMem Snapshot v2 directory format.
Layout¶
<snapshot_dir>/
manifest.json # authoritative index + checksums
memories.jsonl # one record per memory, sorted by id, base64 embeddings
metadata.json # informational generation info; NOT checksummed
attachments/ # opt-in; <sha256-of-range> files when copy_attachments=true
manifest.json¶
The authoritative index. Written with sort_keys=True, indent=2 for
determinism of the checksummed payload; the manifest itself also records the
export time (created_at) and hotmem_version, which are informational.
{
"format": "hotmem-snapshot-v2",
"schema_version": 2,
"snapshot_id": "<sha256 of canonical semantic snapshot projection>",
"snapshot_id_version": 2,
"snapshot_id_algorithm": "hotmem-snapshot-id-v2",
"memory_count": 42,
"file_backed_count": 3,
"inline_count": 39,
"created_at": "2026-07-08T14:00:00+00:00",
"hotmem_version": "0.2.5",
"files": {
"memories.jsonl": {"size": 12345, "sha256": "..."},
"attachments/<name>": {"size": 1024, "sha256": "..."}
},
"overall_sha256": "<sha256 of sorted per-file sha256 concatenation>",
"file_backed_references": [
{
"memory_id": "...",
"source_uri": "...",
"byte_offset": 0,
"byte_length": 100,
"source_checksum": "...",
"source_format": "csv",
"attachment": null
}
]
}
Field semantics¶
format: always"hotmem-snapshot-v2".schema_version:2. Bumped for future incompatible changes.scope(optional, informational): present on scoped daemon exports; recordscaller_id,session_id,source,namespace,permitted_namespaces,share_approvals,exported_count,omitted_count, andstore_id. It is never part ofoverall_sha256. Semantic namespace partition keys (namespace,permitted_namespaces) participate in v2 semanticsnapshot_id; caller/session/counter provenance insidescopeis excluded as packaging noise.snapshot_id,snapshot_id_version,snapshot_id_algorithm(#96):- New Snapshot v2 writers emit
snapshot_id_version: 2andsnapshot_id_algorithm: "hotmem-snapshot-id-v2". - Under v2 (
hotmem-snapshot-id-v2),snapshot_idis the domain-separatedSHA-256digest of the canonical semantic snapshot projection over all 30preserverecord columns fromMEMORY_FIELD_INVENTORY(#99, #142), canonicalfile_backed_references(includingattachmentbindings), and normalized namespacescope(compute_semantic_snapshot_id). - Two snapshots with the same
content_hashvalues in different namespaces, or with different portable metadata, provenance, lifecycle, relationship, or attachment reference state, produce distinct v2snapshot_idvalues. - Legacy v1 manifests (
snapshot_id_version: 1,snapshot_id_algorithm: "hotmem-snapshot-id-v1", or unversioned pre-#96 manifests) usecompute_legacy_snapshot_id(SHA-256of sortedcontent_hashstrings) and remain verifiable under an explicit backward-compatibility rule. created_at/hotmem_version: informational provenance of the export. They are not covered by any digest, so re-exporting the same DB changesmanifest.jsonbytes but never changessnapshot_id.files: per-file{size, sha256}. Onlymemories.jsonland any copiedattachments/<name>are listed.metadata.jsonis intentionally not listed (informational only, so wall-clock timestamps don't break determinism or verification).overall_sha256:SHA-256of the concatenated per-filesha256hex digests, in sorted-by-filename order.file_backed_references: one entry per file-backed memory.attachmentis the filename withinattachments/when the byte range was copied in (opt-in, small ranges), ornullwhen the memory still points at its originalsource_uri. Older snapshots wrote this key asfile_references; the reader accepts both spellings for compatibility.
memories.jsonl¶
One JSON object per line, sorted by id. Each record carries the full memory
record payload (schema_version: 2, plus optional record_schema_version
carrying the row's stored SQLite memories.schema_version when it differs from
2; row version 2 is implicit in the 2 envelope). Embeddings are stored
as base64 so the JSONL is text-portable and can be rehydrated without
re-embedding.
{
"schema_version": 2,
"record_schema_version": 1,
"id": "...", "identifier": "...", "memory_type": "fact" | "file",
"fact_text": "..." | "", "fact_summary": "..." | null,
"embedding": "<base64 or null>", "embedding_dim": 64,
"embedding_model": "hotmem-hash-v1", "source": "...", "importance": 0.5,
"metadata": {}, "content_hash": "...",
"ttl_seconds": null | 3600, "namespace": "", "tier": "hot", "tags": [],
"related_memories": [], "parent_memory": "",
"source_uri": null | "...", "byte_offset": null | 0, "byte_length": null | 100,
"source_checksum": null | "...", "source_format": null | "csv",
"provenance": null | {}, "created_at": "...",
"updated_at": null | "...", "snapshot_id": "",
"promotion_state": "HOT", "promotion_candidate": 0
}
Timed records use metadata["hotmem.temporal.v1"], an object containing
version: 1 and the asserted valid_from, valid_until, and recorded_at
timestamps. Interchange v1 and legacy JSONL and JSONL.GZ use the same member.
The Snapshot v2 format and record schema version stay the same. Time
assertions participate in the portable state fingerprint.
33-column field disposition contract (#99, #142)¶
Every column of the SQLite memories table (hotmem.db._MEMORY_COLUMNS) is
governed by hotmem.interchange.MEMORY_FIELD_INVENTORY:
preserve(30 columns):id,identifier,fact_text,source,importance,metadata_json(metadata),content_hash,ttl_seconds,created_at,namespace,tier,memory_type,source_uri,source_format,source_checksum,byte_offset,byte_length,updated_at,snapshot_id,promotion_state,promotion_candidate,parent_memory,related_memories,tags,schema_version(record_schema_version),fact_summary,provenance_json(provenance),valid_from,valid_until, andrecorded_at.regenerate(3 columns):embedding,embedding_dim,embedding_model. Compatible stored vectors (matching(embedding_model, embedding_dim)and finite unit-norm float32 payload) are reused without recomputation; incompatible or missing vectors are rebuilt fromfact_text/fact_summaryunder the active embedder.- Store-local tables (
store_meta,events,operation_ledger,sync_checkpoints,handoff_ledger,bundle_index): intentionally excluded frommemories.jsonlbecause they represent instance-local state.
All fields round-trip: namespace, tier, tags, ttl_seconds, and
provenance survive snapshot -> hydrate (verified by tests). Unknown
top-level keys are preserved on hydrate under
metadata["_interchange_unknown"].
metadata.json¶
Informational only. Excluded from overall_sha256 so two snapshots of the
same DB differ only in created_at (and host).
{
"hotmem_version": "0.2.1",
"created_at": "2026-07-08T14:00:00+00:00",
"host": "<hostname>",
"db_path": "...",
"counts": {"inline": 39, "file": 3, "total": 42},
"scope": {"caller_id": "caller-a", "exported_count": 39,
"scope_omitted_count": 1, "disclosure_omitted_count": 2,
"omitted_count": 3, "redacted_count": 0, "...": "..."}
}
host and db_path are empty strings on scoped daemon exports (no path
disclosure). scope is present only for scoped exports; it is informational
and never checksummed.
attachments/¶
Empty by default. When copy_attachments=true (CLI --attach, API
copy_attachments: true), file-backed byte ranges smaller than 8 KB
(ATTACH_THRESHOLD) are copied into attachments/<sha256-of-range> and the
corresponding file_backed_references[].attachment is set to the filename.
Larger ranges always stay referenced (reference-not-duplicate principle). On
any read error, truncation, or source_checksum mismatch, the attachment is
not written, the original source_uri is kept, and the snapshot never
fails; the record remains a declared external dependency.
Every declared dependency is verified before hydration: attachments/ names
must be single path segments confined to the snapshot, listed in
manifest.files, and match the declared size and source_checksum (or
sha256) of file_backed_references / attachments.
When the original backing file is absent from a clean runtime, on-demand byte
hydration (hydrate_memory_detailed / hydrate_many) can materialize the
verified slice from attachments/ if base_dir points at this snapshot
directory. The returned bytes are length-checked and verified against
source_checksum when present.
Hydration¶
hydrate(db, path) infers the format from the path:
- A path ending in
.jsonlor.jsonl.gz, or an existing file -> legacy single-file reader (tolerates plain records, stored-embedding records, and v2-columns-in-jsonl). - A directory with
manifest.json-> v2 reader: verify all listed file SHA-256s +overall_sha256(hard error on mismatch ->SnapshotChecksumError-> HTTP 409), then streammemories.jsonlinto the DB in one transaction (a failure rolls the whole hydrate back). File-backed references are reconstructed without touching the backing files (references preserved, not bytes copied); reading their bytes later can use the snapshot's verifiedattachments/whenbase_diris the snapshot directory. - A directory with
memories.jsonlbut nomanifest.json-> legacy reader on that file. - A directory with neither ->
SnapshotChecksumError("missing_manifest").
Hydration semantics (shared with the interchange contract,
docs/okf/interchange-v1.md §7):
- Stored embeddings are reused only when they are compatible:
embedding_model == hotmem-hash-v1,embedding_dim == 64, and the base64 blob decodes to exactly 256 bytes. Otherwise the record is re-embedded fromfact_text(inline) orfact_summary(file-backed); a file-backed record with no summary gets an empty embedding (NULL-embedding convention, #38). - Results report
loaded,skipped_dupes, andinvalid(records that parsed but failed validation and were not stored). Deduplication follows the logical identity contract:(namespace, content_hash)for non-empty hashes (docs/okf/interchange-v1.mdsection 3.1). Repeating a restore in the same namespace reports skips; identical records in another namespace are stored. Structural corruption -- digest/size mismatch, unparseable line -- remains a hard error. - Manifest-listed paths are confinement-checked: absolute paths,
..traversal, and symlink escapes fail verification before any file is read. - Inserts run in bounded batches with database-backed deduplication; no per-record commits, and the destination hash set is never loaded whole.
Determinism¶
Identical DBs exported with the same semantic scope produce byte-identical
memories.jsonl and attachments/ contents and an identical v2 snapshot_id.
memories.jsonl is always written as raw UTF-8 with LF (\n) record
terminators on every platform (including Windows) so on-disk file sizes and
SHA-256 digests match manifest.json regardless of host OS newline
conventions.
Semantic snapshot_id is independent of packaging choices: bundling byte
ranges (copy_attachments), attachment filenames, packaging timestamps
(created_at), hotmem_version, metadata.json, and regenerated embedding
columns never change it. It does depend on the semantic namespace scope
(namespace, permitted_namespaces) recorded in scope, so exporting the
same DB under different scopes yields different identities.
manifest.json bytes may differ by the informational created_at/
hotmem_version fields, and metadata.json by created_at/host — neither
is checksummed, so byte verification is unaffected.
Legacy compatibility¶
swap.jsonl(plain, no stored embedding) -> re-embedsfact_texton hydrate (original v0.1 behavior).swap.jsonlwith a base64embedding_b64field per record -> reuses the stored embedding when itsembedding_dim/embedding_modelare compatible (this is the legacy field name; Snapshot v2 records useembedding)..jsonl.gz-> gzip-compressed legacy JSONL.- The legacy writer emits the full v2 column set +
embedding_b64, and the reader preserves all of them on hydrate (namespace, tier, tags, provenance, file-backed references), so legacy snapshots round-trip intact. - A v2 record carrying
embeddinghydrates through the same compatibility rule asembedding_b64; the two spellings are interchangeable to the readers. hotmem.swapremains a re-export shim; existing imports keep working.
Versioning¶
Bump SCHEMA_VERSION in src/hotmem/snapshot/format.py and add a migration
path in reader.py for future incompatible format changes. Older snapshots
remain readable; the reader dispatches by schema_version.
Canonical semantic snapshot identity (issue #96)¶
Snapshot v2 separates semantic snapshot identity (snapshot_id) from
package-byte integrity (files and overall_sha256), per-memory logical
identity ((namespace, content_hash), #100), delta CAS fingerprinting
(record_fingerprint, #73), and replica clone/fork divergence
(lineage_fingerprint, #94):
- Per-record semantic projection (
semantic_record_projection/semantic_record_digest): - Includes the
preservecolumns fromMEMORY_FIELD_INVENTORY(#99, #142):id,identifier,fact_text,fact_summary,memory_type,content_hash,namespace,source,importance,metadata,provenance,tags,ttl_seconds,created_at,updated_at,tier,promotion_state,promotion_candidate,parent_memory,related_memories,source_uri,source_format,source_checksum,byte_offset,byte_length,snapshot_id(row origin-snapshot column), and resolved rowschema_version(record_schema_versionwhen present).valid_from,valid_until, andrecorded_atparticipate via the reserved member inmetadata. - Excludes the 3
regeneratecolumns (embedding,embedding_dim,embedding_model) and store-local tables. - Normalizes all string scalars and JSON object keys to Unicode NFC,
recursively sorts JSON object keys (
metadata,provenance), normalizes-0.0to0.0, normalizessource_urivianormalize_source_uri, and resolves omitted/null values to their documented defaults while preserving explicitsource: ""andbyte_offset: 0/byte_length: 0. - Lifecycle enums default only when absent or blank (
tier->"hot",promotion_state->"HOT"); invalid non-blank values are preserved verbatim so distinct invalid states never collide with a real default. Non-objectprovenanceis preserved as{"value": ...}(mirroring metadata) rather than silently dropped. - Domain prefix:
hotmem-snapshot-record-v2:<canonical_json>. - Snapshot envelope (
semantic_snapshot_projection/compute_semantic_snapshot_id): records: ascending-sorted list of per-recordsemantic_record_digesthex strings (order-independent overmemories.jsonllines; duplicate logical records are preserved as a deterministic sorted multiset). Note that hydration deduplicates by(namespace, content_hash), so a snapshot containing duplicate logical records does not reproduce itssnapshot_idwhen re-exported from the hydrated store.file_backed_references: canonically sorted list of projectedFileReferencedicts (memory_id, normalizedsource_uri,byte_offset,byte_length,source_format,source_checksum). Theattachmentbinding is deliberately excluded: bundling bytes is a packaging choice, while the referenced slice is identified by the reference fields above.scope:{"namespace": ..., "permitted_namespaces": [...]}when a semantic namespace filter is present, ornullwhen unscoped (excluding transient caller/session/counter fields).version:2.- Domain prefix:
hotmem-snapshot-id-v2:<canonical_json>. - Empty unscoped snapshots hash
{"file_backed_references":[],"records":[],"scope":null,"version":2}to the fixed digestf8a6cf35d0d17fab750458fdd94399434cf4e5816fa10cb166d01ac22946b3dd. - Versioned verification & legacy compatibility (
verify_manifest): snapshot_id_version: 2("hotmem-snapshot-id-v2"): recomputes and enforces the v2 semantic digest overmemories.jsonl,file_backed_references, andscope.snapshot_id_version: 1("hotmem-snapshot-id-v1"): recomputes and enforces the legacy v1 content-hash-list digest (compute_legacy_snapshot_id).- A declared
state_fingerprintis always verified, including on versioned manifests whose history was trimmed and therefore carry noreplay_cursor. - Unversioned legacy manifests: cursor-bearing (#94) manifests verify
against the v1 (or v2) digest; pre-#94 cursorless manifests preserve
byte-integrity compatibility.
hotmem verifyreports the manifest's declaredsnapshot_id_version/snapshot_id_algorithm(0/""when unversioned). - Unknown or mismatched
(snapshot_id_version, snapshot_id_algorithm)metadata fails closed withSnapshotChecksumError("malformed"), as does a record whose semantic projection cannot be coerced.
Portable mount identity and replay cursors (issue #94)¶
Snapshot v2 manifests carry additive lineage and replay cursor fields:
mount_id: logical mount/workspace identity (mnt-<hex>or explicit mount configuration). Preserved across clones, restores, and forks of the same workspace.replica_id: runtime SQLite replica identity (rep-<hex>). Exported as source provenance; a hydrating target always keeps or generates its own distinctreplica_id.history_id: source replica event-log epoch (hist-<hex>). Regenerated whenever a replica is cloned, restored, forked, or replaced.state_fingerprint: canonical state fingerprint over exported records that fingerprint successfully (annotation-invalid rows are exported and counted but excluded from this digest).replay_cursor: opaque, versionedhmc1.<payload>.<checksum>replay cursor bound to(mount_id, replica_id, history_id, base_snapshot_id, scope, seq, anchor_event_id). The checksum is the full SHA-256 digest of the token and detects corruption/accidental drift, but it is not authentication (an explicit non-goal); use authenticated transport for untrusted channels. Cursors and manifests must be treated as untrusted input. Scope (namespace,event_types) is fixed at issuance; replay callers cannot narrow it later. Cursors issued by the current runtime default to the full reconstructing scope (memory.created,memory.updated,memory.deleted) and carryscope_mode: "reconstructing". Pre-#98 cursors lack that marker and are treated as legacy create-only cursors: replay validates them as-is, upgrades them to the full reconstructing scope on first use, and writes the upgraded checkpoint. An explicitly issued narrow cursor carriesscope_mode: "explicit"and is never silently widened; replay fails withincomplete_reconstructing_scopeif its range contains an excluded update/delete transition.
Versioned (v1/v2) manifests and manifests carrying replay_cursor have their
derived identity fields verified against the payload during verify_manifest
(snapshot_id, memory_count, and any declared state_fingerprint); identity
fields are required alongside the cursor. Pre-#94 manifests with neither a
version nor a cursor keep byte-only verification.
Verification and hydration rules:
- A bare SQLite
seqinteger, numeric string, or unanchored mapping is never accepted as a portable cursor (ReplayCursorError(reason="unanchored_sequence")). - If
replay_cursoris present inmanifest.json,verify_manifestvalidates itshmc1prefix, version, checksum, and alignment withmount_id,replica_id, andhistory_idbefore any record is read. Legacy pre-#94 manifests withoutreplay_cursorremain readable. - Hydrating into an empty/clean store adopts
mount_id(whentarget_namespaceis unset) and recordsbase_snapshot_id,base_snapshot_scope(the semantic namespace scope needed to reproduce a v2snapshot_id),base_state_fingerprint,base_source_replica_id,base_history_id, andbase_cursor, establishing a"clone"relationship (compare_mount_lineage). - Independent local writes on a cloned replica transition its lineage to
"fork". Multi-writer ordering and automatic fork conflict resolution are intentionally undefined; cursor replay against a wrong source, stale/trimmed base, replaced history, or divergent fork fails closed before mutation.
Replay-safe state mutations and tombstones (issue #98)¶
Event-log replay reconstructs terminal store state across create -> update ->
delete sequences without duplicate application or deleted-record resurrection:
- Reconstructing vs. observational classification (
is_reconstructing_event/classify_event): - Reconstructing (
reconstructing: true,event_category: "reconstructing"):memory.created(transition: "create"),memory.updated(transition: "update"), andmemory.deleted(transition: "delete"). - Observational (
reconstructing: false,event_category: "observational"):memory.deduplicated,memory.promotion,memory.candidate,snapshot.imported,bundle.imported,bundle.discovered,hygiene.checked,hygiene.warning,index.rebuilt,sync.applied, andhandoff.applied. Observational events are never applied as state transitions during replay, and replay cursors rejecting non-reconstructingevent_typesfail closed withReplayCursorError(reason="non_reconstructing_event_type"). - Lifecycle promotion/candidate functions mutate portable
promotion_state,promotion_candidate, andupdated_at. They emit a reconstructingmemory.updatedwith the complete after-state in addition to the observationalmemory.promotion/memory.candidatesignal. Theemit_event=Falselifecycle option suppresses only the signal; the reconstructing update is always emitted. - Immutable envelope and payload schema (
EVENT_PAYLOAD_SCHEMA_VERSION = 1): - Every event carries
seq(monotonic replay position),event_id(UUID4 hex),memory_id(recordid),namespace(scope),event_type,occurred_at(ISO-8601 UTC),reconstructing,event_category, andpayload. - Reconstructing v1 payloads must carry
payload_schema_version: 1,event_category: "reconstructing",transition,id,namespace,content_hash,record_fingerprint(#99 canonical digest),occurred_at, andorigin: {"mount_id", "replica_id", "history_id", "runtime_generation"}. Envelopememory_idmust equalpayload.id.memory.updatedadditionally requires non-emptyprevious_content_hashandprevious_record_fingerprint;memory.deletedrequires non-emptyidentifier,content_hash, andrecord_fingerprint. - Category is derived from the event type. A reconstructing event whose
payload declares
event_category: "observational"(or an observational event declaring"reconstructing") is rejected asmalformed_event_payload; it is never silently skipped. - Unknown event types are rejected with
unsupported_event_typeunder the v1 contract. Adding a new event type requires a contract/version decision; it is not silently treated as observational. - Legacy
memory.createdevents lackingpayload_schema_versionremain replayable under v1 defaults (schema_version = 1) and are exempt only from the v1 envelope-precondition requirements. Repeat replay recognizes an already-applied legacy row by id + namespace + content hash; a legacy create deduplicated into a different id records a dedupe marker so later updates/deletes for that source id are skipped instead of failing as a missing target. - Complete after-state update representation (
memory.updated): memory.updatedcarries the complete 27-column portable after-state (#99, includingschema_version, explicitimportance: 0.0, and file-backed reference fields) plusprevious_content_hashandprevious_record_fingerprint.- File-backed updates derive
content_hashwith the canonical #100 reference identity (identifier+ normalizedsource_uri+byte_offset+byte_length; checksum excluded), not from the summary or checksum. Replay recomputes that canonical hash for relative references and accepts documented pre-#100 legacy aliases; absolute host paths cannot be rederived without the sourcebase_dirand are carried as declared. - Complete after-state was selected over partial field patches so replay
reuses
#99record normalization/validation and#78embedding resolution directly, while making repeat replay of an already-applied range a verified no-op (live_fingerprint == after_fingerprint). - Two-phase atomic validation and failure rules (
ReplayExecutionError): - Pass 1 validates the entire replay range before any SQLite write; Pass 2 executes inside one SQLite transaction and rolls back on any error.
- Pre-mutation failure reasons:
unsupported_payload_version,missing_payload_version,malformed_event_payload,invalid_event_order,missing_target_record,base_state_mismatch,tombstoned_record_resurrection,tombstoned_record_mutation,already_tombstoned,identity_mismatch,content_hash_conflict,origin_identity_mismatch, andincomplete_reconstructing_scope. - Tombstone identity, retention, and compaction preconditions
(
memory_tombstones/compact_tombstones): delete_memory_recordandmemory.deletedreplay remove the active row frommemoriesand persist a tombstone inmemory_tombstones(memory_id,namespace,identifier,content_hash,record_fingerprint,deleted_at,deleted_at_seq,delete_event_id,origin_mount_id,origin_replica_id,origin_history_id,metadata_json,tags,reason).- The replay tables are part of schema
user_version=7(v6 stores migrate additively;metadata_json/tagsare added to pre-existing tombstone tables). - Replaying a range containing
create -> update -> deletea second time recognizes thatdeleted_at_seq >= event.seqin the same history and skips superseded transitions without resurrecting the deleted record. trim_events_before_seqandtrim_events_by_countnever drop rows frommemory_tombstones.compact_tombstones(db, through_seq=..., acked_cursor_seq=..., strict=...)removes tombstones withdeleted_at_seq <= through_seqonly when:through_seq <= trimmed_through_seq(all pre-delete events have been trimmed fromevents),acked_cursor_seq is None or through_seq <= acked_cursor_seq,- no retained events with
seq <= deleted_at_seqremain ineventsfor the tombstonedmemory_id, and - no live row with
id == memory_idexists inmemories.
- Compaction advances
store_meta["compacted_tombstones_through_seq"], andvalidate_replay_cursorrejects any cursor withseq < compacted_tombstones_through_seq(reason="stale_base"). - Compaction with no tombstones at or below the requested horizon is a no-op. Safe retries after compaction resolve the operation ledger by caller/key/memory-id, so a delete/update retried after its tombstone was compacted still returns the recorded outcome.
- Tombstones retain non-secret
metadata_json/tagsclassification inputs so/v1/eventscan apply the same private/secret disclosure policy to amemory.deletedevent even after the live row is gone. - Known limitations of the #98 event-replay surface:
memory.updated/memory.deletedare library primitives exposed byhotmem.events; this issue does not add HTTP/CLI mutation endpoints.runtime.addis the production create-event path, and lifecycle promotion/candidate mutations emit reconstructing updates.- Legacy writers that insert directly (
swap.add_memory, directMemoryDB.insert, hydration/import) do not synthesize historicalmemory.createdevents. Event replay covers stores written through the runtime/new primitives; pre-existing rows should be hydrated from a snapshot/package base before relying on event replay. - Pre-#98 deletes have no delete event or tombstone to migrate. Replay protection applies to deletes recorded after this contract.
- File-backed canonical hashes are recomputed for relative references;
absolute host paths require the source
base_dirand are carried as declared identity.
- Authoritative hydration clears tombstones, replay watermarks, the saved replay checkpoint, and the history-epoch boundary for the restored record ids. A restored row therefore cannot remain both live and tombstoned, and compaction is not blocked by a pre-restore delete.
replace_historyclears tombstones and replay watermarks, resets the compaction/retention watermarks, and recordsstore_meta["history_epoch_start_seq"]. Replay of the new history starts after the retained audit boundary, so oldhmc1events remain immutable audit history and are not replayed as the new epoch.