refactor(check-update): switch to static release metadata#75
Conversation
The update check flow is being simplified to remove package manager specific command resolution and rely on published release metadata. This points users to `oo update`, validates the returned version, and keeps the CLI contract aligned with the new endpoint. Signed-off-by: Kevin Cui <bh@bugs.cc>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 48 minutes and 28 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
WalkthroughThis PR refactors the CLI's update-checking mechanism from a package-manager-dependent approach to a fixed CLI-specific endpoint. The code transitions from querying npm registry metadata (with Estimated code review effort🎯 3 (Moderate) | ⏱️ ~28 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@docs/commands.md`:
- Around line 111-115: Update the three "Notes:" bullets: change the first to
reflect that transient request failures are retried twice (3 total attempts)
instead of "retried once"; rewrite the second to say successful and failed
checks are not cached so every invocation fetches the latest release metadata
(remove the phrase "published update endpoint"); and rewrite the third to avoid
internal endpoint naming and use user-facing wording such as "when the update
service is temporarily unavailable, the CLI prints a retry-later message instead
of exiting with an error" — modify the existing "Notes:" lines in
docs/commands.md accordingly.
In `@docs/commands.zh-CN.md`:
- Around line 102-105: Update the Chinese CLI docs to state that a single
"最新版本检查" will try up to 3 request attempts (instead of saying "重试一次") and remove
any mention of internal "更新端点" implementation; ensure the three bullet lines in
docs/commands.zh-CN.md are rewritten to: 1) explain the CLI will attempt the
latest-version check up to 3 times on transient failures, 2) note that results
are never cached so each run fetches current metadata, and 3) say the CLI will
suggest retrying later if the update service is temporarily unavailable—use only
user-facing wording and avoid internal endpoint/detail descriptions.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 34d82b74-f47b-4b49-aa4a-16472b321f58
⛔ Files ignored due to path filters (1)
src/application/commands/__snapshots__/check-update.cli.test.ts.snapis excluded by!**/*.snap
📒 Files selected for processing (6)
docs/commands.mddocs/commands.zh-CN.mdsrc/application/commands/check-update.cli.test.tssrc/application/commands/check-update.tssrc/application/update/update-notifier.test.tssrc/application/update/update-notifier.ts
The previous docs still described one retry and referenced the internal update endpoint, which no longer matched the CLI contract. Update the English and Chinese command docs to reflect two retries and user-facing wording for the latest release check. Signed-off-by: Kevin Cui <bh@bugs.cc>
The update check flow is being simplified to remove package manager specific command resolution and rely on published release metadata. This points users to
oo update, validates the returned version, and keeps the CLI contract aligned with the new endpoint.