Skip to main content

Module checkpoint_log

Module checkpoint_log 

Source
Expand description

Per-session log of turn-level checkpoint records.

Each session writes a checkpoints.jsonl file alongside its transcript. One line = one turn, capturing the pre/post checkpoint ids and the set of files this turn touched (via structured tool calls and/or fallback shell-diff).

This metadata is what recursive sessions rewind reads to:

  1. find the right pre checkpoint to restore to,
  2. compute the union of files touched in the rewound-away turns,
  3. detect conflicts where the workspace’s current state diverges from this session’s last known post-snapshot.

Structs§

CheckpointLogWriter
Append-only writer.
CheckpointRecord
One record per turn.

Enums§

TouchedVia

Functions§

read_log
Read all records from path. Empty / missing file → empty vec.
truncate_to_turn
Truncate the log to records with turn < cutoff. Atomic via temp file + rename.