Repository navigation
T6 — Addresses and machine output, end to end - #3006
Conversation
Address one box over a harness daemon by its id, its name and provider/host/name from min box show, stop and rm. An address that names no box ends with exit 4. An unqualified name while the selected host does not answer ends with exit 7. Each -o json box object carries min/v1/box, and a secret renders only as its reference. Each step logs one resolution in its own span, with the host it reached.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Reviewed: no findings; approval withheld, 3 threads unresolved at APPROVE withheld: 3 unresolved threads — minimal-arch[bot] crates/minimal/src/tests.rs:7379, minimal-arch[bot] crates/minimal/src/tests.rs:7415, minimal-arch[bot] crates/minimal/src/tests.rs:7465. 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. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 3 conditions · the full ruling
The test conforms to the addressing, exit-code and output lines of the design, and it stays in the one layer that T6 names. The PR body lists three product gaps but names no issue for them. Rule 6 does not accept a residual without an issue. Gap (3) is a real deviation from line 383: a refused address in a machine mode writes code unspecified. File one issue for each gap and link it in the PR body (C1, C2, C3). Then the change can merge.
Ruled at 9a9a3e0 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
There was a problem hiding this comment.
Reviewed at 9a9a3e0 against #2901 (T6). Tests-only (crates/minimal/src/tests.rs): box_address_and_json_output_end_to_end shows a box by id, name and local//web, stops it by id and removes it by provider/host/name, pins exit 4 for an unknown and a removed box, exit 7 naming the unreachable host, the min/v1/box schema on every list -o json object, and a secret rendered only as its reference in every output mode. box_command_ending now maps BoxAddressRefusal to its own code, as failure_exit_code does. Arch's three conditions are filed residuals: #3010 (machine-mode error kinds) and #2980 (box show -o json, the secret check on a real command).
|
/revise Round 1 (job 1036aa0e) was killed by SIGTERM before it did anything. Run it again: merge main into this branch and resolve the conflict in crates/minimal/src/tests.rs by keeping both blocks (this PR's |
…and-machine-output-end-to-end # Conflicts: # crates/minimal/src/tests.rs
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 3 conditions · the full ruling
The merge from main is clean. The test hunk does not change from 9a9a3e03, so the ruling on that head stands. The test proves addressing by id, name and provider/host/name, exit 4, exit 7, min/v1/box, and secret redaction (architecture.md lines 365, 368, 381, 384, 389). Three gaps stay in the product. They are filed as residuals: C1 is #3010, and C2 and C3 are #2980. The change can merge with them open.
Ruled at 61243d6 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
/revise The last two rounds died in the container before they did anything: a SIGTERM, then "container stopped: exit -1 Error: Shutdown container connection". Run it again: merge main into this branch and resolve the crates/minimal/src/tests.rs conflict by keeping both blocks (this PR's |
|
Round 2 of 10 on a /revise note: the coder changed nothing. noop: the merge of main that the /revise note asks for is already on the branch. Head 61243d6 is a merge of origin/main at 090a624, which is also the local main tip. crates/minimal/src/tests.rs has no conflict markers. git diff main HEAD changes only crates/minimal/src/tests.rs: it adds this PR's test and its helpers and keeps every test that main has. The only lines it removes are this PR's own edit to the box_command_ending helper. The test line passes on the merged tree. I changed nothing, as the note asks. The three review threads name gaps that need code outside this task's layers, in issues that have not landed. Review threads the coder judged:
|
T6 — Addresses and machine output, end to end
slice: S1
kind: integration
covers: none
size: S
est: 20 code, 100 tests
executor: agent
difficulty: routine
model: light
diagnostics: when the end-to-end test fails, it prints each command it ran with that command's stdout, stderr and exit code
observability: the test run's spans show one resolution per command, with the host it reached
layers:
- tests:
- crates/minimal/src/tests.rs: the slice's end-to-end test over a test daemon
test: cargo nextest run -p minimal box_address_and_json_output_end_to_end
produces: none
consumes: none
proof: Address a box by its id, its name or provider/host/name from any command, get exit 4 for a box that does not exist and exit 7 for a host that doe 8000 s not answer, and read every
-o jsonobject with itsmin/v1schema and every secret as a reference.depends on:
- blocked by #2895
- blocked by #2891
Proof
The test box_address_and_json_output_end_to_end runs over a harness daemon on the native host's socket. It shows one box by its id, its name and local//web, then stops it by id and removes it by provider/host/name.
min box show no-such-boxand a show of the removed id end with exit 4.min box show webwhile the selected VM host does not answer ends with exit 7 and names that host. Eachmin box list -o jsonobject carries schema min/v1/box. A secret renders only as its reference in text, json and jsonl. When a step fails, the test prints every command with its stdout, stderr and exit code. The log shows one resolution in each step's span, with the host it reached.Notes from the agent: Gaps in the product that the test cannot close, inside its layers: (1) No command renders a Secret today. Only cmd/output.rs defines it. So the secret check goes through output::write_object with a test-only Rendered object, not through a real command. (2)
min box list -o jsonis the only box command with -o json.min box showhas no machine mode. (3) In main.rs, machine_mode_answer has no branch for BoxAddressRefusal. A machine-mode run that ends in exit 4 or 7 writes a min/v1/error object with codeunspecified. The exit code is correct. The test cannot reach main.rs from the library, so it does not check the error object. A later task can add not_found and host_unreachable codes there. (4) In tests.rs, box_command_ending now maps a BoxAddressRefusal to its own exit code, as failure_exit_code in main.rs does. The T3 test box_first_slice_list_show_stop_rm_end_to_end still passes. The exit-7 step simulates the down host with a selected local-minvmd host that has no socket. That is the same way as the T4 tests. cargo clippy -p minimal --all-targets and cargo fmt --check are clean.Tests
cargo nextest run -p minimal box_address_and_json_output_end_to_endVerify
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.Residuals
machine_mode_answergives a box address refusal its own error kind (not_foundfor exit 4,host_unreachablefor exit 7); today both printunspecified(arch C1).min box showgains-o json, and every-o jsonrenderer moves ontooutput::write_objectwithoutput::Secret, so the secret check runs on a real command's output (arch C2, C3).Closes #2901