Repository navigation
fix(update): accept dated preview versions with a publication attempt - #8977
Conversation
Preview releases are published as X.Y.Z-preview.<date>.<attempt> since 2.100.5 (for example 2.100.6-preview.20261119.1). The registry lookup only accepted a single numeric segment after -preview., so the preview channel treated a valid answer as unreadable and the dashboard reported that it could not read the latest version from npm. The version comparison had the same limit, so an install on such a preview was never offered a newer preview or the next stable release. Accept the optional attempt segment in the lookup and compare previews by date, then attempt; a version without an attempt sorts as attempt 0. Co-Authored-By: Claude Fable 5.2 <[email protected]>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueNo actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Review readiness checklist
0/4 boxes ticked. Automatic draft conversion failed. Please convert this pull request to a draft manually until every box above is ticked. Hygiene✅ Deterministic PR hygiene checks passed. |
src/update/ is owned by structure/ops/service-and-sidecars.md; note the accepted preview shapes and their base, number, attempt ordering.
|
Maintainer integration into
|
|
Marking ready as maintainer: the readiness gate moved this back to draft because of my in-house commits ( |
Codex Review Summary: ✅ CompletedThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 574d5a3c9a
ℹ️ 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".
Summary
On the preview update channel the dashboard's update dialog says it could not read the latest version from npm ("npm에서 최신 버전을 읽지 못했습니다" /
dash.updateUnavailable), althoughnpm view @bitkyc08/opencodex@preview versionanswers normally. The stable channel is not affected.Preview releases are published as
X.Y.Z-preview.<date>.<attempt>since 2.100.5 (2.100.5-preview.20261118.1,2.100.6-preview.20261119.1);release.ymlandTELEMETRY_VERSION_REalready accept that shape. Two places insrc/updatestill allowed only one numeric segment after-preview.:latestVersionAsync(src/update/async-check.ts) validates the registry answer before using it. It rejected the new shape, so/api/update/check?tag=previewreturnedlatestVersion: nullwith reasonlatest_unavailable.parsePreview(src/update/notify.ts) feedsisNewer. It returnednullfor the new shape, so an install that is itself on such a preview was never offered a newer preview, and on the stable channel was never offered the next stable release.The fix accepts the optional attempt segment in both. Previews compare by base version, then date, then attempt; a version without an attempt sorts as attempt 0, so the older
-preview.<date>and-preview.<n>forms behave as before. The lookup stays strictly numeric and anchored: a third segment, a trailing dot, a second line or another prerelease label is still refused, and the latest channel still refuses any preview version.Verification
Reproduced on a running 2.100.6 install (npm global, Linux):
GET /api/update/check?tag=latestreturns2.100.6,GET /api/update/check?tag=previewreturnslatestVersion: null,reason: "latest_unavailable".devwithout the fix (5 failures: one lookup case, fourisNewercases) and pass with it.bun test tests/update/update-refresh.test.ts tests/update/update-notify.test.ts: 71 pass, 0 fail.bun test tests/update: 1,257 pass, 2 fail. Both failures ("a private copy of npm-install.mjs resolves every import on every host", "isTrustedSystemdRunFile (real filesystem) > accepts a root-owned executable in a root-only-writable directory") also fail on unmodifieddevon this machine, a root container.bun run typecheck: 0 errors in 2,681 files.structure:check,privacy:scanand the file-size ratchet pass.No GUI file changes; the dialog shows the existing strings once the server returns a version.
Checklist
🤖 Generated with Claude Code
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
Required local validation passed; commands, results, and any full-suite exception are documented.
I pushed my PR to a recent dev commit (at most 10 behind; a maintainer may still ask for the exact tip before merge).
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Summary by CodeRabbit
-preview.2.3.