fix(fff-mcp): compare CARGO_PKG_VERSION to stable release tag (#721) - #729
Merged
Merged
Conversation
The update check compared the embedded 40-char git SHA prefix against the release tag string, which never matched a semver tag. It also hit /releases?per_page=1 (prerelease-inclusive) while install-mcp.sh is pinned to a stable tag, so the suggested installer could not silence the notice when the API returned a nightly. Compare CARGO_PKG_VERSION against /releases/latest (stable-only) with a leading `v` stripped from the tag. Closes #721
dmtrKovalenko
approved these changes
Jul 30, 2026
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.
Closes #721
Root cause
crates/fff-mcp/src/update_check.rs:41-44compared a 40-char git SHA prefix (FFF_GIT_HASH) against the release tag string. A commit SHA can never equal a semver tag likev0.10.1or0.10.2-nightly.6a239e9, so the notice fires forever.fetch_latest_tagalso queried/releases?per_page=1, which includes prereleases, whileinstall-mcp.sh:11is pinned to a stable tag — the installer in the notice cannot silence a nightly-triggered notice.Fix
Query
/releases/latest(GitHub excludes prereleases from this endpoint) and compareCARGO_PKG_VERSIONagainst the tag with a leadingvstripped.FFF_GIT_HASHis still embedded for the--versionstring; only the update check stops using it.Steps to reproduce
Setup on
origin/main(pre-fix):git checkout main curl -fsSL https://raw.githubusercontent.com/dmtrKovalenko/fff.nvim/main/install-mcp.sh | bashConfirm the installed binary matches the pinned stable release:
fff-mcp --version # fff-mcp 0.10.1 (686a84959ddc72185a7cacaf00145af5ccac7a83)Trigger the check directly (equivalent to the background thread
spawn_update_check):Expected: no update notice, because the installed binary is on the latest stable channel and
install-mcp.shis pinned tov0.10.1.Actual: MCP responses include:
Re-running the installer reinstalls the same stable binary. The notice returns because
"6a239e987569800c45661c6a67bc4af"(SHA prefix truncated to tag length) will never equal"0.10.2-nightly.6a239e9".How verified
Also
cargo fmt -p fff-mcpandcargo clippy -p fff-mcp --bin fff-mcp -- -D warningsare clean.Regression cases covered by tests:
0.10.1+ tagv0.10.1-> no notice0.10.1+ tag0.10.2-nightly.6a239e9-> notice (upgrade to whatever/releases/latestreturns; nightlies excluded so this case is only synthetic — real callers get the newest stable tag)0.10.0+ tagv0.10.1-> notice"0.10.0 -> 0.10.1"Note: the update check now tracks the stable channel exclusively (option 1 from the issue). Nightly builds will report an update when a newer stable is out; there is currently no separate nightly channel wired through the checker. If explicit stable/nightly support is desired later, that would be a follow-up.
Automated triage via Gustav. Honk-Honk 🪿