Fix update detection for pseudo-version builds

Merged
RO
8mo ago
+112-4

Summary

  • compare current and latest versions semantically instead of treating any difference as an update
  • suppress false update notices when a pseudo-version build is newer than the latest tagged release
  • apply the comparison consistently in doctor, upgrade, and background update notices
screenshot-2026-03-24_18-47-49

Ref: https://3.basecamp.com/2914079/buckets/46292715/card_tables/cards/9714497196

Testing

  • go test ./internal/commands/...

Summary by cubic

Use semantic version comparison so updates are only shown when the latest release is actually newer. Fixes false “update available” notices for pseudo-version builds in doctor, upgrade, and background checks.

  • Bug Fixes

    • Compare versions using golang.org/x/mod/semver via a new helper, preventing pseudo-version builds from being flagged as outdated.
    • Apply the check in doctor, upgrade, and background UpdateCheck.Notice() paths.
    • Add tests covering pseudo-versions and equality cases.
  • Dependencies

    • Add golang.org/x/mod v0.34.0 for semver comparisons.