Repository navigation
fix(cli): select published stable releases for updates - #1623
Naveen Chatlapalli (1aifanatic) wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues were identified for the stable-release selection changes.
No open issues 🎉
What changed in this PR
This PR makes CLI updates and background update notifications select published stable releases, aligning their behavior with the root installer.
Changes:
- Applies shared filtering to GitHub CLI and REST results, excluding drafts, prereleases, and invalid versions.
- Removes the updater’s unfiltered fallback so it stops when no stable release is found.
- Adds regression coverage and documents the stable-release policy.
| File | Description |
|---|---|
docs/architecture/cli-distribution.md |
Documents stable-release selection and behavior when none is available. |
apps/cli/src/utils/update-check.ts |
Shares stable-release filtering across GitHub CLI and REST lookups. |
apps/cli/src/utils/update-check.test.ts |
Tests filtering and results with no eligible stable release. |
apps/cli/src/utils/update-check.integration.test.ts |
Verifies bundled notifications skip previews and select stable releases. |
apps/cli/src/commands/update.ts |
Removes the fallback that bypassed release filtering. |
apps/cli/src/commands/update.test.ts |
Verifies updates stop without downloading when selection returns no release. |
Review effort: Balanced
|
Hi Naveen Chatlapalli (@1aifanatic), thank you for the substantial set of contributions, and sorry that so many review requests have gone unanswered. My acknowledgment on #1624 didn’t address the rest of the queue. We still owe you reviews and clear decisions on these PRs; I don’t have a reliable timeline to share yet. I appreciate the effort you’ve put into them. |
|
Copilot Merge origin/main and resolve conflicts if any |
|
Thank you Naveen Chatlapalli (@1aifanatic) for your PR. It's very relevantm indeed, we should filter and offer only stable releases when updating. I just merged #1624 and this one might interfere. Can you please rebase onto origin/main and fix CI. It's fixing because of missing licence headers. |
Summary
The updater and background notification selected the first
cli/v*tag, even when GitHub marked it draft or prerelease. An authenticatedghuser could therefore be offered an unpublished draft, and a preview could displace the published stable release.Apply the same stable-release filter to GitHub CLI and REST records: skip draft/prerelease flags, invalid tags, and semver prerelease versions. Remove the updater's separate unfiltered fallback so it cannot bypass this decision. This aligns updates with the root installer; the old prerelease-notification integration expectation is updated to the stable-release policy.
Demos
Before/after terminal playback uses a local release service containing draft 9.0.0, preview 8.0.0, and stable 7.0.0, with a synthetic downloader. Before selects 9.0.0; after selects 7.0.0. Recordings contain actual command output, paced for readability, and make no live GitHub requests.
Before recording · After recording
Before transcript · After transcript
Testing
pnpm --filter cli build— passed (includes TypeScript check).pnpm exec vitest run apps/cli/src— 163 passed.pnpm exec vitest run --config vitest.integration.config.ts apps/cli/src/bundle.integration.test.ts apps/cli/src/utils/update-check.integration.test.ts— 25 passed against the built standalone bundle.git diff --check— passed.Documentation and compatibility
Updated
docs/architecture/cli-distribution.md. Updates now target published stable releases, consistent with installation. No dependency or API changes.Checklist