Repository navigation
fix: prune skill backups when staging creation fails - #96
Merged
Merged
Conversation
This was referenced Oct 21, 2026
Closed
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.
When mirror pulls can create a backup but cannot create the staging directory, they still bypass retention after #88. Repeated failures can keep accumulating backups.
Move staging creation into the guarded operation and prune in
finally. If staging creation fails, preserve the untouched local library instead of deleting it for an unnecessary restore. Keep the new backup available for recovery.Add five regressions covering the #87 failure modes: dangling links, repeated partial backup failures, successful/failed rollback, and staging-directory failure. The original four fail before #88; the staging case fails on #88 and passes with this change.
Validation: 151 passed, 1 skipped (credential-dependent embedding integration); Ruff 0.12.2 lint/format and git diff --check pass. Local Python 3.11/macOS, temporary local storage, no live LLM calls.
Follow-up to #88 and #87.