Repository navigation
fix(min,installer): check once a day whether the channel has a newer release (0.7 backport) - #3504
Conversation
…release (0.7 backport) Once a day min asks update.minimal.dev whether its channel has moved past the release it was installed from, from a detached child with a 2 s budget that never delays or fails a command, and when it has, prints one line on stderr naming the new release, once per release. The request carries the channel, the installed release, OS, architecture, install method and a random install id; the first short command with a terminal discloses this first, and the installer writes install.toml and shows the same disclosure on its closing card. MINIMAL_TELEMETRY=0, DO_NOT_TRACK, CI, OTEL_SDK_DISABLED=true or [telemetry] enabled = false turn it off. docs/reference/telemetry.md describes all of it for this line. Backport of 78a60b2 (#2650) from main. That commit is a feat on main; the header says fix because this line's version check refuses a feat subject on a patch release. Adapted for this line: - MINIMAL_TELEMETRY is read by a private is_falsy() in update_check/switches.rs (0, false, no, off, any case) in place of mlog::otel::Flag; no mlog dependency. - The [telemetry] table (TelemetryConfig and its test) goes into crates/sessions/src/client/config.rs, and the check reads it via sessions::client::config. - /etc/minimal/config.toml is a private constant in update_check/switches.rs; on this line only its [telemetry] table is read. - crates/paths gains try_default_dir and try_minimal_state_dir as on main, beside the feature's try_minimal_config_dir_with_override. - The notice's command list drops auth and secret, which this line lacks; cmd/mod.rs has no command_verb here, so only the dispatch arm is added. - docs/reference/telemetry.md is written for this line (update check only, 0.7 command names) and added to the reference manifest. - Left out: the mlog otel.rs and otel/switches.rs hunks, and spec 25. - the_child_is_muted_without_a_veto keeps only its switch assertion; the half that read the child's environment through mlog's exporter is removed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- docs: move "How to update" first under the update check, where the notice's link lands - docs: say /etc/minimal/config.toml is parsed whole; a table this line lacks turns the check off Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`min run` only prints a pointer to `min task run` on this line, so it is not a command that takes the terminal. The lock file can outlive a check that died, until a later check takes it over. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
Approved: no findings at Nothing to do. Clobber: none seen: all new files or additive hunks. |
There was a problem hiding this comment.
Base is release/0.7.x, and the port matches 78a60b2 (#2650). I diffed update_check/ file by file against that commit. The only differences are the ones the description lists: is_falsy in place of Flag::parse (the same values, trimmed, any case), a local ORGANIZATION_CONFIG_PATH, the sessions::client::config path, auth and secret dropped from the notice list, and the mlog half of one test removed. The +/- lines of the installer, installer-test and spec 07 hunks are identical to main's. TelemetryConfig and its test match client-config on main. Main has no later changes to update_check/ that this would miss. Checks are green.
One low inline note on the installer card. It applies to main as well.
| # moves on; a pinned (--version) one is counted but never told, since no | ||
| # channel pointer applies to it. | ||
| if [ "$version_set" -eq 1 ]; then | ||
| say " ${dim}min reports this install once a day (no release notices for --version), sending its channel$rst" |
There was a problem hiding this comment.
[low] For a --version install, this card says min reports the install once a day. Any --version target from before the update check has no check. On this line that is 0.7.3 and older, and pinning an older release is the usual reason to use --version. So for those installs, the card describes a request that is never made. It fails safe, because it over-discloses, but the card states something the code does not do. One fix: print the line only when the pinned version has the check. The simpler fix is to word it conditionally, such as "releases from 0.7.4 report this install once a day...". The same text is on main, so the fix belongs on both.
There was a problem hiding this comment.
You are right: for a pinned release older than the check, the card describes a request that is never made. I will word it conditionally ("releases from 0.7.4 report this install once a day") in a follow-up PR on this line before 0.7.4 is staged, and the same change on main.
…ominimal#3541) * fix(installer): the pinned install card says which releases report For a --version install the card said min reports the install once a day. A pinned release older than 0.7.4 has no update check and sends nothing, so the card described a request that is never made. The line now reads "min 0.7.4 and later report this install once a day". Refs gominimal#3504 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> * fix(installer): the pinned card says whether this release reports The card knows the pinned version, so it no longer leaves the reader to work out whether "0.7.4 and later" applies to them. A release from 0.7.4 on is told that min reports the install once a day. A release before 0.7.4 is told that it does not check for updates and sends nothing, and is not shown the off switch for a request it never makes. A version the card cannot place (a pre-release, a nightly, a name that is not X.Y.Z) keeps the range. The installer test pins all three texts, the range one included, which no test checked before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5.2 <noreply@anthropic.com>
What
Backport of #2650 (78a60b2 on main) to the 0.7 line: once a day
minasksupdate.minimal.devwhether its channel has moved past the release it was installed from, and says so once when it has.install.tomland shows the same disclosure on its closing card.MINIMAL_TELEMETRYset to0,false,nooroff;DO_NOT_TRACK;CI;OTEL_SDK_DISABLED=true;[telemetry] enabled = falsein the user's config or in/etc/minimal/config.toml. A config that cannot be read turns the check off.Why on a patch release
Agreed with the release owner as a business requirement: it is how we see the effect of shipping 0.8. The title says
fixbecause this line's version check refuses afeatsubject on a patch release; the change is the feature from main.Adapted for this line
The 0.7 line split from main before the telemetry work, so this is a hand port, not a cherry-pick:
MINIMAL_TELEMETRYis read by a small private function inupdate_check/switches.rs, in place of the telemetry module's flag type. No telemetry code comes along.[telemetry]config table goes intocrates/sessions/src/client/config.rs, where this line keeps its client config./etc/minimal/config.tomlis a private constant; on this line only its[telemetry]table is read.crates/pathsgains two fallible helpers as they are on main, beside the feature's own.authandsecret, which this line does not have.docs/reference/telemetry.mdis written for this line: the update check only. The link the notice and the installer's card print points at this page, which does not exist on stable's docs today.The installer and installer-test hunks are the same as on main, line for line.
For the merge back to main
Main's side wins for
crates/paths/src/lib.rs,crates/sessions/src/client/config.rsand everything undercrates/minimal/src/update_check/.Release notes
minnow makes one request a day to check for a newer release; seedocs/reference/telemetry.mdfor what is sent and how to turn it off.[telemetry]table inconfig.tomlmakes 0.7.3 and older refuse the config. Use the environment switches if you move between versions.Testing
switchcrate, does not build on this line under today's nightly, with or without this change; it is not a PR check here and this change does not touch that crate.CI; a dead endpoint costs 29 ms. (Not run on Fedora: the test VM there cannot make a terminal.)OTEL_SDK_DISABLED=trueand the organisation's[telemetry] enabled = falseeach make none, and the dry run names which one.Before promotion: one
--versioninstall of the staged release on Linux and macOS, since the installer change reaches every new stable user.🤖 Generated with Claude Code