fix: stable channel detects update for dev builds#753
Conversation
isUpdateAvailable used compareSemver which strips pre-release suffixes, treating 0.4.8-dev.4 and 0.4.8 as equal. Switch to compareWithDev so a stable release is correctly detected as newer than a dev pre-release at the same base version. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Scanned FilesNone |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves an issue where development builds running on the stable channel failed to recognize available stable updates. The core problem stemmed from an inadequate version comparison mechanism that incorrectly treated dev builds and stable releases with the same base version as equal. By implementing a more robust comparison function, the system now accurately determines when a stable release is newer, ensuring users receive timely update notifications. The change is validated with new test cases. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📜 Recent review details⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
🧰 Additional context used📓 Path-based instructions (1)cli/**/*.go📄 CodeRabbit inference engine (CLAUDE.md)
Files:
🧠 Learnings (1)📓 Common learnings🧬 Code graph analysis (1)cli/internal/selfupdate/updater.go (1)
🔇 Additional comments (3)
WalkthroughThe self-update logic was changed to remove the separate 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
There was a problem hiding this comment.
Code Review
This pull request correctly fixes an issue where updates for development builds on the stable channel were not being detected. The change to use compareWithDev in isUpdateAvailable is appropriate and resolves the problem by correctly handling pre-release version suffixes. The new test cases are well-written and cover the necessary scenarios to prevent regressions. I have one suggestion regarding code duplication that has arisen from this change, which could improve the overall maintainability of the code.
| // Use compareWithDev so a stable release is correctly detected as | ||
| // newer than a dev pre-release at the same base version (e.g. | ||
| // 0.4.8 > 0.4.8-dev.4). compareSemver ignores pre-release | ||
| // suffixes and would treat them as equal. | ||
| cmp, err := compareWithDev(latest, current) |
There was a problem hiding this comment.
Both functions became identical after switching to compareWithDev. Remove the duplicate and merge test cases into a single table. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
🤖 I have created a release *beep* *boop* --- ## [0.4.9](v0.4.8...v0.4.9) (2026-03-23) ### Features * add consultancy and data team template archetypes ([#764](#764)) ([81dc75f](81dc75f)) * add personality presets for new template archetypes ([#758](#758)) ([de4e661](de4e661)) * improve wipe command UX with interactive prompts ([#759](#759)) ([bbd4d2d](bbd4d2d)) ### Bug Fixes * stable channel detects update for dev builds ([#753](#753)) ([f53da9f](f53da9f)) ### Documentation * add version banner to docs header ([#761](#761)) ([8f8c1f8](8f8c1f8)) ### Maintenance * adopt new features from web dependency upgrades ([#763](#763)) ([1bb6336](1bb6336)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary
isUpdateAvailable(stable channel) usedcompareSemverwhich strips pre-release suffixes, treating0.4.8-dev.4and0.4.8as equal -- so a dev build on the stable channel never saw the stable release as an updatecompareWithDevwhich correctly treats0.4.8 > 0.4.8-dev.4(stable beats dev at same base version); behavior is identical for two stable versions, so no regressionTest plan
go vet,go buildpasssynthorg updateon a dev build correctly offers the stable releaseReview coverage
Quick mode -- automated checks only (Go vet + test + build), no agent review.
🤖 Generated with Claude Code