Repository navigation
fix(minimal): stop the running daemon on uninstall and refuse a skewed one in dash - #2342
Merged
norrietaylor merged 1 commit intoOct 19, 2026
Conversation
An uninstall deleted the binaries but left a running daemon in place, so a reinstall autospawned nothing and every daemon-backed command then hit the old daemon across a version skew. The uninstall walk now stops the daemon first, while the min that matches it is still on disk, with the same escalation as an upgrade: graceful stop, a consent question on the terminal when sessions are live, --force-stop after. And when an install starts with no min on disk (the daemon survived an uninstall and was started again by hand), a post-swap probe compares the installed min's version with the answering daemon's and force-stops a mismatched one before it can wedge the new build. The dashboard was the one product surface that still opened on a skewed pair: its discovery connections were deliberately ungated, so min dash silently talked to a daemon that could tear down half a mutation. Discovery now gates each connection like min ls does, so the dashboard refuses a skewed daemon before the TUI takes over the terminal, and a provider that reappears mid-run with a skewed build joins only under the override. The skew message's recovery line now names min stop --force, the command that actually works while sessions are live. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
Warning Review limit reached
This review includes 7 billable files and costs up to $1.75. Or wait 25 minutes for your next included review. View limit details
Comment |
Member
|
/review |
Contributor
|
Approved: no findings at Nothing to do. Clobber: none seen. |
norrietaylor
enabled auto-merge
October 19, 2026 08:03
norrietaylor
approved these changes
Oct 19, 2026
norrietaylor
deleted the
inbox-patch/fix/uninstall-stops-daemon-323afdc149a2e6cc
branch
October 19, 2026 08:50
norrietaylor
pushed a commit
that referenced
this pull request
Nov 4, 2026
…2342) An uninstall deleted the binaries but left a running daemon in place, so a reinstall autospawned nothing and every daemon-backed command then hit the old daemon across a version skew. The uninstall walk now stops the daemon first, while the min that matches it is still on disk, with the same escalation as an upgrade. An install that starts with no min on disk compares the installed min's version with the answering daemon's and force-stops a mismatched one. The dashboard's discovery connections are now gated as min ls is, so it refuses a skewed daemon before the TUI takes the terminal, and a provider that reappears skewed joins only under the override. The skew message's recovery line names min stop --force. Backport of #2342. Adapted to the line: dash/ is the minimal-tui crate, so its inventory test carries the gated rows, and the rows in minimal's connection inventory drop out. (cherry picked from commit 2e67f8a)
norrietaylor
pushed a commit
that referenced
this pull request
Nov 4, 2026
…2338) A client attached during an upgrade autospawns a replacement daemon the moment the pre-swap stop ends, and that daemon serves the old version from the binaries the run is about to replace. The installer now stops once more after every swap, only a daemon whose version differs from the installed min, and --force only with consent. A pre-swap yes covers only the sessions it listed: sessions opened after it are asked about again, and with no terminal the daemon stays running and the installer names min stop --force. An EXIT trap runs the same stop when the run dies after the first executable swap. Spec 07 R5.5 describes it. Backport of #2338. Applied without adaptation, after #2342 as on main. (cherry picked from commit e6cbd46)
Merged
norrietaylor
pushed a commit
that referenced
this pull request
Nov 5, 2026
…2342) An uninstall deleted the binaries but left a running daemon in place, so a reinstall autospawned nothing and every daemon-backed command then hit the old daemon across a version skew. The uninstall walk now stops the daemon first, while the min that matches it is still on disk, with the same escalation as an upgrade. An install that starts with no min on disk compares the installed min's version with the answering daemon's and force-stops a mismatched one. The dashboard's discovery connections are now gated as min ls is, so it refuses a skewed daemon before the TUI takes the terminal, and a provider that reappears skewed joins only under the override. The skew message's recovery line names min stop --force. Backport of #2342. Adapted to the line: dash/ is the minimal-tui crate, so its inventory test carries the gated rows, and the rows in minimal's connection inventory drop out. (cherry picked from commit 2e67f8a)
norrietaylor
pushed a commit
that referenced
this pull request
Nov 5, 2026
…2338) A client attached during an upgrade autospawns a replacement daemon the moment the pre-swap stop ends, and that daemon serves the old version from the binaries the run is about to replace. The installer now stops once more after every swap, only a daemon whose version differs from the installed min, and --force only with consent. A pre-swap yes covers only the sessions it listed: sessions opened after it are asked about again, and with no terminal the daemon stays running and the installer names min stop --force. An EXIT trap runs the same stop when the run dies after the first executable swap. Spec 07 R5.5 describes it. Backport of #2338. Applied without adaptation, after #2342 as on main. (cherry picked from commit e6cbd46)
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.
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABWKqSgg
Problem
Uninstall deleted the binaries but never stopped the daemon they ran, so a
reinstall autospawned nothing and the old daemon went on serving every
daemon-backed command — each one now a version-skew refusal against the fresh
CLI.
min dashhad the mirror-image bug: it opened on a skewed pair wheremin lsrefuses.Fix
minthat matches itis still on disk — same escalation as an upgrade: graceful stop, a consent
question on the terminal when sessions are live,
--force-stopafter.minon disk (the daemon survived anuninstall and was started again by hand) gets a post-swap probe: the
installed
mincompares its version with the answering daemon's andforce-stops a mismatched one before it can wedge the new build.
min ls's:min dashrefuses a skewed daemon before the TUI takes over the terminal,and a provider reappearing mid-run with a skewed build joins only under the
override.
min stop --force— the plain stopis refused while sessions are live.
Verification
cargo fmt --all --check --manifest-path target/Cargo.toml— cleancargo clippy --workspace --all-targets --locked --manifest-path target/Cargo.toml -- -D warnings— no findingscargo test --locked --manifest-path target/Cargo.toml -p minimald-rpc— 71 passedcargo test --locked --manifest-path target/Cargo.toml -p minimal --lib— 527 passed, 1 pre-existing failure onmain(tests::legacy_network_spellings_parse_with_hint, network-deprecation hint, unrelated to this change; verified failing on the unmodified checkout)cargo test --locked --manifest-path target/Cargo.toml -p common— all green, including the shell harness that runs everyscripts/*_test.shcase undershand the shellcheck lint ofscripts/*.sh--force-stop, dry-run, idle daemon), and the reinstall-over-a-stale-daemon probe (mismatch force-stops with a report, match and unreachable daemon stay silent)dash::rpc::version_gate_tests::every_dashboard_connection_is_version_gatedasserts the all-gated inventory;cargo test -p minimal --lib dash— 63 passed