feat: notify-only version check#32
Open
jfding wants to merge 7 commits into
Open
Conversation
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Detect the latest stable release tag with the system git binary instead of an HTTP client, avoiding a C-compiler/TLS build dependency on the static musl target. Pure helpers (parse_ls_remote_tags, latest_stable_tag, compare_versions, notify_line, cache_is_stale) are unit-tested; fetch and the two entry points are thin glue. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Summary
versionsubcommand that prints the current version and checks GitHub for a newer stable release, plus a cached background check atwatchstartup (one-line notice if outdated).git ls-remote --tags --refsvia the systemgitbinary (already a hard runtime dependency) — no new Rust dependency, no C compiler, no TLS stack. This was chosen over an HTTP client + the Releases API becauseureq+rustls pulls inring, which breaks the static-musl build (needs a musl C compiler).ls-remotetags, filter to stablevX.Y.Ztags, pick the highest by numeric semver.~/.cache/git-supervisor/version-check.json), runs on a blocking thread, and swallows all errors so it never interruptswatch.Test Plan
cargo test— 105 passed, 2 ignoredparse_ls_remote_tags,latest_stable_tag,compare_versions,notify_line,cache_is_staleversionsubcommandgit-supervisor versionagainst the live repo prints "You are on the latest release." at v2.1.8 and writes the cache file🤖 Generated with Claude Code