Skip to content

Fix Windows CI: refuse copied skill links - #4

Open
luvor wants to merge 1 commit into
howdeploy:mainfrom
luvor:fix/ci-red
Open

luvor wants to merge 1 commit into
howdeploy:mainfrom
luvor:fix/ci-red

Conversation

@luvor

@luvor luvor commented Oct 21, 2026

Copy link
Copy Markdown

On windows-latest, Git Bash without symlink rights makes ln -s copy the skill directory. Every later install.sh --target pi run then stopped with "refusing to replace an existing skill directory", which broke the plugin job.

  • install.sh: if the link turns out to be a copy, remove it and fail with a clear hint (Developer Mode or MSYS=winsymlinks:nativestrict).
  • test.sh: check whether symlinks work. If they don't, test for that clear failure instead of the full link scenario.

scripts/test.sh passes locally on macOS. It has not been run on Windows: the Windows job will run on this PR.

Copilot AI balanced review requested due to automatic review settings October 21, 2026 19:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Correctness hinges on Windows/Git Bash ln -s copy-emulation behavior that cannot be verified in this environment and the author notes it is only validated by the pending Windows CI job.

No open issues 🎉

What changed in this PR

This PR fixes the Windows CI (windows-latest) plugin job. On Git Bash without symlink rights, ln -s silently copies the load-context skill directory instead of creating a symlink. Because install_skill_link already refuses to overwrite an existing skill directory, the leftover copy caused every subsequent install.sh --target pi run to abort with "refusing to replace an existing skill directory," breaking reruns. The fix detects the copy immediately, removes it, and fails fast with an actionable hint, and the test suite adapts to environments where symlinks are unavailable.

Changes:

  • install.sh: after ln -sfn, if the destination is not a symlink (i.e. it was copied), rm -rf it and die with guidance to enable Developer Mode or set MSYS=winsymlinks:nativestrict.
  • scripts/test.sh: probe whether symlinks work; if not, assert that the installer refuses to copy the skill (and leaves no load-context dir) instead of running the full link/uninstall scenario.
File Description
install.sh Adds a post-ln guard that removes a copied skill directory and fails with a clear, actionable Windows hint.
scripts/​test.sh Adds a symlink-capability probe; branches to a "refuse copy" assertion when symlinks are unavailable, otherwise runs the existing full install/uninstall test.

Review effort: Balanced

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.

2 participants