Repository navigation
Test That the Directory the Skills Installer Registers Outlives the Run - #2554
Conversation
Each loader's kept-tree fetch, skills install, and cleanup now run in sequence under a test whose installer records the ROOT it would register as the Claude Code marketplace. The test asserts that directory is the kept skills-tree and still exists once the cleanup has run. Running the installer before the swap registers the staging tree, which the cleanup removes, and fails both the bash and the PowerShell case. Closes #1756 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🔵 Needs a closer look
Escape temporary paths before embedding them in PowerShell test scripts.
0 open findings
What changed in this PR
Adds cross-platform regression tests verifying the skills installer registers the durable skills-tree.
Changes:
- Adds registration-recording fixtures and helpers.
- Tests Linux and PowerShell lifecycle cleanup.
- Verifies staging and retired trees are removed.
| File | Description |
|---|---|
tests/test_bootstrap.py |
Adds cross-platform kept-tree registration tests and harness support. |
🧠 Review effort: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #2554 +/- ##
========================================
Coverage 58.40% 58.40%
========================================
Files 16 16
Lines 8090 8090
========================================
Hits 4725 4725
Misses 3365 3365
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The registration test quoted its fixture source and record paths into single-quoted PowerShell strings, so a temporary directory under a user name holding an apostrophe ended the string early and failed the case. The harness now takes an environment for the run, and the test reads both paths from it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Copilot's overview headline on aa8ce1b, "Escape temporary paths before embedding them in PowerShell test scripts" (which reported 0 open findings and opened no thread): real, fixed in 8c97996. The registration test quoted its fixture source and record paths into single-quoted PowerShell strings. With TMP set to a directory named |
…Test Job (#2558) ## Summary Promotes two changes from the `windows` lane. - [#2554](#2554) adds a test for each loader (`bootstrap.sh` and `bootstrap.ps1`). Each one runs the kept-tree fetch, the swap, the skills install and the cleanup in order, and asserts that the directory the installer registers as the Claude Code marketplace is the kept `skills-tree` and still exists after the run. It passes natively on Windows and on Linux, and running the installer before the swap fails it. - [#2555](#2555) adds a hub-only `windows-test` job to `test-pull-request.yml`. It runs the suite on `windows-latest` from Git Bash with uv installed, and `check-workflow-status` now requires it. Its first green hosted run took about 196s for 2277 tests. The required check's name is unchanged, and no other repository's gate moves. Closes #1756 Closes #1143 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Summary
Each loader's kept-tree path now runs as one sequence under a test: fetch, swap, skills install, cleanup. The installer in the fixture is the real wrapper (
install-skills.shorinstall-skills.ps1) beside a stand-inscripts/skills_install.pythat records theROOTit would pass toclaude plugin marketplace add. Each test asserts that the recorded directory is the keptskills-tree, that it still holds the installer once the cleanup has run, and that no staging or retired tree is left beside it.This is the test #1756 named as its done condition: the registered directory outlives the run, on both platforms. The kept-tree design itself landed in #1773.
Verification
tests/test_bootstrap.pypasses (68 passed, 32 skipped). The new PowerShell case runs the realbootstrap.ps1functions under pwsh 7 on this host.python:3.12-slimas a non-root user,TestKeptTreeHandlingpasses (20 tests).TestPowerShellKeptTreeHandlingpasses too (25 tests, 5 skipped), run under pwsh 7 copied from the PowerShell image.skills-tree.new, the directory the cleanup removes. This was checked natively forbootstrap.ps1and in the container forbootstrap.sh.projecttemplate-fleetmarketplace's folder source is the kept tree under%LOCALAPPDATA%\host-setup\skills-tree. It is still there after the bootstrap run that registered it, with no.newor.oldbeside it.Refs #1756
🤖 Generated with Claude Code