fix: pre-release hardening for locking and the release workflow - #6
Merged
Conversation
- install.sh: only track the lock directory for cleanup after this process acquires it, so a waiter that dies (timeout or signal) no longer removes a lock owned by another installer - release.yml: restrict the release trigger to semantic version tags - release.yml: make vendor job reruns idempotent (force-with-lease push, skip PR creation when one already exists for the branch) - CHANGELOG.md: cut the 0.1.0 release section Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Hardens the installer locking semantics and the release workflow ahead of tagging v0.1.0, with a regression test to prevent lock-release races during concurrent installs.
Changes:
- Fix
install.shlock ownership tracking so a waiting installer that exits cannot remove another process’s lock directory. - Add a Bats regression test covering the “waiter dies” lock scenario.
- Adjust release automation (tag trigger + vendoring job idempotency) and update the changelog for
0.1.0.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
tests/install.bats |
Adds a regression test ensuring a terminated lock-waiter does not remove a foreign lock. |
install.sh |
Delays assigning LOCK_DIR until after lock acquisition to prevent erroneous cleanup by non-owners. |
CHANGELOG.md |
Updates release headings around 0.1.0 (needs alignment with PR description). |
.github/workflows/release.yml |
Tightens tag triggering and makes vendoring reruns more idempotent (tag pattern needs correction). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Final hardening pass before tagging v0.1.0. Four fixes:
LOCK_DIRwas assigned before themkdiracquisition loop, and the EXIT-trap cleanup unconditionally removed it — so a waiting installer that died (lock-wait timeout, or INT/TERM while waiting) deleted a lock directory owned by another running installer, letting a third installer proceed mid-activation. The lock path is now assigned to the cleanup-tracked variable only aftermkdirsucceeds, matching the semantics install.ps1 already had; all post-acquisition failure paths still release the lock via the EXIT trap.v*tov[0-9]+.[0-9]+.[0-9]+so a stray v-prefixed tag cannot publish an immutable release and open vendoring PRs.git push --force-with-lease(with a fetch of the branch ref first, since the clone is single-branch) and skipgh pr createwhen a PR for the vendoring branch already exists.0.1.0release section (dated 2026-07-16), keeping an emptyUnreleasedheading.This is the final gate before tagging v0.1.0.
Type of change
Validation
bats tests/— 42/42 pass, including a new regression test ("a waiter that dies does not remove another installer's lock": pre-creates a foreign lock, TERMs the waiting installer, asserts the foreign lock still exists). Verified the new test fails against the pre-fix install.sh and passes after the fix.shellcheck --shell=sh --severity=style install.sh— cleansh -n,dash -n,bash -n install.sh— cleanpython3 -c "import yaml; yaml.safe_load(...)"on release.yml — validzizmor .github/workflows/release.yml— no findingsCompatibility
None. No changes to supported targets, options, environment variables, installation paths, or the four-line output contract.
Checklist
CHANGELOG.mdwhere appropriate.🤖 Generated with Claude Code