Skip to content

Fix updater handling for superseded release train typo#515

Merged
justrach merged 1 commit into
mainfrom
fix/update-superseded-release
May 29, 2026
Merged

Fix updater handling for superseded release train typo#515
justrach merged 1 commit into
mainfrom
fix/update-superseded-release

Conversation

@justrach
Copy link
Copy Markdown
Owner

Summary

  • Keep normal semantic version comparison intact for regular releases.
  • Add an updater-specific supersession path so known bad release numbers, starting with 0.2.58181, can update to 0.2.5823 or newer instead of being treated as newer forever.
  • Add a focused regression test proving pure SemVer still says 0.2.58181 > 0.2.5823, while updater ordering allows the intended forward upgrade.

Validation

  • zig build test -Dtest-filter=compareVersionsForUpdate
  • zig build test
  • zig build
  • ./zig-out/bin/codedb --version
  • local installed /opt/homebrew/bin/codedb --version -> codedb 0.2.5823
  • local installed /Users/blackfloofie/bin/codedb --version -> codedb 0.2.5823
  • codedb update -> already up to date

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/update.zig
// 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" },
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

@github-actions
Copy link
Copy Markdown

Benchmark Regression Report

Thresholds: 10.00% and 50,000 ns absolute delta

NOISE means the percentage threshold was exceeded, but the absolute delta was too small to fail CI.

Tool Base (ns) Head (ns) Delta Abs Delta (ns) Status
codedb_bundle 84196 81829 -2.81% -2367 OK
codedb_changes 9831 9796 -0.36% -35 OK
codedb_context 935453 884664 -5.43% -50789 OK
codedb_deps 232 217 -6.47% -15 OK
codedb_edit 41357 35683 -13.72% -5674 OK
codedb_find 9150 8840 -3.39% -310 OK
codedb_hot 24129 25013 +3.66% +884 OK
codedb_outline 27815 30265 +8.81% +2450 OK
codedb_read 13992 16540 +18.21% +2548 NOISE
codedb_search 20426 21098 +3.29% +672 OK
codedb_snapshot 57419 48610 -15.34% -8809 OK
codedb_status 8709 8645 -0.73% -64 OK
codedb_symbol 17896 18620 +4.05% +724 OK
codedb_tree 35761 34965 -2.23% -796 OK
codedb_word 10620 11071 +4.25% +451 OK

@justrach justrach merged commit b7c584e into main May 29, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant