Repository navigation
Keep npm installs of kcap complete and within the server's version - #892
Conversation
npm publish returns while the registry still processes the tarball, and npm skips an optional dependency it cannot resolve, so the wrapper must never be installable first. kcap update now pins install_tag to a trailing server's version, which lets the hint name it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR Summary by QodoPrevent incomplete npm installs and cap updates to server versions
AI Description
Diagram
High-Level Assessment
Files changed (14)
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9ed4ce454e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| var checkResult = await CheckForUpdateAsync(forceCheck: true, channel, root, npm); | ||
| var (latest, current) = (checkResult.Latest, checkResult.Current); | ||
| var advisory = UpdateAdvisoryResolver.Resolve(checkResult, channel, profiles.Resolution.ServerUrl, root); |
There was a problem hiding this comment.
Refresh the server version before suppressing updates
When the cached header predates a server rollout, this resolves the advisory against the old version and can emit newer: false; the Node launcher then exits before invoking npm. ServerVersionStore.Get ignores the stored seen_at, and kcap update makes no request to the connected server, so repeated update attempts cannot refresh the value and remain pinned until an unrelated server-backed command runs. Refresh or expire the server-version cache before treating it as authoritative for an active update.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed in 692d935: on the stable channel, kcap update (and --check, which the launcher runs) now sends one authenticated read-only probe to /api/me/notification-prefs alongside the npm lookup. The response refreshes the cached server version before the cap is applied. Without a credential, or if the probe fails within its 5 s budget, the cached value still applies. Covered by UpdateCommandServerRefreshTests.
Code Review by Qodo
1.
|
…#891) npm skips an optional dependency whose tarball fails to download, not only one it cannot resolve, so a listed version alone does not prove the wrapper installs complete. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
#891) npm refuses to publish a version twice, so without the skip a release whose later step failed could not be finished by re-running the failed jobs. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The cached version changes only on an authenticated response, so a server upgraded since the last one would pin the update to its old version. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Closes #891 — AI-2708
What & why
Release 1.0.2's desktop publish failed, and
kcap updateto 1.0.x left macOS installs without their binary.npm publishreturns while the registry is still processing a large tarball (darwin-arm64 took ~10 min), so the wrapper became installable first and npm silently skipped the unresolvable optional platform package. The release now waits for every platform package before publishing the wrapper, and every npm poll and install passes--prefer-onlineto bypass npm's 5-minute packument cache. The update hint now always sayskcap update:--checkpinsinstall_tagto a trailing server's version.Where to look
kcap updateon a CLI already at its server's version reports "Already up to date" even when npm has newer — deliberate, matching the hint's cap.Verification
bash scripts/run-shell-tests.sh→ all ok; a copy of the wait script without--prefer-onlinefails all 4 caseswait-npm-available.sh 1.0.2 <six packages>→ all available;99.0.0→npm error 404 No match found for version 99.0.0UpdateNoticeDeliveryTests12/12dotnet publish -c Release: no IL2xxx/IL3xxx warnings🤖 Generated with Claude Code