Expand description
KernelSnapshot — serializable point-in-time capture of kernel state.
Snapshot is independent from the WAL: WAL stores history (full replay from a fresh state), snapshot stores a single state at tick N. Hybrid recovery (snapshot at N + WAL from N+1) is the future integration; they ship as orthogonal mechanisms.
What snapshot includes:
- All instances (entities, components, scheduler, ledger, id_counters, inflight_refs, wall_remainder, local_tick).
- Kernel-level
next_instance_idcounter.
What snapshot excludes:
Box<dyn KernelObserver>(not Serialize).ActionRegistry(fn pointers, not Serialize).- Attached
WalWriter(independent persistence layer).
After Kernel::from_snapshot(...), the caller must re-register every
Action that was active when the snapshot was taken, and re-attach
observers/WAL as needed.
Determinism (A1): identical kernel state produces identical snapshot bytes — postcard-canonical encoding + BTreeMap iteration (A5).
Structs§
- Kernel
Snapshot - Opaque point-in-time snapshot of kernel state.
Enums§
- Snapshot
Error - Snapshot postcard round-trip failures.