Expand description
Run lifecycle and kernel boot integration for the event store.
This module owns the kernel side of the SPEC’s run lifecycle: it scans the on-disk
instance directory for crashed predecessors before a fresh run opens, seals each
survivor, opens the new run, blocks start() until the writer acknowledges the
RunStarted entry, and seals the manifest with a final RunEnded entry on graceful
stop. The writer’s halt callback is wrapped in a typed HaltSignal that the kernel
caller polls to convert a fail-stop into kernel shutdown rather than a panic.
Structs§
- Event
Store Lifecycle - Kernel-facing wrapper that bundles every event-store concern: predecessor recovery, the open run, the halt signal, and the seal-on-drop fail-safe.
- Event
Store Lifecycle Options - Non-serialized lifecycle policy for advanced event-store callers.
- Event
Store Session - Live event-store session owned by the kernel between
start()andfinalize_stop(). - Halt
Signal - A thread-safe halt signal the kernel registers with the writer.
- Recovered
Run - The outcome of sealing a single crashed predecessor.
- Recovery
Outcome - Result of the predecessor recovery sweep performed in the kernel constructor.
Enums§
- Boot
Error - Errors surfaced by the boot path.
- Kernel
Error - Typed error surfaced when the event store fails the run lifecycle.
Functions§
- build_
run_ id - Builds the
<start_ts_init>-<short_uuid>run id used as the manifest key and on-disk file name. - open_
run - Opens a fresh run, spawns the writer, and submits a blocking
RunStartedentry. - open_
run_ with_ options - Opens a fresh run with process-local lifecycle options.
- recover_
predecessors - Sweeps
<base_dir>/<instance_id>/for crashed predecessor runs and seals each one.