atelet: prune local pause snapshots - #705
Merged
Dmitry Berkovich (dberkov) merged 1 commit intoAug 7, 2026
Merged
Conversation
NekoPunch (orangeCatDeveloper)
force-pushed
the
issue-668-local-snapshot-gc
branch
from
August 4, 2026 01:52
32ebc1f to
c165fbf
Compare
NekoPunch (orangeCatDeveloper)
force-pushed
the
issue-668-local-snapshot-gc
branch
3 times, most recently
from
August 6, 2026 09:19
2648efe to
be55211
Compare
NekoPunch (orangeCatDeveloper)
requested a review
from Dmitry Berkovich (dberkov)
August 6, 2026 09:22
NekoPunch (orangeCatDeveloper)
force-pushed
the
issue-668-local-snapshot-gc
branch
from
August 6, 2026 17:02
be55211 to
d83178d
Compare
Dmitry Berkovich (dberkov)
left a comment
Collaborator
There was a problem hiding this comment.
minor comment, otherwise LGTM
Pause snapshots accumulated until the node disk filled; the control plane only ever references the latest one. Checkpoint now removes every existing snapshot before writing the new one, capping disk use at a single snapshot. Snapshot prefixes are validated as single path segments at the RPC boundary: a nested or relative prefix would nest on write or escape the actor's directory entirely.
NekoPunch (orangeCatDeveloper)
force-pushed
the
issue-668-local-snapshot-gc
branch
from
August 7, 2026 01:40
d83178d to
af9b566
Compare
NekoPunch (orangeCatDeveloper)
requested a review
from Dmitry Berkovich (dberkov)
August 7, 2026 01:41
Dmitry Berkovich (dberkov)
approved these changes
Aug 7, 2026
Dmitry Berkovich (dberkov)
merged commit Aug 7, 2026
a44545e
into
agent-substrate:main
11 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
atelet never deletes local pause snapshots, so they accumulate until the node disk fills (#668). The control plane only ever references the latest one (
LocalSnapshotInfois single-valued), so older directories are dead weight by design. Checkpoint now prunes every existing snapshot before writing the new one — each is superseded by the snapshot about to be written, and pruning first caps disk usage at a single snapshot. Pruning is best-effort: a failed delete is logged and retried by the next prune, never failing the checkpoint.Snapshot prefixes are now validated as single path segments at the Checkpoint/Restore RPC boundary (shared
ValidateLocalSnapshotPrefix). Previously only checked non-empty: a nested prefix likepause/2would silently write nested directories, and..could escape the actor's directory entirely.Fixes #668
Test plan