Skip to content

fix(skills): preserve installed versions when updates fail - #507

Merged
huichen merged 1 commit into
mainfrom
claude/audit-f03
Sep 7, 2026
Merged

huichen merged 1 commit into
mainfrom
claude/audit-f03

Conversation

@huichen

@huichen huichen commented Sep 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Address F03 in CLI and desktop: unpack into a unique sibling staging directory, validate a nonempty root SKILL.md, then commit.
  • Keep the previous directory until replacement succeeds; roll back failed renames and recover a stable backup on the next commit after interruption.
  • Both installers use the same cross-process lock/backup protocol; reject non-directory destinations.
  • Staging and backups stay outside agent skill discovery.

Validation

  • Rust 1.97 fmt and all-target clippy for future-cli and desktop backend
  • Full CLI suite: 712 + 2 + 11 tests passed
  • Full desktop backend: 1113 + 1 tests passed (one pre-existing ignored doctest)
  • Bad ZIP/missing or empty SKILL.md preserve old content; rollback, interrupted rename recovery and competing installer locks tested.

Boundary

Directory replacement uses recoverable two-phase renames, not an unsupported claim of an atomic cross-platform directory exchange. Power loss can leave a backup for recovery; it does not delete the previous content.

@huichen
huichen enabled auto-merge (squash) September 7, 2026 05:24
@huichen
huichen merged commit fc9c8cb into main Sep 7, 2026
12 checks passed
@huichen
huichen deleted the claude/audit-f03 branch September 7, 2026 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant