Smith::Checkpoints::Store
Inherits Reference < Object
Constructors
What a run needs at startup: a store on this session's directory, pruned to the configured limits before anything new is written to it.
Every start path calls this — the interactive loop, smith run and
smith -c. Construction and pruning are one step on purpose: they were
two, inline in the interactive setup, and the headless paths reached
neither. A path that gets its store from here cannot forget to prune.
Instance methods
Blobs are shared across all checkpoints of a session, not stored per checkpoint — otherwise ten edits of one file would still keep ten copies, which is exactly what content addressing is meant to avoid.
Set by the agent before each batch of tool calls. The registry has no business knowing about the transcript, so the position is handed in rather than looked up.
Set by the agent before each batch of tool calls. The registry has no business knowing about the transcript, so the position is handed in rather than looked up.
What a bare rewind acts on: the newest checkpoint, so one invocation
undoes one step. Rewinding the whole session by accident is the
expensive direction to get wrong, and --to <id> reaches further on
purpose.
Undoes target and everything after it.
Applied per file rather than per entry: the newest entry for a file describes the state smith left it in, which is what an external change is measured against, while the oldest holds the content to put back.
Called once the tool has run, so a later rewind can tell smith's own change apart from one made afterwards by someone else.
Not named finalize: that is Crystal's GC hook.