Skip to content

[codex] fix upgrade prompt for git describe versions#47

Open
youngbeom-shin wants to merge 1 commit into
mainfrom
codex/fix-upgrade-git-describe-version
Open

[codex] fix upgrade prompt for git describe versions#47
youngbeom-shin wants to merge 1 commit into
mainfrom
codex/fix-upgrade-git-describe-version

Conversation

@youngbeom-shin
Copy link
Copy Markdown
Member

Summary

  • Treat local git describe versions such as v0.2.9-4-gd1e3c28-dirty as their base release when checking for updates.
  • Keep real prerelease versions such as v0.2.9-rc.1 eligible to update to the final release.
  • Add regression coverage for both paths.

Root Cause

The upgrade checker parsed git describe output as a semver prerelease. That made a local build based on v0.2.9 compare lower than the official v0.2.9 release, so the Web UI showed Update & Restart even when the release was already current.

Validation

  • env GOCACHE=/Users/shenyongfan/OpenCSG/csgclaw/.gocache go test ./internal/upgrade
  • env GOCACHE=/Users/shenyongfan/OpenCSG/csgclaw/.gocache go test ./cli/upgrade
  • env GOCACHE=/Users/shenyongfan/OpenCSG/csgclaw/.gocache go test ./internal/api -run 'TestHandleUpgrade|TestIMEventsIncludesUpgradeStatus'

@youngbeom-shin youngbeom-shin marked this pull request as ready for review May 11, 2026 01:46
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