Repository navigation
T4 — Resolve a box address across the local hosts - #2987
Conversation
`min box show` now takes an id, a unique start of an id, a name or provider/host/name, and looks the box up on every local host. A name that boxes on more than one host hold is refused with exit 2 and lists each box with its host and state. An unqualified address that meets a host that does not answer fails with exit 7 and names each such host. An address that names no box fails with exit 4 and names the address.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. Clobber: none seen. |
The box address exit-code test sat between the doc comment and the test it describes. Move it above the comment.
There was a problem hiding this comment.
arch-review: CONDITIONS · 3 conditions · the full ruling
The resolver follows Addressing line 389 and the exit codes, and it is in the right crate. The head fails every_daemon_connection_is_classified, because the new address.rs connections are not in its inventory. Also, connect_box_host gives an ungated client for a non-selected host, but line 553 says such a connection fails closed. C1 fixes both. A connect failure on the selected host exits 1, but line 368 says an unreachable host exits 7. C2 fixes that. C3 names the verbs that still do their own lookup, each with an issue.
Ruled at a0ed44a against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
There was a problem hiding this comment.
arch-review: CONDITIONS · 4 conditions · the full ruling
The resolver is in the correct place. It follows Addressing line 389 for ambiguous, retained and unreachable names. Four gaps remain. The new connection sites in address.rs are not in every_daemon_connection_is_classified, so the test fails at this head (C2). Also, one function holds a gated connect and an ungated probe (C1, line 553). A failed connect to the selected host exits 1, but line 368 gives exit 7 and a host name (C3). The work left for min box audit and the session verbs has no issue (C4).
Outside the diff
crates/minimal/src/tests.rs:283: C2 · Add thecmd/boxes/address.rssites (connect_box_host = gated,probe_other_host = ungated,read_host_boxes = ungated) here, each with a comment that says why. The Verify run shows that this test fails at this head.
Ruled at faf9bf7 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:
Any Notes from the agent: Revise round 1. The only change moves the test box_address_refusals_exit_with_their_codes above the #1790 doc comment in crates/minimal/src/main.rs. The doc comment is again on host_unreachable_exits_7_in_both_output_modes. Both tests pass after the move. |
|
/revise Arch's conditions on
|
Split the box address connect sites as `min box list` splits them. `connect_box_host` reaches the selected host and checks its build. `probe_other_host` probes the other hosts ungated. The three sites are in the connect-site inventory. A selected host that does not connect now gives exit 7 and is named in the refusal. A version skew there is still the error that ends the command.
…box-address-across-the-local-hosts
There was a problem hiding this comment.
arch-review: CONDITIONS · 2 conditions · the full ruling
The min box show path conforms, and the two branch commits answer the last ruling. The merge of #2961 brings min box stop and min box rm. They still resolve on the selected host only, and an unknown address exits 1. The task layer gives lifecycle.rs to this task, and Addressing line 389 and exit code 4 (line 365) govern every min box verb. Also, this PR gates find_listed_box and not_found_remedy to #[cfg(test)], but non-test code in lifecycle.rs calls them, so the non-test build cannot resolve them. Route stop and rm through the address module (C1), and update the connect inventory and tests (C2).
Ruled at cc3f652 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 10 unresolved threads — minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:530, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:1, minimal-foundry[bot] crates/minimal/src/cmd/boxes/address.rs:536, minimal-foundry[bot] crates/minimal/src/cmd/boxes/address.rs:418, …. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
The merge of main brought in min box stop and min box rm, which call find_listed_box and not_found_remedy. This branch gated both behind cfg(test), so the lib did not compile.
There was a problem hiding this comment.
arch-review: CONDITIONS · 3 conditions · the full ruling
min box show now resolves a box address over every local host, and it conforms to Addressing line 389. min box stop and min box rm still read only the selected host through find_listed_box. A name that two hosts hold resolves to the box on the selected host and does not give the exit-2 refusal. The task layer names lifecycle.rs for this change. The last commit ungates the single-host lookup and does not make the change. Make the changes in C1 and C2, and update the PR body as C3 says.
Ruled at e2fd69e against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
Round 2 of 10 on a /revise note, pushed as
Verify Review threads the coder judged:
Notes from the agent: C1: connect_box_host now reaches only the selected host, with Client::connect and ensure_version_match. It returns a typed error that keeps a connect failure apart from a version skew. probe_other_host holds the ungated probe for the other hosts. box_host_client picks one of the two for |
|
/revise Arch's conditions on
|
…box-address-across-the-local-hosts
Stop and rm now resolve their argument through the box address module, so a name that two hosts hold exits 2 with the candidates, and a host that does not answer exits 7. BoxLookup is gone, and the single-host lookup is test-only again. A qualified address on a host that does not answer no longer suggests naming the box as provider/host/name.
There was a problem hiding this comment.
arch-review: CONDITIONS · 2 conditions · the full ruling
The resolver conforms, and stop and rm now use it. Two paths that the compare opens do not conform. First, stop and rm send StopBox and ReapBox to a host that is not selected over probe_other_host, which does no version check. Line 553 says a connection outside the skew window fails closed. C1 gates that connection. Second, the cleanup after stop and rm goes to the selected VM's helper, not to the helper of the VM that holds the box. §7.1 lines 244 and 255 put that work on the box's own node. C2 takes the control socket from the resolved host.
Ruled at c998bc1 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
Round 3 of 10 on a /revise note, pushed as
Verify Review threads the coder judged:
Notes from the agent: C1: cmd_box_stop and cmd_box_rm resolve through the address module. They call resolve_box_on_hosts, a new split of resolve_box_on_local_hosts that takes the host list, so the tests can drive two in-process daemons. Then they use box_host_client(&host). stop_listed_box and rm_listed_box take the resolved id. rm_listed_box still reads the listing for the running check and the name. BoxLookup is removed, with its test lookup_refusal_names_host_and_verb. The list.rs tests still pin find_listed_box. A box removed between the resolve and the RPC now gives BoxAddressRefusal::NotFound (exit 4) in place of the old single-host text. C2: #[cfg(test)] and the original doc comment are back on find_listed_box and not_found_remedy. C3 is a change to the PR body, and this session cannot edit it. The runner or a person must delete the note that says there is no stop or rm verb. They must also add |
min box stop and min box rm now check the build of a daemon on a host that is not selected before they change a box on it. The egress-rule retire, the row withdrawal and the name release go to the VM that kept the box, not the selected VM.
The connect-site inventory did not list the test helper that reads a box state from an in-process daemon, so every_daemon_connection_is_classified failed in CI.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 13 unresolved threads — minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:564, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:1, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:564, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs, …. 1 finding, 1 inline.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The compare closes the open points from the ruling on c998bc18. min box stop and min box rm now check the daemon build on every host before they change a box, as Version skew line 553 requires. The cleanup goes to the host that keeps the box (Glossary line 53). The resolver is unchanged and conforms to Addressing line 389 and exit codes 2, 4 and 7. No test pins a skewed daemon on a host that is not selected. That is a gap in the proof, not a deviation.
Ruled at a24e8fb against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
Round 4 of 10 on a failed check suite, pushed as
Verify Review threads the coder judged:
min box show, min box stop and min box rm find a box by id, name or provider/host/name on every local host. A name that boxes on more than one host hold is refused with exit 2 and a list of each box with its host and state. stop and rm now check the build of the daemon on the host that keeps the box, and the cleanup after them goes to that host's VM. Notes from the agent: The CI failure was tests::every_daemon_connection_is_classified: the test helper address_state in tests.rs opens a daemon connection that the inventory did not list. It is now listed as ungated, with a comment. Before the last commit, one run of |
…box-address-across-the-local-hosts # Conflicts: # crates/minimal/src/tests.rs
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The compare from a24e8fbe is one merge of main, and the PR's production files are unchanged. The merge moves the #2991 end-to-end test onto resolve_box_on_hosts, stop_box_on_hosts and rm_box_on_hosts. The test keeps its assertions and now runs the lookup that the commands run. BCLI-002 and BCLI-064 conform to Addressing line 389 and exit codes 2, 4 and 7, as on the earlier head.
Ruled at a598917 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
A merge of main before round 5, not counted against the cap (1 of 3), pushed as Resolved conflicts in:
Verify Review threads the coder judged:
At this branch, Notes from the agent: Conflict round. crates/minimal/src/tests.rs conflicted because both sides appended tests at the end of the file. I kept both sides. The end-to-end test from main (box_first_slice_list_show_stop_rm_end_to_end) called BoxLookup, find_listed_box, not_found_remedy and the old stop_listed_box/rm_listed_box signatures. This branch removed or changed those. I rewrote its show, stop and rm steps to call resolve_box_on_hosts + box_host_client, stop_box_on_hosts and rm_box_on_hosts over local_hosts(&global). That is the path the commands use. The test passes. The merge commit carries this change. I ran all five test: lines in one nextest invocation, together with the end-to-end test. All 8 matched tests passed. I did not run just ci or clippy-strict. cargo clippy -p minimal --all-targets is clean, and rustfmt is clean on tests.rs. |
|
/revise Three fixes at head a598917. The base merge already moved T3's test onto stop_box_on_hosts/rm_box_on_hosts, so leave tests.rs alone unless a fix below needs it.
Change nothing else. |
…box-address-across-the-local-hosts
The doc comment on find_listed_box now says what it does, not its history.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This head conforms to the design. The compare has a clean merge of main and one branch commit. That commit changes only the plural form of the unreachable-host refusal text, and it pins the text in a test. The exit code stays 7, as Exit codes line 368 requires. The PASS on a5989176 stands for address resolution, gating and the other exit codes.
Ruled at 49fc0bc against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 14 unresolved threads — minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:561, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:1, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs:561, minimal-arch[bot] crates/minimal/src/cmd/boxes/address.rs, …. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
|
Round 5 of 10 on a /revise note, pushed as
Verify
Notes from the agent: Revise round 5. Fix 1 (PR body) is not a code change. I cannot edit the PR body, so the corrected text for the "Notes from the agent" and Verify sections is here. Notes from the agent (replaces the earlier text): lifecycle.rs is changed. Verify (replaces the earlier section): the five test lines pass at this head (results in tests). The old every_daemon_connection_is_classified FAIL does not apply to this head. I did not run it again this round. Fix 2: the doc comment on find_listed_box in show.rs now says only what the function does. No new threads were listed. I do not change any earlier verdict. |
agent-137
left a comment
There was a problem hiding this comment.
Reviewed at 49fc0bc against #2895 (BCLI-002, BCLI-064). show, stop and rm resolve a box address across the local hosts: id, unique id start, name, or provider/host/name, refusing with 2 (ambiguous), 4 (not found) and 7 (unreachable, 7 over 4). BoxLookup is gone and find_listed_box/not_found_remedy are test-only (arch C1, C2). Mutating verbs use the version-gated client on every host, and their cleanup targets the resolved host's VM. Round 5 fixed the plural 'when the hosts answer' text and the history comment at show.rs:47. The base merge moved T3's test onto stop_box_on_hosts/rm_box_on_hosts. The body now matches this head and names residual #2988 (arch C3).
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 49fc0bce9b99 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.
…box-address-across-the-local-hosts # Conflicts: # crates/minimal/src/tests.rs
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This head merges main into the branch, and the merge is clean. The PR's files and its added lines are the same as at 49fc0bce, which got a PASS. main removes two hostname-routing warning helpers, and no PR file calls them. The PASS stands for this head. Residual #2988 still owns the session and task verbs.
Ruled at 9e4a0aa against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
A merge of main before round 6, not counted against the cap (2 of 3), pushed as Resolved conflicts in:
Verify Any Notes from the agent: Conflict round. The one conflict was in crates/minimal/src/tests.rs. The branch side added the box address tests and main added the routing-cause tests (ls_native_routing_cause_on_proxy_row, activate_prints_routing_cause_once) at the same place. I kept both blocks unchanged and committed the merge. The other files in the merge commit come from main. cargo clippy -p minimal --all-targets passed with no warnings. |
T4 — Resolve a box address across the local hosts
slice: S1
." and exits 4, pinned by ambiguous_name_across_hosts_exit2_lists_candidates and unknown_box_address_exit4_names_addresskind: task
covers: BCLI-002, BCLI-064
size: L
est: 300 code, 300 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: when a name matches boxes on two hosts, the command prints " matches boxes on more than one host:" with one line per box naming its host and state, then "Name one as provider/host/name."; when nothing matches, it prints "No box named
observability: the command's existing tracing span records the verb, the box id it resolved and the outcome
layers:
- client:
- crates/minimal/src/cmd/boxes/address.rs (new): resolves an id, a name or provider/host/name over every local host, with the ambiguity, unreachable-host and unknown-box refusals
- crates/minimal/src/cmd/boxes.rs: declares the address module
- crates/minimal/src/cmd/boxes/show.rs: resolves its argument through the address module
- crates/minimal/src/cmd/boxes/lifecycle.rs: stop and remove resolve through the address module
- crates/minimal/src/main.rs:
failure_exit_codemaps this verb's refusals to their exit codes- crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests
test: cargo nextest run -p minimal box_address_accepts_id_name_and_qualified
test: cargo nextest run -p minimal ambiguous_name_across_hosts_exit2_lists_candidates
test: cargo nextest run -p minimal retained_name_across_hosts_exit2_lists_host_and_state
test: cargo nextest run -p minimal unqualified_name_with_unreachable_host_exit7_names_host
test: cargo nextest run -p minimal unknown_box_address_exit4_names_address
produces:
- crates/minimal/src/cmd/boxes/address.rs
consumes: none
proof: Any
min boxverb finds a box by id, name or provider/host/name, and says which hosts hold a name it cannot pick between.depends on:
- blocked by #2889
Proof
." and exits 4.min box showfinds a box on any local host by its id, a unique start of its id, its name, or provider/host/name. When a name matches boxes on more than one host, the command lists each box with its provider/host/name address, state and id, then prints "Name one as provider/host/name." and exits 2. When a host does not answer an unqualified lookup, the command names each such host and exits 7. When no box matches, the command prints "No box namedmin box show,min box stopandmin box rmtake a box address and resolve it this way.Notes (updated by the operator at 49fc0bc):
." followed by "Runmin box showresolves throughresolve_box_on_local_hosts, andmin box stopandmin box rmthroughstop_box_on_hostsandrm_box_on_hostsin lifecycle.rs.BoxLookupis removed, andfind_listed_boxandnot_found_remedyare#[cfg(test)]helpers that the tests in list.rs call. The mutating verbs use a version-gated client on every host, and their cleanup (the host_ip retire, the row withdrawal and the name release) goes to the resolved host's VM. The not-found message is "No box namedmin box list --allto see the boxes on every host." The exit-7 text names each unreachable host and ends "Run the command again when the host answers" ("when the hosts answer" when there are several), "or name the box as provider/host/name." A qualified address reads only its own host. A full id resolves when a host that answered lists it, even if another host is unreachable. A host that is not selected and whose daemon is not running counts as answering with no boxes, so a box on a stopped VM gets exit 4, not 7, the same asmin box list.box_address_refusals_exit_with_their_codesin main.rs pins the failure_exit_code mapping.Residual: #2988 routes
min box auditand the session and task verbs throughresolve_box_on_local_hosts.Tests
cargo nextest run -p minimal box_address_accepts_id_name_and_qualifiedcargo nextest run -p minimal ambiguous_name_across_hosts_exit2_lists_candidatescargo nextest run -p minimal retained_name_across_hosts_exit2_lists_host_and_statecargo nextest run -p minimal unqualified_name_with_unreachable_host_exit7_names_hostcargo nextest run -p minimal unknown_box_address_exit4_names_addressVerify
min task run agent-verifydid not run green in the agent sandbox (rustc 1.99.0, which the repository does not pin). Theevery_daemon_connection_is_classifiedfailure it showed is fixed by a24e8fb. CI, which honours the pinned toolchain, is the gate.Closes #2895