8000 fix(minimal): pass host and remedy to find_listed_box in stop and rm · gominimal/minimal@899be48 · GitHub
[go: up one dir, main page]

Skip to content

fix(minimal): pass host and remedy to find_listed_box in stop and rm

Minimal Arch / arch-review succeeded Nov 4, 2026 in 0s

PASS

Baseline. This re-reviews 899be482 against the PASS on 2f568b72 (this PR). I checked these facts. since.diff equals git diff 2f568b72 899be482. pr.diff equals 3622 git diff 194b68e7 899be482, and 194b68e7 is the merge base. The merge 2b46c803 brings #2874 (T31) and #2963 (T1) from main. Its only conflict hunk (git diff-tree --cc) is in crates/minimal/src/cli.rs BoxCommand. It keeps T1's new List/Show doc lines and this branch's Stop/Rm variants unchanged, so the hunk is a plain union. I do not rule on the main hunks in the compare.

Branch change. One commit, 899be482, in crates/minimal/src/cmd/boxes/lifecycle.rs. T1 widened find_listed_box (show.rs) to take the host and the not-found remedy. The commit adds BoxLookup, which selects the host the same way cmd_box_show does (local_hosts, selected), and passes it to stop_listed_box and rm_listed_box.

Governs: architecture.md line 485 (min box stop|rm <box> [--force]), line 499 (stop, and --force kills at once), line 501 (rm reaps), lines 350 and 363 (the --force refusal, exit 2), line 389 and line 353 (a box is addressed on a host, and the host flag targets a host within the provider).

Ruling. The lookup reads the host that connect_daemon reaches, so the refusal names the host that the user asked. This matches lines 389 and 353, and T1's ruling (#2963). The StopBox/ReapBox requests, the running-box refusal and exit 2 do not change. The root cmd span records outcome on every result (cmd/mod.rs line 281), so a not-found refusal is recorded too. The residual #2982 stays open, as the baseline ruled.

Notes, not conditions. The remedy names --vm <name>, but line 353 names --host. The tree has no --host flag, and T1 put this text in place, so this PR does not add the gap. BoxLookup::on copies the several-hosts text of not_found_remedy with the verb in place of min box show. That is a code-quality point for minimal-review, not a design deviation.

Not checked: that the head compiles and that lookup_refusal_names_host_and_verb passes. Both need a build.

Ruled at 899be48 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5; arch_rulings 851, job cc4a8413-e0ee-4cf6-8b2d-a50face637cd.

0