Fix updater handling for superseded release train typo#515
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bdfa4a7041
ℹ️ 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".
| // v0.2.58181 was an accidental release-train typo. Pure SemVer ordering | ||
| // treats its patch component as newer than v0.2.5823, but operationally it | ||
| // belongs before v0.2.5823 and should update forward normally. | ||
| .{ .current = "0.2.58181", .minimum_target = "0.2.5823" }, |
There was a problem hiding this comment.
Move the supersession check to code old binaries execute
This special case is added only to the new updater binary, but the affected installed binary is 0.2.58181 and therefore will not contain this table or compareVersionsForUpdate; src/release_info.zig in this commit is still 0.2.5823, so the only shipped binary that can execute this branch is already on the fixed train. Users actually stuck on 0.2.58181 will continue to run the old compareVersions logic and refuse v0.2.5823 via codedb update, so the compatibility shim needs to live in a path the old binary executes, such as the installer/manifest flow, or be delivered by republishing that bad version.
Useful? React with 👍 / 👎.
Benchmark Regression ReportThresholds: 10.00% and 50,000 ns absolute delta
|
Summary
0.2.58181, can update to0.2.5823or newer instead of being treated as newer forever.0.2.58181 > 0.2.5823, while updater ordering allows the intended forward upgrade.Validation
zig build test -Dtest-filter=compareVersionsForUpdatezig build testzig build./zig-out/bin/codedb --version/opt/homebrew/bin/codedb --version->codedb 0.2.5823/Users/blackfloofie/bin/codedb --version->codedb 0.2.5823codedb update-> already up to date