Expand description
Checkpoint management for resumable sessions.
Checkpoints are held in memory. They support replay and resume within a process; they do not survive process loss, so a new process cannot resume a session started by another. “Atomic” below means a single assignment under a lock, not a transaction with a persistent store.
The CheckpointManager provides atomic checkpoint persistence so that
a crash cannot leave an event emitted but un-checkpointed (or vice versa).
For the initial implementation, storage is in-memory (Vec<SessionEvent>).
The real integration with SessionService for persistent storage is a
platform concern.
§Responsibilities
- Atomicity guarantee: event + state saved together in one operation
- Load/resume interface: retrieve all events and last run state
- Event log maintenance: ordered log for replay
Structs§
- Checkpoint
Manager - Manages in-process checkpoint state for resumable sessions.
- RunState
- Run-state persisted with each checkpoint.