Repository navigation
T27 — Name and list the local providers and hosts - #2984
Conversation
Name the local providers local, local-minvmd and local-box, and name each host by its daemon instance (local0..N, local-minvmd0..N). --provider local-minimald reads as local and prints a hint on stderr after the command ends.
…ist-the-local-providers-and-hosts
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Clobber: none seen. The old residual comment in |
…ist-the-local-providers-and-hosts
There was a problem hiding this comment.
arch-review: CONDITIONS · 4 conditions · the full ruling
The verbs are in the right place, and they read each host over its own socket. But min host list leaves out named VMs. Line 53 of the architecture makes each VM a Box Host, so local_hosts must list them (C1), and spec 28 must name them (C2). A failed -o json command under --provider local-minimald writes a second stderr line, but line 383 allows one error object only (C3). every_daemon_connection_is_classified fails at this head, so add the two new connect sites to its inventory (C4).
Ruled at 777f722 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
Each probe waits up to PROBE_TIMEOUT, so a sequential loop over N unresponsive hosts held the listing for N timeouts.
There was a problem hiding this comment.
arch-review: CONDITIONS · 3 conditions · the full ruling
The new commands and the alias conform, but named VMs are missing. local_hosts() lists a named VM such as local-minvmd0/alpha as no host. Architecture lines 53, 55 and 540 make each VM a Box Host with its own state directory and socket. C1 lists each named VM as a local-minvmd host named <vm>. C2 makes min host show refuse a name that two hosts carry (line 389). C3 records probe_host in every_daemon_connection_is_classified, which fails
8000
at this head.
Ruled at 7bdff42 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Review threads the coder judged:
Notes from the agent: I ran the five test lines in one nextest invocation with the five filters: 5 run, 5 passed. cargo clippy -p minimal --all-targets and cargo fmt --check are clean. |
…ist-the-local-providers-and-hosts # Conflicts: # crates/minimal/src/cli.rs
Named VMs at providers/local-minvmd<N>/<vm> are hosts of their own, named <vm>.local-minvmd<N> as min box list names them. The host probe and the host show test connection join the daemon connection inventory. A failed run in a machine output mode carries the local-minimald alias hint in the error object's hint field, with no separate line. A host that does not answer no longer reads as not running.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The head lists each named VM as its own host, as line 53 of architecture.md says ("each VM a Box Host"). The host name is <vm>.local-minvmd<N>, and min box list gives the same host the same name. In machine mode, the local-minimald alias hint is now the hint field of the one min/v1/error object, as line 383 says. The new probe connections are in the connection inventory, and an unanswered host no longer reads as stopped. Update the PR body: its note that named VMs are not separate hosts is now wrong.
Ruled at 0ca1735 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
A merge of main before round 2, not counted against the cap (1 of 3), pushed as Resolved conflicts in:
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
Notes from the agent: The merge conflict in crates/minimal/src/cli.rs is resolved: this branch's host and provider arguments are kept, and main's BoxListArgs comment is taken. Outside the layers: crates/minimal/src/main.rs. The error path lives there, and the machine-mode hint (thread C3) can only be put in the error object's hint field there. A failed run now hands the hint to answer_failure. In machine mode it goes into the hint field, joined after any existing hint with '. '. In text mode it prints after the error line. The two review rounds disagree on the name for a named VM. I used |
There was a problem hiding this comment.
Reviewed at 0ca17354. Its base is current main (T1 + T5), so CI ran on the merged tree, and the three-way merge with T2 is clean.
- Merge:
command_verbgains exhaustiveHostandProviderarms, with no duplicate span fields. - Names: providers are
local,local-minvmdandlocal-box. Hosts arelocal<N>,local-minvmd0and<vm>.local-minvmd0, consistent withmin box list. - Commands:
host list|showshows state (running, stopped, not responding), the socket and the daemon version, underPROBE_TIMEOUT.local-minimaldis a hidden alias whose hint prints after the command. - Tests: the five named tests aren't vacuous.
- Residuals: #2980 (the JSON form) and #2922 (the stale
local-minimalddocs). - Nits: the HOST column is 16 wide and misaligns on long VM names.
eprintln!on the success path (mod.rs:104) can panic on EPIPE.
|
/revise Fix the open thread PRRT_kwDOPdfcxM6zdI3t, which is not fixed at head 0ca1735.
Change nothing else. |
…ist-the-local-providers-and-hosts
Write the local-minimald alias hint with writeln! and ignore the error, so a closed stderr does not turn a good run into a panic. Print the daemon version in min host show without the process name. Pass the new alias_hint argument in the min box rm refusal tests that the merge of main brought in, so the binary's tests compile again.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This head conforms. The compare from 0ca17354 is a clean merge of main and one small fix commit. The alias hint now survives a closed stderr, with the same text and placement. min host show prints the daemon version without the minimald prefix. Design principle 4 (line 334) says text output is not stable, so BCLI-048 still conforms. The four covered ids keep their status from the PASS on 0ca17354.
Ruled at c5649d5 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
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:
Notes from the agent: I changed crates/minimal/src/main.rs outside this round's two items. The runner merged origin/main (commit 5822dde), which brought in the tests rm_running_box_refuses_naming_force_with_exit_2 from #2961. Those tests call answer_failure with four arguments, but this branch adds a fifth argument, alias_hint. Without a fix, the min binary's test target did not compile and no test: line could run. I passed None in the two calls, and that test now passes. main.rs is already in this pull request's diff, because the alias_hint parameter is there. |
|
Round 3 of 10 on the runtime's review findings, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
Notes from the agent: Revise round 3. LocalHost has a new field, unread_vms, that holds the read error of a VM host directory. A new function, unread_vm_notes, prints one line for each such host: 'The named VMs of are not listed, because cannot be read: .' min host list prints these lines after its table. The min host show refusal for an unknown name adds them. The on-disk half of the new test uses chmod 000 and returns early when the process can still read the directory, for example as root. Here it ran as uid 1000 and exercised that path. The host in an unreadable directory shows 'not responding', because its socket cannot be reached. |
There was a problem hiding this comment.
Re-reviewed at 4afd552. Round 3 (4afd552) answers the review finding on 2bab993: an unreadable local-minvmd directory no longer hides its named VMs silently. min host list prints one line after its table, and the min host show refusal appends it: "The named VMs of are not listed, because
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @agent-137 closed the last one. The review of 4afd5527327c withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
…ist-the-local-providers-and-hosts # Conflicts: # crates/minimal/src/tests.rs
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This head adds one clean merge of main to the head that got a PASS, 4afd5527. The merge adds no line of its own. The branch change in each of the six PR files is the same as before. The host and provider names still follow Glossary line 53 of architecture.md. The PASS carries to this head. Residuals #2980 and #2922 stay open.
Ruled at 3397d34 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
A merge of main before round 4, not counted against the cap (3 of 3), pushed as Resolved conflicts in:
Verify Outside the task's
Converted to a draft: something above needs a person before review.
Notes from the agent: Conflict round. The only conflict was in crates/minimal/src/tests.rs. Both sides added new tests at the same place: this branch added the host and provider tests, and main added ls_native_routing_cause_on_proxy_row. The resolution keeps both. The merge commit is 3397d34. The other files in the merge came from main without conflict. cargo clippy -p minimal --all-targets is clean, and ls_native_routing_cause_on_proxy_row from main also passes. |
…ist-the-local-providers-and-hosts # Conflicts: # crates/minimal/src/tests.rs
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change still conforms to the design. The new head only merges main, which brings in #2987. The PR's own lines do not change. Host names still agree between min host and box address resolution, as Glossary line 53 requires. The PASS on 3397d34f stands.
Ruled at 008f8da against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
Round 4 of 10 on a conflict with the base branch, pushed as Resolved conflicts in:
Verify Outside the task's
Converted to a draft: something above needs a person before review.
Notes from the agent: Conflict round. The only conflict was at the end of crates/minimal/src/tests.rs: both sides appended tests after the same function. The resolution keeps both sides: this branch's host and provider tests, and main's box address tests. It changes no test body. The merge commit is 008f8da. cargo clippy -p minimal --all-targets is clean. The directive listed no review threads. |
T27 — Name and list the local providers and hosts
slice: S7
kind: task
covers: BCLI-046, BCLI-052, BCLI-047, BCLI-048
size: L
est: 300 code, 300 tests
executor: agent
difficulty: routine
model: standard
diagnostics: with
--provider local-minimald, any command prints "local-minimald is now called local." on stderr after it ends, pinned by local_minimald_alias_reads_as_localobservability: the command's existing tracing span records the verb, the box id it resolved and the outcome
layers:
- client:
- crates/minimal/src/cmd/hosts.rs (new):
min host list|showandmin provider list [--all]over the local hosts- crates/minimal/src/cmd/mod.rs: dispatches the verb
- crates/minimal/src/cli.rs: the verb's arguments and help in the one command model
- crates/minimal/src/cmd/list.rs: names each host by its daemon instance
- crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests
test: cargo nextest run -p minimal local_provider_and_host_names
test: cargo nextest run -p minimal local_minimald_alias_reads_as_local
test: cargo nextest run -p minimal host_list_name_and_state
test: cargo nextest run -p minimal host_show_socket_and_version
test: cargo nextest run -p minimal provider_list_all_shows_local_providers
produces:
- crates/minimal/src/cmd/hosts.rs
consumes:
- crates/minimal/src/cmd/output.rs
proof:
min provider list --allshows the local providers, andmin host list|showshows each host's state, socket and daemon version.depends on:
- blocked by #2891
Proof
min provider list --alllists each local provider on this machine with its hosts (local, local-minvmd, and local-box inside a box).min host listshows each local host (local0, local-minvmd0, ...) with its provider and its state (running, stopped or not responding).min host show <host>adds the socket path and the minimald version.Notes from the agent: crates/minimal/src/cmd/list.rs is not changed.
min lsprints no host name today. Its VM column carries the VM name (default, alpha), and NET-057 tests pin it. The host column per box is BCLI-051, which this task does not cover. The host naming lives in cmd/hosts.rs (host_for_dir_name), so BCLI-051 can use it. Host names are a display mapping only: the state directories stayproviders/local-minimald<N>.local-boxhas no hosts listed, because no state directory names its parent daemon. A minvmd host is the daemon instance, so named VMs nested under local-minvmd0 are not separate hosts. The commands write text only: a-o jsonform needs main.rs (machine-mode errors), which is outside the layers. The objects already implementoutput::Renderedas min/v1/host and min/v1/provider.--provider local-minimaldis now a hidden value of the flag. One out-of-scope string still sayslocal-minimald: the named-VM refusal in crates/minimal-client/src/lib.rs (resolve_host_dir_named). docs/reference/cli-min.md does not documentmin hostormin provideryet (BCLI-044, not covered). The pinned hint text "local-minimald is now called local." passes the message rule as written.just ciandjust clippy-strictdid not run.cargo clippy -p minimal --all-targetsis clean.Tests
cargo nextest run -p minimal local_provider_and_host_namescargo nextest run -p minimal local_minimald_alias_reads_as_localcargo nextest run -p minimal host_list_name_and_statecargo nextest run -p minimal host_show_socket_and_versioncargo nextest run -p minimal provider_list_all_shows_local_providersVerify
min task run agent-verifyexited 100 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.Base
The base branch moved while the coder worked; it was merged in before the tests ran.
Closes #2900
Out-of-layer edit accepted by the maintainer (2026-11-04):
crates/minimal/src/main.rs(failure_exit_code, where errors become exit codes).Corrections (maintainer, 2026-11-04)
The notes above predate the last rounds. At
0ca17354:crates/minimal/src/cmd/list.rsis changed: thehost_name_fordoc (~571–576).<vm>.local-minvmd0throughssh_host_alias(named_vms,hosts.rs~184–218).min hostandmin box listagree on the name. This replaces the earlier "flip when T27 — Name and list the local providers and hosts #2900 numbers the VM instances".main.rsis edited, as an accepted out-of-layer change.Residuals
-o jsonformin host list|showandmin provider list, throughoutput::write_object(ObjectType::Host/Providerare wired; the verbs hard-codeOutputMode::Text).docs/reference/cli-min.md~39 andREADME.md~36 still namelocal-minimald, and the refusal inminimal-client/src/lib.rs~1404 says "the native local-minimald backend".Undrafted by the operator (agent-137) at 2bab993: the out-of-layer crates/minimal/src/main.rs edits were accepted by the maintainer on this PR (ledger 2026-11-04T05:39Z).