fix(skills-init): allow Git retries after stale destinations - #2655
Open
Tethys0 wants to merge 1 commit into
Open
fix(skills-init): allow Git retries after stale destinations#2655Tethys0 wants to merge 1 commit into
Tethys0 wants to merge 1 commit into
Conversation
Signed-off-by: Bo Zhang <187063395+Tethys0@users.noreply.github.com>
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
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.
skills-initretries its configured Git refs after an init-container restart. A prior attempt can leave a ref destination populated, so the nextgit clonefails withdestination path already existsand masks the original fetch failure. This change stages each clone in a temporary sibling, preserves the existing destination until the new clone is ready, then atomically installs the staged result. It also validates the managed destination, preserves the existing 0755 skill-root permissions, and keepsSubPathprocessing inside the staged tree.Scope
Testing
go test -race ./core/internal/skillsinit(43 passed)go vet ./core/internal/skillsinitgofmtandgit diff --checkThe broader core test suite was also exercised; database tests require a Docker/Postgres provider unavailable in this WSL environment, while the non-database core tests passed.