Repository navigation
feat: tell the user when a newer release exists - #14
Open
jeroenrinzema wants to merge 1 commit into
Open
jeroenrinzema wants to merge 1 commit into
jeroenrinzema wants to merge 1 commit into
Conversation
jeroenrinzema
requested review from
dmeijboom
and
a balanced review from Copilot
September 21, 2026 20:38
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Background-task cancellation, cache-write failures, clock rollback, and concurrent runs can prevent reliable checks or violate the daily request limit.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 4
Open (4)
What changed in this PR
Adds background release checks for interactive CLI runs while minimizing network and latency costs.
Changes:
- Adds cached, daily release checks and update notices.
- Aligns crate metadata with release tags and validates future releases.
- Documents update-check behavior and opt-out controls.
| File | Description |
|---|---|
src/update.rs |
Implements release checking, caching, notices, and tests. |
src/main.rs |
Integrates checks into command execution. |
src/output.rs |
Exposes shared terminal styling. |
README.md |
Documents update notifications. |
Cargo.toml |
Aligns the crate version with releases. |
Cargo.lock |
Updates locked package metadata. |
.github/workflows/release.yml |
Validates release tags against the crate version. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
jeroenrinzema
force-pushed
the
feat/update-notice
branch
from
September 21, 2026 20:40
a765cc9 to
a3844d0
Compare
jeroenrinzema
changed the base branch from
main
to
fix/report-release-version
September 21, 2026 20:40
jeroenrinzema
force-pushed
the
fix/report-release-version
branch
from
September 21, 2026 20:44
f78bd8c to
f31a032
Compare
jeroenrinzema
force-pushed
the
feat/update-notice
branch
from
September 21, 2026 20:45
a3844d0 to
21c482c
Compare
The check reads where the releases 'latest' alias redirects, which answers with no body, at most once a day, cached beside the configuration file. It starts before the command and is read after it, so it waits on nothing the command was not already waiting on, and runs a program reads stay silent. The crate version is what the notice compares against, so it is brought back in line with the published tags and the release workflow now refuses a tag that disagrees with it.
jeroenrinzema
force-pushed
the
feat/update-notice
branch
from
September 21, 2026 20:57
21c482c to
ef639af
Compare
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.

Interactive runs now report a newer release underneath the command's own output:
What it costs
version-check.jsonbeside the configuration file; every other run that day reads it and touches nothing.https://github.com/brainpodnl/cli/releases/latestredirects, so the answer is a 302 withcontent-length: 0. The releases API would return the whole release, notes and assets included, and carries an unauthenticated rate limit.What stays silent
--json, anything whose stderr is not a terminal, anything withCIset, andBRAINPOD_NO_UPDATE_CHECK=1. Those runs make no request at all.A version neither side can order is never compared: only plain
major.minor.patchis ranked, so the0.0.0-dev+<sha>that #13 gives unstamped builds says nothing rather than nagging a developer about their own checkout.Why this is stacked
The notice is only as good as the version the binary reports, and on
mainthat is the hardcoded0.1.0no release ever carried — the comparison would have been dead on arrival. #13 makes--versionthe release tag and gates it in CI, so this branch simply readsenv!("BRAINPOD_VERSION")and adds no version plumbing of its own.Verification
cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test(97 passed).{"checkedAt":…,"latest":"0.0.5"}.brainpod 0.0.0-dev+a3844d058a01) with a9.9.9release cached: silent.BRAINPOD_VERSION=0.0.5build: notice rendered.--jsonandBRAINPOD_NO_UPDATE_CHECK=1printed nothing.