Expand description
Embedded edition storage adapters (historical ADR-009).
One EmbeddedKernelStore opens one data directory
(historical ADR-012 layout:
FORMAT_VERSION plus an engine-named file under store/) and implements every persistence
port the kernel needs: graph reads (materialized adjacency per
historical ADR-010),
node details, the append-only context event log, projection runtime state,
and snapshots. SQLite is the only active engine and is fsync-durable, so
the crash contract is: no data loss beyond the in-flight event, no duplicate
application on replay. Unsupported store formats are detected and rejected
without being touched.
The observable semantics are pinned by kmp-conformance: the same
suite that certifies the in-memory kernel store and the Neo4j/Valkey
adapters runs against this store.
Structs§
- Bundle
Event Range - Inclusive positions in this bundle’s event stream. Export is a portable replay, not a view over the store’s internal sequence keys: full and filtered bundles both renumber their payload positions from one while preserving every event’s aggregate revision (and therefore every ref). An empty snapshot has neither bound.
- Bundle
Header - First line of a bundle file: identity and integrity metadata for fail-fast import. Fields added in bundle format 2 default only so format-1 bundles remain readable; every format-2 field is validated before replay.
- Embedded
Kernel Store - Every kernel persistence port on one local store.
- Import
Report - Outcome of an import: events replayed and projections rebuilt.
- Projection
Rebuild Report - Outcome of a projection rebuild from the append-only event log.
- Quality
Telemetry Retention - Bounded-journal policy for local quality observations.
- Sqlite
Quality Telemetry Reader - Read-only query adapter for the shareable local quality journal.
- Sqlite
Quality Telemetry Writer - Multi-process SQLite writer for the bounded local quality journal.
- Store
Migration Receipt - What a completed historical store migration recorded in its destination.
Enums§
- Storage
Engine - The engine behind a data directory’s
store/. Chosen once, when the directory is created; recorded as itsFORMAT_VERSION; never guessed.
Constants§
- BUNDLE_
FORMAT_ VERSION - EVENT_
FORMAT_ VERSION - The logical shape of the event log carried by a portable bundle.
- SUPPORTED_
FORMAT_ VERSION - The layout this binary creates for a fresh data directory: shareable SQLite (historical ADR-018).
Functions§
- format_
version_ path - merge_
bundles - Merges only histories that have a deterministic answer: identical streams or one exact prefix of the other. Two branches that both appended at the same position are a semantic conflict, so KMP refuses to invent an order.
- quality_
telemetry_ path - read_
stamped_ version - The version stamped in
data_dir, without applying the open gate. - store_
file_ path_ for - Where
enginekeeps its store insidedata_dir. - validate_
store_ layout - Applies the existing-layout gate without creating or opening anything.
- verify_
bundle - Validates a bundle without opening or mutating a store. This is the recovery check: identity, range, about coverage and digest are all proved before an operator trusts a saved copy.