Repository navigation
feat(minimal): T60 — A box verb refuses a box on a stopped VM with NET-058's answer - #3628
Conversation
…command resolve_box_on_local_hosts now reads a stopped VM's persisted box records and refuses an address that resolves there with box_on_stopped_vm's text and exit 4 (BCLI-002, NET-058). session.rs gets the new refusal's log outcome.
The unknown-box and stopped-VM steps now use the box verb, and NET-058 and the box CLI spec's migration entry say so.
The stopped-VM change moved the ungated probe from read_host_boxes into its new read_host helper. The connection inventory now names that site.
Spec lint
Advisory. None of this blocks the merge; the review decides. Advisory, and never a merge gate. Linter: |
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Reviewed: no findings; approval withheld, 11 threads unresolved at APPROVE withheld: 11 unresolved threads — minimal-arch[bot] docs/specs/18-spec-box-networking/18-spec-box-networking.md:488, minimal-arch[bot] scripts/session-e2e.sh:32147, minimal-arch[bot] scripts/session-e2e.sh:32147, minimal-arch[bot] scripts/session-e2e.sh:32245, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:500, …. Resolving the last thread releases the approval on this head. Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required. Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 2 conditions · the full ruling
The resolver change conforms to the design. min box show now refuses a box on a stopped VM with exit 4 and the existing NET-058 text. The spec does not agree with the change. NET-058 now names min box show <box> --network, but its unknown-box sub-bullet still requires the --vm flag, and the design gives the box verbs no --vm flag. Amend that sub-bullet as C1 says. Then run just e2e and record the NET-058 leg in the PR body (C2).
Ruled at 202839d against gominimal/arch@8b824707cde6 by claude-opus-5-5.
| <!-- S7a, S7b; ubiquitous; a box whose VM is stopped still exists and still holds its name and files, so leaving it out of the listing hides state the user must act on to start or destroy it --> | ||
|
|
||
| - **NET-058** WHEN `min session attach`, `min session exec`, `min session policy`, `min session destroy` or `min net forward` names a box THE SYSTEM SHALL resolve the VM that holds the box from the box name, without a global flag. | ||
| - **NET-058** WHEN `min session attach`, `min session exec`, `min session policy`, `min box show <box> --network`, `min session destroy` or `min net forward` names a box THE SYSTEM SHALL resolve the VM that holds the box from the box name, without a global flag. |
There was a problem hiding this comment.
C1 · This statement now names min box show <box> --network. The first sub-bullet below (line 492) still requires the refusal to name the --vm flag. The box verb does not do that, and the design addressing section (line 389) gives only --provider/--host. Scope that sub-bullet to the min session verbs and min net forward. Add the box verb's not-found answer, exit 4.
There was a problem hiding this comment.
Addressed in f3e4b978ed63: f3e4b97 splits NET-058's unknown-box sub-bullet. The min session verbs and min net forward name --vm. A min box verb names min box list --all and exits 4, verified by box_verb_on_stopped_vm_box_refuses_with_start_hint.
| "no running VM has a box named '$lt_nobody'." "$LT_ERR" | ||
| lt_want_line "the unknown-box refusal shows the --vm form of the command" \ | ||
| "min --vm <vm> session policy $lt_nobody" "$LT_ERR" | ||
| lt_run unknown mnl box show "$lt_nobody" --network |
There was a problem hiding this comment.
C2 · This step and the policy-stopped step at line 32245 are the NET-058 leg that the task proof names. The PR body says just e2e did not run. Run it on a KVM host at this head, and put the result in the Proof section.
There was a problem hiding this comment.
Addressed in f3e4b978ed63: No code change is necessary. The CI (macOS) e2e job runs just e2e on a microVM at this head, and its result goes in the PR's Proof section. This box has no microVM to run it.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-arch[bot] docs/specs/18-spec-box-networking/18-spec-box-networking.md:488, minimal-arch[bot] scripts/session-e2e.sh:32147. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
|
/revise Head C1: scope NET-058's unknown-box sub-bullet (
C2 needs no code. The CI (macOS) Threads. Reply on the C1 thread with this round's commit. |
The session verbs and min net forward name the --vm flag. The box verbs take --provider and --host, so their not-found answer names min box list --all and exits 4.
|
Round 1 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
NET-058 now has two unknown-box requirements. The Notes from the agent: This round changed only the NET-058 spec text (commit f3e4b97), as the directive asked. The new box-verb requirement uses verify box_verb_on_stopped_vm_box_refuses_with_start_hint. That test checks the unknown name as BoxAddressRefusal::NotFound. It asserts exit 4 only for the stopped-VM refusals, so the exit code of not-found is checked by the type, not by an assertion on that branch. I did not run just e2e on this box. The directive gives C2 to the CI (macOS) e2e job. I did not run just lint-prose because vale is not installed here. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
C1 is met. NET-058 now gives the min session verbs the --vm answer and gives the min box verbs the not-found answer that names min box list --all. C2 is still open. The PR body says that just e2e did not run, so the NET-058 leg on min box show --network has no proof. Run just e2e on a KVM host and put the result of the unknown and policy-stopped steps in the Proof section.
Ruled at f3e4b97 against gominimal/arch@8b824707cde6 by claude-opus-5-5.
| "no running VM has a box named '$lt_nobody'." "$LT_ERR" | ||
| lt_want_line "the unknown-box refusal shows the --vm form of the command" \ | ||
| "min --vm <vm> session policy $lt_nobody" "$LT_ERR" | ||
| lt_run unknown mnl box show "$lt_nobody" --network |
There was a problem hiding this comment.
C2 · This step now runs on min box show <box> --network. It did not run at this head. Run just e2e on a KVM host and record that the unknown step passes in the Proof section of the PR body.
There was a problem hiding this comment.
Ran it at this head. just e2e on a real microVM (CI (macOS), job https://github.com/gominimal/minimal/actions/runs/44464820569/job/135363150273) passed. The Proof section quotes both steps: unknown exits 4 with No box named e2e-lt-nobody. Run min box list --all ..., and policy-stopped exits 4 with box 'e2e-lt-b' is on VM 'lsvm', which is stopped. Start it with: .... The asserted text is unchanged.
There was a problem hiding this comment.
Addressed in 44ca0e55f743: The finding holds, but this round does not fix it. just e2e needs a KVM host and this runner has none, so the unknown step is still unproven at this head. The KVM lane owes the result for the Proof section.
| fi | ||
| lt_run policy-stopped mnl session policy "$lt_b" | ||
| lt_want_rc refused "min session policy $lt_b, with VM $lt_vm stopped" | ||
| lt_run policy-stopped mnl box show "$lt_b" --network |
There was a problem hiding this comment.
C2 · The policy-stopped step did not run at this head. Run just e2e on a KVM host and record that this step passes in the Proof section of the PR body. Do not change the asserted text.
There was a problem hiding this comment.
Ran it at this head. just e2e on a real microVM (CI (macOS), job https://github.com/gominimal/minimal/actions/runs/44464820569/job/135363150273) passed. The Proof section quotes both steps: unknown exits 4 with No box named e2e-lt-nobody. Run min box list --all ..., and policy-stopped exits 4 with box 'e2e-lt-b' is on VM 'lsvm', which is stopped. Start it with: .... The asserted text is unchanged.
There was a problem hiding this comment.
Addressed in 44ca0e55f743: The finding holds, but this round does not fix it. just e2e needs a KVM host and this runner has none, so the policy-stopped step is still unproven at this head. Its asserted text is unchanged. The KVM lane owes the result.
There was a problem hiding this comment.
APPROVE withheld: 4 unresolved threads — minimal-arch[bot] docs/specs/18-spec-box-networking/18-spec-box-networking.md:488, minimal-arch[bot] scripts/session-e2e.sh:32147, minimal-arch[bot] scripts/session-e2e.sh:32147, minimal-arch[bot] scripts/session-e2e.sh:32245.
minimal-review — advisory review
Verdict COMMENT — No findings.
Panel: 2 of 3 personas ran (correctness, security); did not complete: supply-chain.
|
/arch-review |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The resolver change conforms to the Addressing section (architecture.md line 389). A box on a stopped VM now resolves by id, name or provider/host/name, and min box show refuses it with the VM's start command. The NET-058 steps move correctly to min box show --network. Other box verbs, such as min box exec, attach and rm, still call resolve_box_on_hosts and answer such a box with "No box named". Line 389 makes a stopped box addressable, so this gap is real work. The PR body names no issue for it. C1 files the issue and records it in the PR body and in the spec 28 T31 bullet.
Ruled at f3e4b97 against gominimal/arch@8b824707cde6 by claude-opus-5-5.
| /// [`resolve_box_on_local_hosts`] over the local `hosts` it read. | ||
| /// [`resolve_box_on_local_hosts`] over the local `hosts` it read, with no | ||
| /// read of a stopped VM's box records. | ||
| pub(crate) async fn resolve_box_on_hosts( |
There was a problem hiding this comment.
C1 · The callers of this function never read a stopped VM's records. Then min box exec, attach, rm, stop, wait, events, cp, rename, restart and prune answer a box on a stopped VM with "No box named". Architecture line 389 makes a stopped box addressable. File an issue for these verbs and name it in the PR body as a residual.
|
|
||
| - `min session activate`: NET-018, NET-020, NET-035, NET-040, NET-049, NET-051 and NET-122, the last in a sub-bullet's comment. A BOX-001 sub-bullet cites it too. The installer's closing card names `min session activate --attach .` (`docs/specs/07-spec-installer`, R10.4). The lifecycle-hooks spec cites `min session activate --no-hooks` (`docs/specs/11-spec-lifecycle-hooks`), whose new spelling is `min session start --no-hooks` (BCLI-076). Scripts: `scripts/session-e2e.sh`, `scripts/bulk-upload-e2e.sh`, `scripts/stress-session-e2e.sh` and `scripts/kernel-bump-review.sh`. | ||
| - `min session policy`: NET-044, NET-058, NET-061, NET-075, NET-130 (in a sub-bullet's comment), NET-140, NET-146 and a NET-160 sub-bullet's comment, and BEP-085's comment. The draft GWI-003 cites it too. Its successor is `min box show <box> --network` (BCLI-025), which renders the same effective policy and the same `-o json` document. T55 moved the steps of `scripts/session-e2e.sh` that read a box's policy to it, and `min session policy` calls the same render until T31 removes it. NET-058 and the two e2e steps that prove its refusals stay on `min session policy`: the step for a name no VM holds and the step for a box on a stopped VM. `min box show` answers a box on a stopped VM as not found, and NET-058 refuses that answer. T31 moves them only after a `min box` verb answers a box on a stopped VM with NET-058's refusal, which T60 (gominimal/minimal#3589) tracks. | ||
| - `min session policy`: NET-044, NET-058, NET-061, NET-075, NET-130 (in a sub-bullet's comment), NET-140, NET-146 and a NET-160 sub-bullet's comment, and BEP-085's comment. The draft GWI-003 cites it too. Its successor is `min box show <box> --network` (BCLI-025), which renders the same effective policy and the same `-o json` document. T55 moved the steps of `scripts/session-e2e.sh` that read a box's policy to it, and `min session policy` calls the same render until T31 removes it. T60 (gominimal/minimal#3589) moved NET-058 and its two e2e steps to `min box show <box> --network`: the step for a name no VM holds and the step for a box on a stopped VM. `min box show` now refuses a box on a stopped VM with NET-058's refusal, with exit 4. The step for a name no VM holds now checks the box verb's not-found refusal. |
There was a problem hiding this comment.
C1 · This bullet says that min box show now refuses a box on a stopped VM. Add one sentence that names the C1 issue. Say that the other min box verbs still answer such a box as not found. Then T31 does not read the move as complete for every box verb.
|
/revise Head C1. In Threads. Reply on the two C1 threads with this round's commit and #3634. |
Only min box show refuses a box on a stopped VM today. The other min box verbs answer it as not found until T61 (#3634), and T31 waits on T61.
|
Round 2 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
With a box on a stopped VM, Notes from the agent: Round 2 changed text only, as the note asked: one sentence in the line 675 bullet of docs/specs/28-spec-box-cli/28-spec-box-cli.md, commit 44ca0e5. I did not run the test line this round because no code changed. The runner re-runs it. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The code conforms to the design at this head. min box show refuses a box on a stopped VM with exit 4, as Addressing and the exit-code table require. C1 is partly met. Issue #3634 is filed and named in the PR body and on spec line 675. But both lists leave out min box logs, min box prune --parent and the type-noun stop, rm and logs, which still answer such a box as not found. Add them to spec line 675, to a ## Residuals section in the PR body and to #3634, as C1 says.
Ruled at 44ca0e5 against gominimal/arch@8b824707cde6 by claude-opus-5-5.
|
|
||
| - `min session activate`: NET-018, NET-020, NET-035, NET-040, NET-049, NET-051 and NET-122, the last in a sub-bullet's comment. A BOX-001 sub-bullet cites it too. The installer's closing card names `min session activate --attach .` (`docs/specs/07-spec-installer`, R10.4). The lifecycle-hooks spec cites `min session activate --no-hooks` (`docs/specs/11-spec-lifecycle-hooks`), whose new spelling is `min session start --no-hooks` (BCLI-076). Scripts: `scripts/session-e2e.sh`, `scripts/bulk-upload-e2e.sh`, `scripts/stress-session-e2e.sh` and `scripts/kernel-bump-review.sh`. | ||
| - `min session policy`: NET-044, NET-058, NET-061, NET-075, NET-130 (in a sub-bullet's comment), NET-140, NET-146 and a NET-160 sub-bullet's comment, and BEP-085's comment. The draft GWI-003 cites it too. Its successor is `min box show <box> --network` (BCLI-025), which renders the same effective policy and the same `-o json` document. T55 moved the steps of `scripts/session-e2e.sh` that read a box's policy to it, and `min session policy` calls the same render until T31 removes it. NET-058 and the two e2e steps that prove its refusals stay on `min session policy`: the step for a name no VM holds and the step for a box on a stopped VM. `min box show` answers a box on a stopped VM as not found, and NET-058 refuses that answer. T31 moves them only after a `min box` verb answers a box on a stopped VM with NET-058's refusal, which T60 (gominimal/minimal#3589) tracks. | ||
| - `min session policy`: NET-044, NET-058, NET-061, NET-075, NET-130 (in a sub-bullet's comment), NET-140, NET-146 and a NET-160 sub-bullet's comment, and BEP-085's comment. The draft GWI-003 cites it too. Its successor is `min box show <box> --network` (BCLI-025), which renders the same effective policy and the same `-o json` document. T55 moved the steps of `scripts/session-e2e.sh` that read a box's policy to it, and `min session policy` calls the same render until T31 removes it. T60 (gominimal/minimal#3589) moved NET-058 and its two e2e steps to `min box show <box> --network`: the step for a name no VM holds and the step for a box on a stopped VM. `min box show` now refuses a box on a stopped VM with NET-058's refusal, with exit 4. The other `min box` verbs (`exec`, `attach`, `rm`, `stop`, `wait`, `events`, `cp`, `rename` and `restart`) still answer such a box as not found until T61 (gominimal/minimal#3634), and T31 waits on T61. The step for a name no VM holds now checks the box verb's not-found refusal. |
There was a problem hiding this comment.
C1 · This list does not name every verb that still misses a stopped VM's box. Add logs and prune --parent. Also add the type-noun forms min session|task stop, rm and logs, which resolve through resolve_box_of_type and resolve_typed_box_on_hosts. Architecture line 458 says the type nouns are aliases for the min box forms.
There was a problem hiding this comment.
Addressed in 61b9da899eeb: Commit 61b9da8 adds logs, prune --parent and the type-noun forms min session|task stop, rm and logs to the list. resolve_typed_box_on_hosts and resolve_box_of_type do not read stopped VMs either.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 7 unresolved threads — minimal-arch[bot] docs/specs/18-spec-box-networking/18-spec-box-networking.md:488, minimal-arch[bot] scripts/session-e2e.sh:32147, minimal-arch[bot] scripts/session-e2e.sh:32147, minimal-arch[bot] scripts/session-e2e.sh:32245, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:495, …. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
|
/revise Head In Reply on the C1 thread with this round's commit. |
…-refuses-a-box-on-a-stopped-vm-with-ne
Add logs, prune --parent and the session|task stop, rm and logs type-noun forms to the T61 list in the BCLI rollout bullet.
|
Round 3 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
The BCLI rollout bullet now lists every verb that still answers a box on a stopped VM as not found: the min box verbs exec, attach, rm, stop, wait, events, cp, rename, restart, logs and prune --parent, and the type-noun forms min session|task stop, rm and logs. It still links T61 (#3634) and says that T31 waits on it. Notes from the agent: Round 3 was text only, as the note asked. No code changed, so I did not run the test: line again. Commit 61b9da8 holds the change. just lint-prose did not run because vale is not installed on this box. I checked the thread against the code: resolve_typed_box_on_hosts in crates/minimal/src/cmd/boxes.rs and resolve_box_of_type in crates/minimal/src/cmd/session.rs read only the running hosts' records. |
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The compare since 44ca0e55 meets parts (1) and (2) of C1. Line 675 of spec 28 now lists logs, prune --parent and the type-noun stop, rm and logs. The PR body lists the same verbs under ## Residuals, linked to #3634. Part (3) of C1 is still open. Edit the body of #3634 so that its scope names the same verbs and the two typed resolvers. The edit is outside the repository, so the merge can continue with C1 open.
Ruled at 61b9da8 against gominimal/arch@8b824707cde6 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 7 unresolved threads — minimal-arch[bot] docs/specs/18-spec-box-networking/18-spec-box-networking.md:488, minimal-arch[bot] scripts/session-e2e.sh:32147, minimal-arch[bot] scripts/session-e2e.sh:32147, minimal-arch[bot] scripts/session-e2e.sh:32245, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:495, …. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
norrietaylor
left a comment
There was a problem hiding this comment.
The resolver change looks correct. A non-selected host that is not running, and that matches an enumerated VM socket, contributes its persisted boxes as stopped entries. A resolution that lands on such a host becomes OnStoppedVm, exit 4, with the NET-058 text. min box list and the other read_host_boxes callers keep their old behaviour. One medium finding: the -o json hint for the new refusal is an instruction with no command, against the AGENTS.md user-facing text rules. Making hint() return Cow fixes it with no change in main.rs. The machine-mode table should also gain an OnStoppedVm row. Three lows: an untested ambiguity change, a NET-058 verify line that misses the new test, and min box spec now refusing without the spec saying so. The prior threads (NET-058 split, residual list, e2e proof) are addressed and not repeated here.
Generated by Claude Code
| Self::AmbiguousIdStart { .. } => "Give more of the id.", | ||
| Self::NotFound { .. } => "Run `min box list --all` to see the boxes of every project.", | ||
| Self::OnStoppedVm { .. } => { | ||
| "Start the VM that holds the box, then run the command again." |
There was a problem hiding this comment.
Medium: the -o json hint for OnStoppedVm is an instruction that names no command. AGENTS.md "User-facing text" says an instruction names a command the user can run as written, and fills in the value when the message knows it. Here the code knows both values. Path: min box show beta --network -o json with beta on stopped VM alpha -> main.rs::machine_mode_answer emits {"code":"not_found","hint":"Start the VM that holds the box, then run the command again."}. A script that reads hint, as BCLI-033 intends, gets no command to run. The command is only in message.
The PR body says a String hint would need a main.rs edit. It would not: main.rs:544 already calls refused.hint().to_string(), so hint() can return Cow<'static, str> (or String) with no change there. Suggested fix: return Cow::Owned(format!("Start it with: min --vm {vm} session attach {name}")) for OnStoppedVm and Cow::Borrowed for the rest. Add an OnStoppedVm row ("not_found", 4) to the machine-mode table in main.rs (refusal.hint() vs object["hint"], around line 1379), so the JSON shape of the new refusal is pinned. Today that table has no row for it.
Generated by Claude Code
There was a problem hiding this comment.
Addressed in f8dea1801e8d: BoxAddressRefusal::hint() now returns Cow<'static, str>. OnStoppedVm gives Start it with: min --vm {vm} session attach {name}. The machine-mode table in main.rs has an OnStoppedVm row (not_found, exit 4) that pins the JSON hint.
| HostRead::Answered(boxes) => boxes, | ||
| HostRead::NotRunning => match vms.iter().find(|vm| vm.sock == host.sock) { | ||
| Some(vm) => { | ||
| stopped.push((host.host.clone(), vm.vm.clone())); |
There was a problem hiding this comment.
Low: this adds a behaviour change that no test pins. Before this PR, a stopped VM listed nothing. So min box show web, with web exited on a running VM and also in a stopped VM's records, resolved to the exited box. Now both entries are non-running candidates on two hosts. resolve_box_address takes the [] => several arm and returns Ambiguous, exit 2. The PR body describes this as intended under BCLI-002. box_verb_on_stopped_vm_box_refuses_with_start_hint covers only the running-wins case (api is running on the default VM). Suggested fix: add one case with an exited box of the same name on the running VM. Assert the exit-2 ambiguity and that its candidates list both hosts with their states.
Generated by Claude Code
There was a problem hiding this comment.
Addressed in f8dea1801e8d: The test now stops a box web on the running VM and adds web to stopped VM delta. It asserts exit 2 and the two exact candidate rows, each with host and state stopped.
| <!-- S7b; unwanted; the box verbs take `--provider` and `--host`, not `--vm` (design addressing section), so their not-found answer points at the listing instead of a flag; a box on a stopped VM is answered by the sub-requirement below instead --> | ||
| - IF a command names a box on a stopped VM THEN THE SYSTEM SHALL say which stopped VM holds the box and give the command that starts that VM. | ||
| tier: T0 | ||
| verify: cargo nextest run -p minimal box_on_stopped_vm_names_start_command |
There was a problem hiding this comment.
Low: this PR makes min box show <box> --network satisfy the stopped-VM sub-bullet, but the sub-bullet's verify line does not run the test that proves it. cargo nextest run -p minimal box_on_stopped_vm_names_start_command matches by substring, and box_verb_on_stopped_vm_box_refuses_with_start_hint does not contain that string. So the box-verb half of this requirement has no verify line. The new test sits only under the unknown-box sub-bullet above. Suggested fix: list both tests on this verify line, as the unknown-box sub-bullets do for their own families.
Generated by Claude Code
There was a problem hiding this comment.
Addressed in f8dea1801e8d: The stopped-VM sub-bullet's verify line now runs box_on_stopped_vm_names_start_command and box_verb_on_stopped_vm_box_refuses_with_start_hint.
|
|
||
| - `min session activate`: NET-018, NET-020, NET-035, NET-040, NET-049, NET-051 and NET-122, the last in a sub-bullet's comment. A BOX-001 sub-bullet cites it too. The installer's closing card names `min session activate --attach .` (`docs/specs/07-spec-installer`, R10.4). The lifecycle-hooks spec cites `min session activate --no-hooks` (`docs/specs/11-spec-lifecycle-hooks`), whose new spelling is `min session start --no-hooks` (BCLI-076). Scripts: `scripts/session-e2e.sh`, `scripts/bulk-upload-e2e.sh`, `scripts/stress-session-e2e.sh` and `scripts/kernel-bump-review.sh`. | ||
| - `min session policy`: NET-044, NET-058, NET-061, NET-075, NET-130 (in a sub-bullet's comment), NET-140, NET-146 and a NET-160 sub-bullet's comment, and BEP-085's comment. The draft GWI-003 cites it too. Its successor is `min box show <box> --network` (BCLI-025), which renders the same effective policy and the same `-o json` document. T55 moved the steps of `scripts/session-e2e.sh` that read a box's policy to it, and `min session policy` calls the same render until T31 removes it. NET-058 and the two e2e steps that prove its refusals stay on `min session policy`: the step for a name no VM holds and the step for a box on a stopped VM. `min box show` answers a box on a stopped VM as not found, and NET-058 refuses that answer. T31 moves them only after a `min box` verb answers a box on a stopped VM with NET-058's refusal, which T60 (gominimal/minimal#3589) tracks. | ||
| - `min session policy`: NET-044, NET-058, NET-061, NET-075, NET-130 (in a sub-bullet's comment), NET-140, NET-146 and a NET-160 sub-bullet's comment, and BEP-085's comment. The draft GWI-003 cites it too. Its successor is `min box show <box> --network` (BCLI-025), which renders the same effective policy and the same `-o json` document. T55 moved the steps of `scripts/session-e2e.sh` that read a box's policy to it, and `min session policy` calls the same render until T31 removes it. T60 (gominimal/minimal#3589) moved NET-058 and its two e2e steps to `min box show <box> --network`: the step for a name no VM holds and the step for a box on a stopped VM. `min box show` now refuses a box on a stopped VM with NET-058's refusal, with exit 4. The other `min box` verbs (`exec`, `attach`, `rm`, `stop`, `wait`, `events`, `cp`, `rename`, `restart`, `logs` and `prune --parent`) still answer such a box as not found. The type-noun forms `min session|task stop`, `rm` and `logs` do too. These stay so until T61 (gominimal/minimal#3634), and T31 waits on T61. The step for a name no VM holds now checks the box verb's not-found refusal. |
There was a problem hiding this comment.
Low: min box spec <box> changes behaviour too, and this bullet does not say so. box_spec.rs:1024 resolves through resolve_box_on_local_hosts. So min box spec now also refuses a box on a stopped VM with the start command, exit 4. Before this PR it answered not found. The bullet names only min box show, and the list of verbs that still answer not found leaves spec out. A reader cannot tell which side spec is on, and no test covers it. Suggested fix: name min box spec beside min box show here and in the PR body.
Generated by Claude Code
There was a problem hiding this comment.
Addressed in f8dea1801e8d: The bullet now names min box show and min box spec as the verbs that refuse with exit 4. The test runs min box spec beta and asserts the refusal, exit 4 and the hint.
|
/revise Head 1. Medium: the 2. Low: pin the cross-host ambiguity ( 3. Low: the stopped-VM sub-bullet's verify line ( 4. Low: name Threads. Reply on each of Norrie's four threads with this round's commit. |
The -o json hint of a box on a stopped VM now carries the command that starts it. Pin the JSON shape in the machine-mode table, and cover the cross-host ambiguity and min box spec in the stopped-VM test.
min box spec resolves through the same lookup as min box show, so it now refuses a box on a stopped VM too. NET-058's stopped-VM verify line runs the box-verb test beside the session-verb one.
…-refuses-a-box-on-a-stopped-vm-with-ne
|
Round 4 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
With a box on a stopped VM, Notes from the agent: This round changes only what the four review threads ask for. crates/minimal/src/main.rs is outside the task's layers. The /revise note asks for the OnStoppedVm row in its machine-mode table, and the test there now reads |
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 11 unresolved threads — minimal-arch[bot] docs/specs/18-spec-box-networking/18-spec-box-networking.md:488, minimal-arch[bot] scripts/session-e2e.sh:32147, minimal-arch[bot] scripts/session-e2e.sh:32147, minimal-arch[bot] scripts/session-e2e.sh:32245, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:500, …. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
|
/arch-review |
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The code conforms. The stopped-VM refusal now gives the start command in the -o json hint too, as the error object in the design's output conventions expects. The new tests pin min box spec and the cross-host ambiguity, which the Addressing section requires. C1 stays open. I cannot see the body of #3634 from the sandbox. Edit it to name the verbs and the two typed resolvers that line 675 names.
Ruled at f8dea18 against gominimal/arch@8b824707cde6 by claude-opus-5-5.
|
|
||
| - `min session activate`: NET-018, NET-020, NET-035, NET-040, NET-049, NET-051 and NET-122, the last in a sub-bullet's comment. A BOX-001 sub-bullet cites it too. The installer's closing card names `min session activate --attach .` (`docs/specs/07-spec-installer`, R10.4). The lifecycle-hooks spec cites `min session activate --no-hooks` (`docs/specs/11-spec-lifecycle-hooks`), whose new spelling is `min session start --no-hooks` (BCLI-076). Scripts: `scripts/session-e2e.sh`, `scripts/bulk-upload-e2e.sh`, `scripts/stress-session-e2e.sh` and `scripts/kernel-bump-review.sh`. | ||
| - `min session policy`: NET-044, NET-058, NET-061, NET-075, NET-130 (in a sub-bullet's comment), NET-140, NET-146 and a NET-160 sub-bullet's comment, and BEP-085's comment. The draft GWI-003 cites it too. Its successor is `min box show <box> --network` (BCLI-025), which renders the same effective policy and the same `-o json` document. T55 moved the steps of `scripts/session-e2e.sh` that read a box's policy to it, and `min session policy` calls the same render until T31 removes it. NET-058 and the two e2e steps that prove its refusals stay on `min session policy`: the step for a name no VM holds and the step for a box on a stopped VM. `min box show` answers a box on a stopped VM as not found, and NET-058 refuses that answer. T31 moves them only after a `min box` verb answers a box on a stopped VM with NET-058's refusal, which T60 (gominimal/minimal#3589) tracks. | ||
| - `min session policy`: NET-044, NET-058, NET-061, NET-075, NET-130 (in a sub-bullet's comment), NET-140, NET-146 and a NET-160 sub-bullet's comment, and BEP-085's comment. The draft GWI-003 cites it too. Its successor is `min box show <box> --network` (BCLI-025), which renders the same effective policy and the same `-o json` document. T55 moved the steps of `scripts/session-e2e.sh` that read a box's policy to it, and `min session policy` calls the same render until T31 removes it. T60 (gominimal/minimal#3589) moved NET-058 and its two e2e steps to `min box show <box> --network`: the step for a name no VM holds and the step for a box on a stopped VM. `min box show` and `min box spec` now refuse a box on a stopped VM with NET-058's refusal, with exit 4. The other `min box` verbs (`exec`, `attach`, `rm`, `stop`, `wait`, `events`, `cp`, `rename`, `restart`, `logs` and `prune --parent`) still answer such a box as not found. The type-noun forms `min session|task stop`, `rm` and `logs` do too. These stay so until T61 (gominimal/minimal#3634), and T31 waits on T61. The step for a name no VM holds now checks the box verb's not-found refusal. |
There was a problem hiding this comment.
C1 · This line lists the verbs that still miss a stopped VM's box until T61. Make the scope of #3634 name the same verbs. Also name resolve_box_of_type in cmd/session.rs and resolve_typed_box_on_hosts in cmd/boxes.rs.
There was a problem hiding this comment.
Done. T61 (#3634) now names the same verbs as line 675: min box exec, attach, rm, stop, wait, events, cp, rename, restart, logs and prune --parent, and the type-noun min session|task stop, rm and logs. It names resolve_box_of_type and resolve_typed_box_on_hosts too, and its test covers each one.
T60 — A box verb refuses a box on a stopped VM with NET-058's answer
slice: S8
kind: task
covers: BCLI-002, BCLI-042
size: M
est: 120 code, 180 tests
executor: agent
difficulty: involved
model: strongest
diagnostics: none new
observability: none new
layers:
- client:
- crates/minimal/src/cmd/boxes/address.rs:
resolve_box_on_local_hostsreads the stopped VMs' records and refuses a box on a stopped VM withbox_on_stopped_vm- crates/minimal/src/cmd/mod.rs:
box_on_stopped_vmand the stopped-VM lookup are callable from the box resolver- crates/minimal/src/tests.rs:
box_verb_on_stopped_vm_box_refuses_with_start_hint, with a box on a stopped VM, a name on a running and a stopped VM, and an unknown name- scripts/session-e2e.sh: the NET-058 unknown-box and stopped-VM steps run
min box show <box> --networkwith their asserted text unchanged- docs/specs/18-spec-box-networking/18-spec-box-networking.md: NET-058 names
min box show <box> --network- docs/specs/28-spec-box-cli/28-spec-box-cli.md: the line 675 entry says the steps moved
test: cargo nextest run -p minimal box_verb_on_stopped_vm_box_refuses_with_start_hint
produces: none
consumes: none
proof: With a box on a stopped VM,
min box show <box> --networkexits 4 withbox '<box>' is on VM '<vm>', which is stopped. Start it with: min --vm <vm> session attach <box>, andjust e2epasses the NET-058 leg on the box verb.depends on:
- blocked by #3524
Proof
just e2eon a real microVM (CI (macOS), headf3e4b978, job https://github.com/gominimal/minimal/actions/runs/44464820569/job/135363150273): passed. The NET-058 leg, from its log:unknown:run: mnl box show e2e-lt-nobody --network -> exit 4anderror: No box named e2e-lt-nobody. Runmin box list --allto see the boxes of every project.policy-stopped:run: mnl box show e2e-lt-b --network -> exit 4anderror: box 'e2e-lt-b' is on VM 'lsvm', which is stopped. Start it with: min --vm lsvm session attach e2e-lt-bmin ls and the box commands tell the truth OKA box can be on a VM that is stopped. Address it by name, by id or as provider/host/name, and a box verb that resolves through resolve_box_on_local_hosts (min box show --network included) now exits 4 with
box '<box>' is on VM '<vm>', which is stopped. Start it with: min --vm <vm> session attach <box>. The unit test pins this. The NET-058 e2e steps now run onmin box show <box> --network. I did not runjust e2e, because this box has no KVM, so the e2e half of the proof is not shown yet.Notes from the agent: Out of scope: crates/minimal/src/cmd/session.rs gets one match arm. The new BoxAddressRefusal::OnStoppedVm variant made its exhaustive outcome match fail to compile. crates/minimal/src/cmd/mod.rs needs no change: box_on_stopped_vm and crate::attach::stopped_vm_boxes are already pub(crate), and address.rs calls them directly.
Scope of the change: only resolve_box_on_local_hosts reads the stopped VMs' records (min box show, and the other verbs that call it). The verbs that call resolve_box_on_hosts directly (box exec, wait, events, cp) and the typed resolvers in boxes.rs and session.rs keep the old answer, which is not found. A stopped VM's boxes join the resolution as
stoppedentries. So BCLI-002's rules apply: a running box on another VM wins. A retained box on a running VM plus a stopped VM's box of the same name gives the exit-2 ambiguity, which lists the host and state of each box.Refusal: exit 4, machine code
not_found. Its -o json hint is a fixed sentence, 'Start the VM that holds the box, then run the command again.' The message itself carries the start command. hint() returns &'static str, and a String return would mean editing main.rs.Deviation from the task: the unknown-box e2e step cannot keep its asserted text. The old assertions were
no running VM has a box named '<box>'.andmin --vm <vm> session policy <box>. The second one names the verb that T31 removes.min box showalready searches every VM, so a --vm hint…[truncated]Tests
cargo nextest run -p minimal box_verb_on_stopped_vm_box_refuses_with_start_hintVerify
min task run agent-verifyexited 100, so this PR is a draft.Out of scope
These files are outside the task's
layers:, so this PR is a draft:crates/minimal/src/cmd/session.rsResiduals
min box exec,attach,rm,stop,wait,events,cp,rename,restart,logsandprune --parent, and the type-nounmin session|task stop,rmandlogs. T61 (#3634) moves the stopped-VM read into the shared resolver for all of them. T31 waits on it.Closes #3589