fix(ci): prevent prerelease builds from clobbering stable release assets#8823
Open
markijbema wants to merge 8 commits intomainfrom
Open
fix(ci): prevent prerelease builds from clobbering stable release assets#8823markijbema wants to merge 8 commits intomainfrom
markijbema wants to merge 8 commits intomainfrom
Conversation
The prerelease publish workflow was able to overwrite binaries on existing stable releases due to --clobber being used unconditionally on gh release upload. This caused the homebrew formula checksums to become stale, breaking brew install. Two fixes: 1. Only use --clobber for prerelease uploads (stable releases should fail-fast if assets already exist) 2. Add a safety check in version.ts that aborts if a stable release already exists for the computed version
…obber - version.ts: Only treat 'release not found' as safe to proceed. Any other gh error (auth, network, etc.) now aborts the build instead of silently continuing. - build.ts: Query the actual release metadata before deciding on --clobber. Only drafts and prereleases allow overwriting assets, making the upload step itself the last line of defense.
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (2 files)
Reviewed by gpt-5.4-20260305 · 353,306 tokens |
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 #8796 —
brew install Kilo-Org/tap/kilowas failing with a checksum mismatch because a prerelease publish run overwrote the v7.2.1 stable release binaries with--clobber.Root cause: When the prerelease workflow computed a version that collided with an existing stable release (due to npm registry lag in
fetchHighest()),gh release upload --clobbersilently replaced the stable assets. The homebrew formula still had the original checksums.Fixes:
build.ts: Only use--clobberfor prerelease uploads. Stable releases will now fail-fast if assets already exist rather than silently overwriting them.version.ts: Add a safety check that aborts the workflow if a stable (non-prerelease) GitHub release already exists for the computed version.Additionally: The homebrew-tap formula has been updated directly to fix the immediate user-facing issue (commit pushed to
Kilo-Org/homebrew-tap).