Skip to content

feat(minimal): T60 — A box verb refuses a box on a stopped VM with NET-058's answer - #3628

Merged
mitodrummer merged 10 commits into
mainfrom
agent/3589-a-box-verb-refuses-a-box-on-a-stopped-vm-with-ne
Nov 19, 2026
Merged

mitodrummer merged 10 commits into
mainfrom
agent/3589-a-box-verb-refuses-a-box-on-a-stopped-vm-with-ne

Conversation

@minimal-foundry

@minimal-foundry minimal-foundry Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

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_hosts reads the stopped VMs' records and refuses a box on a stopped VM with box_on_stopped_vm
- crates/minimal/src/cmd/mod.rs: box_on_stopped_vm and 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> --network with 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> --network exits 4 with box '<box>' is on VM '<vm>', which is stopped. Start it with: min --vm <vm> session attach <box>, and just e2e passes the NET-058 leg on the box verb.
depends on:
- blocked by #3524

Proof

just e2e on a real microVM (CI (macOS), head f3e4b978, 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 4 and error: No box named e2e-lt-nobody. Run min box list --all to see the boxes of every project.
  • policy-stopped: run: mnl box show e2e-lt-b --network -> exit 4 and error: box 'e2e-lt-b' is on VM 'lsvm', which is stopped. Start it with: min --vm lsvm session attach e2e-lt-b
  • min ls and the box commands tell the truth OK

A 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 on min box show <box> --network. I did not run just 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 stopped entries. 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>'. and min --vm <vm> session policy <box>. The second one names the verb that T31 removes. min box show already searches every VM, so a --vm hint…[truncated]

Tests

line exit tail
cargo nextest run -p minimal box_verb_on_stopped_vm_box_refuses_with_start_hint 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-2... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args

Verify

min task run agent-verify exited 100, so this PR is a draft.

 {
                "parent_span_id": "d951ec0c4ee3de37",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "0a2117feb91600a0",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "0a2117feb91600a0",
                "queued_behind": "0",
                "span_id": "e42957c82727f506",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "d951ec0c4ee3de37",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "61e8acc194c83cad",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "61e8acc194c83cad",
                "queued_behind": "0",
                "span_id": "775042f9bd165e75",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "61e8acc194c83cad",
                "queued_behind": "0",
                "span_id": "2af0fc408a0e4bb5",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "2af0fc408a0e4bb5",
                "span_id": "99fdfa500c43f882",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "2af0fc408a0e4bb5",
                "queued_behind": "0",
                "span_id": "1a48f50fbf7dc873",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  82.683s] 1201 tests run: 1200 passed, 1 failed, 2 skipped
        FAIL [  12.819s] (1201/1201) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Out of scope

These files are outside the task's layers:, so this PR is a draft:

  • crates/minimal/src/cmd/session.rs

Residuals

  • These commands still answer a box on a stopped VM as not found: 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. T61 (#3634) moves the stopped-VM read into the shared resolver for all of them. T31 waits on it.

Closes #3589

…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.
@github-actions

github-actions Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Spec lint

docs/specs/18-spec-box-networking/18-spec-box-networking.md — 10 finding(s)

docs/specs/18-spec-box-networking/18-spec-box-networking.md:171: P004 NET-009 names test 'native_resolution_without_proxy_env', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:378: P004 NET-040 names test 'fresh_install_own_ip_ingress_publishes_loopback', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:388: P004 NET-041 names test 'installer_switch_binary_executable', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:435: P004 NET-048 names test 'linux_amd64_manifest_ships_vm_stack', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:440: P004 NET-049 names test 'fresh_linux_kvm_activate_local_minvmd', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:445: P004 NET-050 names test 'linux_arm64_manifest_ships_vm_stack', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:450: P004 NET-051 names test 'fresh_arm64_kvm_activate_local_minvmd', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:950: P004 NET-132 names test 'proxy_sees_each_vm_box_by_its_switch_address', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:976: P004 NET-134 names test 'deny_all_box_reaches_proxy_and_no_other_host_port', which was not found in the repository
docs/specs/18-spec-box-networking/18-spec-box-networking.md:1000: P004 NET-107 names test 'session_outbound_request', which was not found in the repository

docs/specs/28-spec-box-cli/28-spec-box-cli.md — 11 finding(s)

docs/specs/28-spec-box-cli/28-spec-box-cli.md:211: P004 BCLI-077 names test 'box_spec_renders_merged_vars_once_with_layer', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:226: P004 BCLI-078 names test 'expansion_refusals_exit3_on_spec_and_create_verbs', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:299: P004 BCLI-075 names test 'create_verbs_no_loadouts_empties_loadouts_layer', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:312: P004 BCLI-076 names test 'create_verbs_no_hooks_stores_no_hooks', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:328: P004 BCLI-026 names test 'box_verbs_exist_with_arch_flags', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:336: P004 BCLI-028 names test 'help_and_completions_from_one_model', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:423: P004 BCLI-034 names test 'exit_code_table', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:539: P004 BCLI-042 names test 'removed_session_verbs_fail_as_unknown_commands', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:543: P004 BCLI-043 names test 'setup_zed_unchanged', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:548: P004 BCLI-044 names test 'cli_reference_documents_box_grammar', which was not found in the repository
docs/specs/28-spec-box-cli/28-spec-box-cli.md:572: P004 BCLI-049 names test 'host_stop_stops_boxes_then_daemon_and_vm', which was not found in the repository

Advisory. None of this blocks the merge; the review decides.

Advisory, and never a merge gate. Linter: gominimal/foundry@3a8fa378, spec format: How Minimal Writes Specs.

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e6eb4004-cfc5-41de-a0f8-d2f1c91a519b

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@agent-137
agent-137 marked this pull request as ready for review November 19, 2026 04:51
@agent-137
agent-137 requested a review from a team as a code owner November 19, 2026 04:51
@minimal-foundry

minimal-foundry Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor Author

Reviewed: no findings; approval withheld, 11 threads unresolved at f8dea1801e8d.

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.

@minimal-arch minimal-arch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Comment thread scripts/session-e2e.sh
"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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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).

@agent-137

Copy link
Copy Markdown
Member

/revise

Head 202839dc. This round answers arch C1. Change nothing else.

C1: scope NET-058's unknown-box sub-bullet (docs/specs/18-spec-box-networking/18-spec-box-networking.md, the first sub-bullet under NET-058, about line 492). The design gives the box verbs --provider and --host, not --vm (architecture.md line 389). So split it into two unwanted-behaviour requirements, each with its own tier and verify line:

  • IF a min session verb or min net forward names a box that no VM holds THEN THE SYSTEM SHALL say that no VM holds a box of that name and name the --vm flag. Keep verify: cargo nextest run -p minimal unknown_box_names_vm_flag.
  • IF a min box verb names a box that no local host holds THEN THE SYSTEM SHALL say that no box has that name, name min box list --all, and exit 4. Use verify: cargo nextest run -p minimal box_verb_on_stopped_vm_box_refuses_with_start_hint, which already covers the unknown name.
    Put the command names and flags in backticks, as the spec does. Keep the stopped-VM sub-bullet as it is. It already binds both verb families.

C2 needs no code. The CI (macOS) e2e job runs just e2e on a microVM for this head, and its result goes in the Proof section.

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.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note, pushed as f3e4b978ed63.

line exit tail
cargo nextest run -p minimal box_verb_on_stopped_vm_box_refuses_with_start_hint 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "170198a922904f4b",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "1f09d0c3f6e190fd",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "1f09d0c3f6e190fd",
                "queued_behind": "0",
                "span_id": "29cfc5dd9f9b67c1",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "170198a922904f4b",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "d8cd3c8e7d1557f8",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "d8cd3c8e7d1557f8",
                "queued_behind": "0",
                "span_id": "58a1ff3ed2a14ef1",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "d8cd3c8e7d1557f8",
                "queued_behind": "0",
                "span_id": "f0016d2253316dd2",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "f0016d2253316dd2",
                "span_id": "3e3e6710d7e39578",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "f0016d2253316dd2",
                "queued_behind": "0",
                "span_id": "ecd9f03fade78454",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  85.126s] 1201 tests run: 1200 passed, 1 failed, 2 skipped
        FAIL [  12.898s] (1201/1201) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Outside the task's layers::

  • crates/minimal/src/cmd/session.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — docs/specs/18-spec-box-networking/18-spec-box-networking.md:488: 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.
  • 👍 valid — scripts/session-e2e.sh:32147: 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.

NET-058 now has two unknown-box requirements. The min session verbs and min net forward name the --vm flag. A min box verb says that no box has that name, names min box list --all, and exits 4. With a box on a stopped VM, min box show <box> --network exits 4 with the start command. The e2e result for the NET-058 leg comes from the CI (macOS) e2e job at this head.

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.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 19, 2026 05:23
@agent-137
agent-137 marked this pull request as ready for review November 19, 2026 05:23

@minimal-arch minimal-arch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Comment thread scripts/session-e2e.sh
"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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Comment thread scripts/session-e2e.sh
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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@agent-137

Copy link
Copy Markdown
Member

/arch-review

@minimal-arch minimal-arch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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(

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 44ca0e55f743: The other box verbs are tracked as residual T61 in #3634. Commit 44ca0e5 records that in the BCLI spec. This PR changes no code for them.


- `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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed in 44ca0e55f743: Commit 44ca0e5 adds the sentence to the line 675 bullet. It says the other min box verbs still answer a box on a stopped VM as not found until T61 (#3634), and that T31 waits on T61.

@agent-137

Copy link
Copy Markdown
Member

/revise

Head f3e4b978. This round answers arch C1 with text only. Change no code.

C1. In docs/specs/28-spec-box-cli/28-spec-box-cli.md, the line 675 bullet says min box show now refuses a box on a stopped VM. Add one sentence: the other min box verbs (exec, attach, rm, stop, wait, events, cp, rename, restart) still answer such a box as not found until T61 (#3634), and T31 waits on T61.

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.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a /revise note, pushed as 44ca0e55f743.

line exit tail
cargo nextest run -p minimal box_verb_on_stopped_vm_box_refuses_with_start_hint 0 ompiling document-features v0.2.12 Compiling compression-codecs v0.4.45 Compiling ml-kem v0.3.2 Compiling ratatui-core v0.1.2 Compiling ssh-key v0.7.0-rc.11 Compiling signal-hook-mio v0.2.5 Compiling generic-array v1.4.4 Compiling derive_more v2.1.1 Compiling russh-cryptovec

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "069791b777ff761c",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "59301fe842470a88",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "59301fe842470a88",
                "queued_behind": "0",
                "span_id": "048a8ef44e89694b",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "069791b777ff761c",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "8f9fbe8ee21f4452",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "8f9fbe8ee21f4452",
                "queued_behind": "0",
                "span_id": "9285d818d41772c8",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "8f9fbe8ee21f4452",
                "queued_behind": "0",
                "span_id": "218066bec8d921dd",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "218066bec8d921dd",
                "span_id": "aaee7f264d8fcda2",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "218066bec8d921dd",
                "queued_behind": "0",
                "span_id": "8de5d3583a1429cc",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  83.219s] 1201 tests run: 1200 passed, 1 failed, 2 skipped
        FAIL [  12.869s] (1201/1201) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Outside the task's layers::

  • crates/minimal/src/cmd/session.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — scripts/session-e2e.sh:32147: 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.
  • 👍 valid — scripts/session-e2e.sh:32245: 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.
  • 👍 valid — crates/minimal/src/cmd/boxes/address.rs:495: The other box verbs are tracked as residual T61 in T61 — Every box verb refuses a box on a stopped VM with NET-058's answer #3634. Commit 44ca0e5 records that in the BCLI spec. This PR changes no code for them.
  • 👍 valid — docs/specs/28-spec-box-cli/28-spec-box-cli.md:675: Commit 44ca0e5 adds the sentence to the line 675 bullet. It says the other min box verbs still answer a box on a stopped VM as not found until T61 (T61 — Every box verb refuses a box on a stopped VM with NET-058's answer #3634), and that T31 waits on T61.

With a box on a stopped VM, min box show <box> --network exits 4 with the NET-058 start hint (unchanged from round 1). The BCLI spec now also says that the other min box verbs still answer such a box as not found until T61 (#3634), and that T31 waits on T61. The NET-058 leg of just e2e is still not run.

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. just lint-prose did not run because vale is not installed on this box. just e2e needs a KVM host, and this box has none. So the C2 evidence is still owed by the KVM lane.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 19, 2026 06:25
@agent-137
agent-137 marked this pull request as ready for review November 19, 2026 06:27

@minimal-arch minimal-arch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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).

@agent-137

Copy link
Copy Markdown
Member

/revise

Head 44ca0e55. Text only, for arch C1. Change no code.

In docs/specs/28-spec-box-cli/28-spec-box-cli.md, the line 675 bullet lists the min box verbs that still miss a box on a stopped VM. Make it the full list: 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. Keep the link to T61 (#3634) and the note that T31 waits on it.

Reply on the C1 thread with this round's commit.

Add logs, prune --parent and the session|task stop, rm and logs
type-noun forms to the T61 list in the BCLI rollout bullet.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a /revise note, pushed as 61b9da899eeb.

line exit tail
cargo nextest run -p minimal box_verb_on_stopped_vm_box_refuses_with_start_hint 0 s v0.4.45 Compiling sha3 v0.12.0 Compiling document-features v0.2.12 Compiling ml-kem v0.3.2 Compiling ratatui-core v0.1.2 Compiling ssh-key v0.7.0-rc.11 Compiling signal-hook-mio v0.2.5 Compiling generic-array v1.4.4 Compiling derive_more v2.1.1 Compiling russh-cryptovec

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "e713967a26e373d2",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "8aa7bd31240ec126",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "8aa7bd31240ec126",
                "queued_behind": "0",
                "span_id": "b502ecd952174e32",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "e713967a26e373d2",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "fd68be84e096d7be",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "fd68be84e096d7be",
                "queued_behind": "0",
                "span_id": "2a1f990bd82a56ac",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "fd68be84e096d7be",
                "queued_behind": "0",
                "span_id": "e5d83c9eb972b09a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "e5d83c9eb972b09a",
                "span_id": "9dab8bd759de127e",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "e5d83c9eb972b09a",
                "queued_behind": "0",
                "span_id": "ea0cd85d7d01aaac",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  83.382s] 1201 tests run: 1200 passed, 1 failed, 2 skipped
        FAIL [  12.804s] (1201/1201) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Outside the task's layers::

  • crates/minimal/src/cmd/session.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — docs/specs/28-spec-box-cli/28-spec-box-cli.md: 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.

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.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 19, 2026 06:42
@agent-137
agent-137 marked this pull request as ready for review November 19, 2026 06:43

@minimal-arch minimal-arch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 norrietaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Comment thread crates/minimal/src/cmd/boxes/address.rs Outdated
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."

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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()));

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

@agent-137

Copy link
Copy Markdown
Member

/revise

Head 61b9da89. This round answers Norrie's four review threads. Change nothing else.

1. Medium: the OnStoppedVm hint names the command (crates/minimal/src/cmd/boxes/address.rs, about line 147). Under -o json the hint is "Start the VM that holds the box, then run the command again.", which names no command. Make BoxAddressRefusal::hint() return Cow<'static, str>. Return Cow::Owned(format!("Start it with: min --vm {vm} session attach {name}")) for OnStoppedVm, and Cow::Borrowed for the other variants. main.rs:544 already calls refused.hint().to_string(), so it needs no change. Add an OnStoppedVm row ("not_found", exit 4) to the machine-mode table in main.rs (about line 1379), so the JSON hint is pinned.

2. Low: pin the cross-host ambiguity (address.rs, about line 526). Add a case to box_verb_on_stopped_vm_box_refuses_with_start_hint: an exited box web on the running VM, and a box web in a stopped VM's records. Assert exit 2, and that the ambiguity lists both hosts with their states.

3. Low: the stopped-VM sub-bullet's verify line (docs/specs/18-spec-box-networking/18-spec-box-networking.md, about line 502). List both tests there: box_on_stopped_vm_names_start_command and box_verb_on_stopped_vm_box_refuses_with_start_hint.

4. Low: name min box spec <box>. It resolves through resolve_box_on_local_hosts (box_spec.rs:1024), so it now refuses a box on a stopped VM with exit 4 too. In docs/specs/28-spec-box-cli/28-spec-box-cli.md line 675, name min box spec beside min box show, and keep it out of the list of verbs that still answer not found. Add one min box spec case to the test.

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.
@minimal-foundry

Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on a /revise note, pushed as f8dea1801e8d.

line exit tail
cargo nextest run -p minimal box_verb_on_stopped_vm_box_refuses_with_start_hint 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot)

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "e9cb8f94d33db40e",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "7e0f0bced2fc8cf0",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "7e0f0bced2fc8cf0",
                "queued_behind": "0",
                "span_id": "1099cf30a78cdc67",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "e9cb8f94d33db40e",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "fb9fcc76c2b1d59b",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "fb9fcc76c2b1d59b",
                "queued_behind": "0",
                "span_id": "9e0184a0384124cd",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "fb9fcc76c2b1d59b",
                "queued_behind": "0",
                "span_id": "29dc018e9dfb1a20",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "29dc018e9dfb1a20",
                "span_id": "e48bdafdca9a398a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "29dc018e9dfb1a20",
                "queued_behind": "0",
                "span_id": "791d530da6595960",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [ 103.590s] 1203 tests run: 1202 passed, 1 failed, 2 skipped
        FAIL [  13.468s] (1203/1203) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Outside the task's layers::

  • crates/minimal/src/cmd/session.rs
  • crates/minimal/src/main.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/cmd/boxes/address.rs: 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.
  • 👍 valid — crates/minimal/src/cmd/boxes/address.rs:531: 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.
  • 👍 valid — docs/specs/18-spec-box-networking/18-spec-box-networking.md: 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.
  • 👍 valid — docs/specs/28-spec-box-cli/28-spec-box-cli.md: 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.

With a box on a stopped VM, min box show <box> --network and min box spec <box> exit 4 with box '<box>' is on VM '<vm>', which is stopped. Start it with: min --vm <vm> session attach <box>. Under -o json the error object's hint is Start it with: min --vm <vm> session attach <box>. The just e2e NET-058 leg was not run in this round.

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 refusal.hint().into_owned() because hint() returns a Cow. That test is not a test: line of the task, and it passed. just e2e needs a KVM host and did not run in this session. clippy -p minimal --all-targets is clean. just clippy-strict did not run.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 19, 2026 07:21
@agent-137
agent-137 marked this pull request as ready for review November 19, 2026 07:22

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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).

@agent-137

Copy link
Copy Markdown
Member

/arch-review

@minimal-arch minimal-arch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

@mitodrummer mitodrummer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit 26540dc Nov 19, 2026
40 checks passed
@mitodrummer
mitodrummer deleted the agent/3589-a-box-verb-refuses-a-box-on-a-stopped-vm-with-ne branch November 19, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T60 — A box verb refuses a box on a stopped VM with NET-058's answer

3 participants