8000 fix(minimal): stop the running daemon on uninstall and refuse a skewed one in dash by gominimal-aw-bot[bot] · Pull Request #2342 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimal): stop the running daemon on uninstall and refuse a skewed one in dash - #2342

Merged
norrietaylor merged 1 commit into
mainfrom
inbox-patch/fix/uninstall-stops-daemon-323afdc149a2e6cc
Oct 19, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
inbox-patch/fix/uninstall-stops-daemon-323afdc149a2e6cc

Conversation

@gominimal-aw-bot
Copy link
Copy Markdown
Contributor

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 dash had the mirror-image bug: it opened on a skewed pair where
min ls refuses.

Fix

  • The uninstall walk stops the daemon first, while the min that matches it
    is still on disk — same escalation as an upgrade: graceful stop, a consent
    question on the terminal when sessions are live, --force-stop after.
  • An install that starts with no min on disk (the daemon survived an
    uninstall and was started again by hand) gets a post-swap probe: the
    installed min compares its version with the answering daemon's and
    force-stops a mismatched one before it can wedge the new build.
  • The dashboard's discovery connections are version-gated like min ls's:
    min dash refuses 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.
  • The skew message's recovery line names min stop --force — the plain stop
    is refused while sessions are live.

Verification

  • cargo fmt --all --check --manifest-path target/Cargo.toml — clean
  • cargo clippy --workspace --all-targets --locked --manifest-path target/Cargo.toml -- -D warnings — no findings
  • cargo test --locked --manifest-path target/Cargo.toml -p minimald-rpc — 71 passed
  • cargo test --locked --manifest-path target/Cargo.toml -p minimal --lib — 527 passed, 1 pre-existing failure on main (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 every scripts/*_test.sh case under sh and the shellcheck lint of scripts/*.sh
  • New installer scenarios cover: uninstall over a live-session daemon (consent path, decline path, no-TTY abort, --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)
  • Dashboard gate: dash::rpc::version_gate_tests::every_dashboard_connection_is_version_gated asserts the all-gated inventory; cargo test -p minimal --lib dash — 63 passed

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>
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 19, 2026 06:08
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 19, 2026
@coderabbitai
coderabbitai Bot commented Oct 19, 2026
Copy link
Copy Markdown
Contributor

Warning

Review limit reached

  • Run on-demand review

This review includes 7 billable files and costs up to $1.75.

Or wait 25 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available. Your 30 included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 73223e9d-1448-4b75-8f36-75c8fde63b69
📥 Commits

Reviewing files that changed from the base of the PR and between 7675e02 and 086ab5a.

📒 Files selected for processing: 7
  • crates/minimal/src/cmd/list.rs
  • crates/minimal/src/dash/app.rs
  • crates/minimal/src/dash/rpc.rs
  • crates/minimal/src/tests.rs
  • crates/minimald-rpc/src/lib.rs
  • scripts/install.sh
  • scripts/install_test.sh
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
Copy link
Copy Markdown
Member

/review

@minimal-foundry
minimal-foundry Bot commented Oct 19, 2026 •
Copy link
Copy Markdown
Contributor

Approved: no findings at 086ab5acdca6.

Nothing to do.

Clobber: none seen.

@norrietaylor norrietaylor changed the title fix: uninstall stops the running daemon; dash refuses a skewed one fix(minimal): stop the running daemon on uninstall and refuse a skewed one in dash Oct 19, 2026
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 19, 2026
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 19, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 19, 2026
Merged via the queue into main with commit 2e67f8a Oct 19, 2026
39 checks passed
@norrietaylor
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)
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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0