Repository navigation
feat: T61 — Every box verb refuses a box on a stopped VM with NET-058's answer - #3647
Conversation
resolve_box_on_hosts now reads a stopped VM's persisted box records, so min box exec, attach --exec, rm, stop, wait, events, cp, rename, restart, logs and prune --parent refuse such a box with the start command and exit 4 (BCLI-002, NET-058). The VM comes from the host's socket path, so no caller changes. resolve_box_of_type uses the same resolver, so min session|task stop, rm and logs refuse it too. The duplicate typed resolver in boxes.rs now calls resolve_box_of_type.
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
Spec lint
Advisory. None of this blocks the merge; the review decides. Advisory, and never a merge gate. Linter: |
|
Round 1 of 10 on a failed check suite: the coder changed nothing. This round changes nothing. The failed |
|
Undrafted. agent-verify's one failure is |
|
/arch-review |
|
Approved: no findings at Nothing to do. 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: PASS · the full ruling
This change conforms to the design. Every min box verb and every type-noun stop, rm and logs now resolves through one resolver, resolve_box_over. A box on a stopped VM gets NET-058's refusal with exit 4, as §Addressing (line 389) and the exit-code table (line 365) require. The type nouns stay aliases of the box verbs filtered to their type, as design principle 8 (line 338) requires. The change also removes two copies of the typed resolver. CI must still show that the otel_cli trace failure in agent-verify is not from this change.
Ruled at 9892437 against gominimal/arch@8b824707cde6 by claude-opus-5-5.
T61 — Every 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: 160 code, 320 tests
executor: agent
difficulty: routine
model: standard
diagnostics: none new
observability: none new
layers:
- client:
- crates/minimal/src/cmd/boxes/address.rs:
resolve_box_on_hostsreads the stopped VMs' records and refuses a box on a stopped VM withOnStoppedVm- crates/minimal/src/cmd/session.rs:
resolve_box_of_typereads the stopped VMs' records through the shared resolver- crates/minimal/src/tests.rs:
every_box_verb_refuses_box_on_stopped_vm, withmin box exec,attach,rm,stop,wait,events,cp,rename,restart,logs,prune --parentandmin session stop|rm|logsagainst a box on a stopped VM, each exit 4 with the start command- docs/specs/28-spec-box-cli/28-spec-box-cli.md: the line 675 bullet says every
min boxverb gives NET-058's refusaltest: cargo nextest run -p minimal every_box_verb_refuses_box_on_stopped_vm
produces: none
consumes: none
proof: With a box on a stopped VM,
min box exec <box> -- true,min box rm <box>andmin box restart <box>each exit 4 withbox '<box>' is on VM '<vm>', which is stopped. Start it with: min --vm <vm> session attach <box>.depends on:
- blocked by #3589
Proof
With a box on a stopped VM,
min box exec <box> -- true,min box rm <box>andmin box restart <box>each exit 4 withbox '<box>' is on VM '<vm>', which is stopped. Start it with: min --vm <vm> session attach <box>. The same refusal comes frommin box attach --exec,stop,wait,events,cp,rename,logsandprune --parent, and frommin session stop|rm|logs.Notes from the agent: Out of layers: crates/minimal/src/cmd/boxes.rs.
min session logsandmin task logsresolved through a private copy of resolve_box_of_type there (resolve_typed_box_on_hosts). I removed that copy and made box_logs_on_hosts call session::resolve_box_of_type, because without itmin session logsdoes not give the refusal the test requires. resolve_box_on_hosts keeps its signature. It gets the VM name from the host's socket path (providers/local-minvmd0 for the default VM, providers/local-minvmd0/ for a named VM), so no caller changed. resolve_box_on_local_hosts now delegates to it. A stopped VM's records carry no box type, so the typed resolver keeps them for every type noun. The test calls the on-hosts function of each verb.min box renameandmin box prune --parentcall ensure_daemon first, which cannot start minvmd in the test, so the test calls resolve_box_on_hosts with their verb names, which is the call those commands make. Plainmin box attach <box>(without --exec) uses the session attach path, which T60 and earlier work already cover. The test coversattach --exec. The spec bullet moved from line 675 in the task text but is the same bullet. I removedT31 waits on T61from it, because T61 is now done.just lint-prosedid not run: vale is not installed on this box. cargo clippy -p minimal --all-targets is clean, and 25 related resolver tests (stopped_vm, typed, box_logs, ambiguous) pass.Tests
cargo nextest run -p minimal every_box_verb_refuses_box_on_stopped_vmVerify
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/boxes.rsCloses #3634