Expand description
Session lifecycle operations: locking, truncation, and UUID chain recovery.
Merges the former session_lock.rs (Goal 151 sentinel lock) with
truncate_transcript_to_turn and read_last_message_uuid from
session.rs during the Goal 221 module refactor.
Structs§
- Session
Lock - RAII guard preventing concurrent writes to the same JSONL session.
- Session
Lock Busy - Error type carried inside [
std::io::Error::other] whenSessionLock::acquirerefuses because another live process holds the lock. - Truncate
Stats - Stats returned by
truncate_transcript_to_turn.
Functions§
- truncate_
transcript_ to_ turn - Truncate
transcript.jsonl(and the session’s.meta.jsonmessage_count) so that only the messages from turns0..cutoff_turnsurvive.