fix(skills-init): skip existing Git skills - #2655
Open
Tethys0 wants to merge 1 commit into
Open
Conversation
EItanya
reviewed
Sep 1, 2026
EItanya
left a comment
Contributor
There was a problem hiding this comment.
What if we just make the skills download code reentrant safe? We can just check for the presence of an existing skill, and if it exists don't download the new one
Signed-off-by: Bo Zhang <187063395+Tethys0@users.noreply.github.com>
Tethys0
force-pushed
the
fix/skills-init-retry-2646
branch
from
September 2, 2026 23:28
d89039e to
1f12719
Compare
Author
|
Thanks — I adopted the reentrant-download approach. The updated implementation now skips a destination only when it already contains a real Added focused coverage for an existing skill, an incomplete destination, and symlinked paths. Verified with This force-update also replaces the earlier staging/replacement implementation. |
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
Fixes #2646.
Make Git skill downloads reentrant across
skills-initrestarts: a destination that already contains a real, regularSKILL.mdis treated as a completed skill and is not downloaded again. This lets a restart continue after another initialization step fails without re-cloning already materialized skills.Existing destinations are validated before they are accepted: the destination and
SKILL.mdmust not be symbolic links, the destination must be a directory, andSKILL.mdmust be a regular file. Invalid existing destinations return a clear error rather than being silently accepted.Scope
Testing
go test -race ./core/internal/skillsinit(40 passed)go vet ./core/internal/skillsinitgofmtandgit diff --check