Offer to delete leftover hibernation snapshot on droplet destroy#49
Merged
ret2libc merged 2 commits intotrailofbits:mainfrom Mar 23, 2026
Merged
Conversation
When a user hibernates a droplet then wakes it up but declines to delete the snapshot, the snapshot is left behind. If they later `dropkit destroy` the droplet, the orphaned snapshot persists silently, incurring storage costs. After destroying the droplet, check for a matching hibernation snapshot and prompt the user to delete it. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ret2libc
reviewed
Mar 23, 2026
Respect the user's earlier choice: if they declined to delete the snapshot during wakeup, defaulting to 'yes' here would second-guess that decision. Default to 'no' so the prompt is informational rather than presumptive. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
AI Agent with Greg: We noticed that orphaned snapshots were quietly accumulating like digital dust bunnies — time for some spring cleaning! 🧹
dropkit-<name>hibernation snapshotProblem:
hibernate→wakeup(decline snapshot deletion) →destroyleft the snapshot behind silently, incurring storage costs with no indication to the user.Test plan
uv run ruff check dropkit/main.py— all checks passeduv run ruff format --check dropkit/main.py— already formatteduv run ty check dropkit/main.py— all checks passeduv run pytest tests/ -v— 288 tests passed, 31% coverage (above 29% minimum)dropkit hibernate <name>→dropkit wakeup <name>(decline snapshot delete) →dropkit destroy <name>— verify snapshot prompt appearsdropkit destroy <name>on a droplet with no snapshot — verify no extra prompt🤖 Generated with Claude Code