The #1756 change gave host-setup/bootstrap.sh and bootstrap.ps1 a kept tree with a staging, swap, and retire sequence. The sequence runs in this order:
- It extracts to a
.new sibling.
- It swaps the tree in immediately before the skills step, with the old tree moved aside to
.old first and removed last.
- It removes a leftover
.new or .old on exit.
Nothing executes that sequence in CI. scripts/tests/test_bootstrap.py checks the loaders statically, and scripts/tests/test_skills_install.py covers only the Python installer. A change that reorders the steps would pass every check. Examples: swapping before an earlier stand-up step, or removing the old tree before the new one is in place.
What follows
- The property this sequence exists for goes unchecked: a failed stand-up leaves the plugin loading the previous tree.
Options
- Add a test that runs
bootstrap.sh in a scratch HOME. Give it a stub curl that serves a local tarball, and stub tools that fail at a chosen step. Then assert on the tree left behind. Add the same test for bootstrap.ps1 under pwsh.
- Extract the swap into a function each loader can be asked to run on its own, and test that function.
Found by the local strict review on the #1756 change.
The #1756 change gave
host-setup/bootstrap.shandbootstrap.ps1a kept tree with a staging, swap, and retire sequence. The sequence runs in this order:.newsibling..oldfirst and removed last..newor.oldon exit.Nothing executes that sequence in CI.
scripts/tests/test_bootstrap.pychecks the loaders statically, andscripts/tests/test_skills_install.pycovers only the Python installer. A change that reorders the steps would pass every check. Examples: swapping before an earlier stand-up step, or removing the old tree before the new one is in place.What follows
Options
bootstrap.shin a scratch HOME. Give it a stubcurlthat serves a local tarball, and stub tools that fail at a chosen step. Then assert on the tree left behind. Add the same test forbootstrap.ps1underpwsh.Found by the local strict review on the #1756 change.