Skip to content

feat(versioning): use git commit count to determine agent upgrade need#92

Merged
alexmohr merged 1 commit into
mainfrom
claude/agent-upgrade-versioning-jhoe4f
Jun 13, 2026
Merged

feat(versioning): use git commit count to determine agent upgrade need#92
alexmohr merged 1 commit into
mainfrom
claude/agent-upgrade-versioning-jhoe4f

Conversation

@alexmohr

Copy link
Copy Markdown
Owner

Embeds GIT_COMMIT_COUNT at build time via build.rs using
git rev-list --count HEAD. Agents report this count in the Hello
message; the server stores it and compares against its own embedded
count to decide whether an upgrade button should appear.

This replaces the fragile version-string equality check, which broke
whenever the git SHA was absent (Docker/CI builds) because the
agent binary's --version included a trailing + but the Hello message
did not. With monotonically increasing commit counts both sides always
have a comparable integer, and the comparison remains valid after
introducing proper semver tags.

https://claude.ai/code/session_01PnCrJ1s2b5dCacdua7nyoc

Embeds GIT_COMMIT_COUNT at build time via build.rs using
`git rev-list --count HEAD`. Agents report this count in the Hello
message; the server stores it and compares against its own embedded
count to decide whether an upgrade button should appear.

This replaces the fragile version-string equality check, which broke
whenever the git SHA was absent (Docker/CI builds) because the
agent binary's --version included a trailing `+` but the Hello message
did not. With monotonically increasing commit counts both sides always
have a comparable integer, and the comparison remains valid after
introducing proper semver tags.

https://claude.ai/code/session_01PnCrJ1s2b5dCacdua7nyoc
@alexmohr alexmohr merged commit aafa5db into main Jun 13, 2026
13 checks 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.

2 participants