feat(versioning): use git commit count to determine agent upgrade need#92
Merged
Merged
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Embeds GIT_COMMIT_COUNT at build time via build.rs using
git rev-list --count HEAD. Agents report this count in the Hellomessage; 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 messagedid 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