Repository navigation
fix(minimal): T50 — The wait, rename, prune and address messages name the box and give the next step - #3432
Conversation
The wait-timeout line names the box by its record's name and id, and text mode prints the wait-again hint after the error line. The rename line names the old name from the record. An ambiguous id start lists each box it matches. A prune that matches nothing names its --older-than and --parent values. An empty box address is a usage error with exit 2.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Reviewed: no findings; approval withheld, 2 threads unresolved at APPROVE withheld: 2 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/boxes/wait.rs:291, minimal-foundry[bot] crates/minimal/src/cmd/boxes/lifecycle.rs:1281. 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 · the full ruling
The change conforms to the design. The wait timeout keeps code wait_timeout and exit 124, and names the box that is still running (exit-code table, line 370). An ambiguous id start keeps exit 2 and lists the candidates, as the Addressing section requires (line 389). An empty address is a usage error at parse time (line 363). The other changes are only to human text, which the design does not fix (principle 4). The failing otel_cli verify test is outside this ruling. Make it pass before you take the PR out of draft.
Ruled at 6bb53ac against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
| box_name_on(&resolved.host, resolved.box_id) | ||
| .await | ||
| .as_deref(), |
There was a problem hiding this comment.
MEDIUM · correctness · confidence 0.55 · in box_name_on
After the --exec wait times out, box_name_on makes a new ShowBox call with no timeout. If the host is slow or stalls, min box wait --timeout can hang after its own deadline instead of exiting with 124. The wait-timeout contract is a bounded exit. Bound the lookup with tokio::time::timeout, or reuse a name that the wait already read.
What the reviewer checked
Err(_) => Err(BoxTimedOut::waited_exec(box_name_on(&resolved.host, resolved.box_id).await.as_deref(), ...)); box_name_on calls box_host_client(host).await then oneshot_rpc:: with no timeout
Hand this to an agent
Act on a code-review finding.
File: crates/minimal/src/cmd/boxes/wait.rs
Lines: 278-280
Category: correctness
Severity: medium (reviewer confidence 0.55)
Finding:
After the `--exec` wait times out, `box_name_on` makes a new `ShowBox` call with no timeout. If the host is slow or stalls, `min box wait --timeout` can hang after its own deadline instead of exiting with 124. The wait-timeout contract is a bounded exit. Bound the lookup with `tokio::time::timeout`, or reuse a name that the wait already read.
First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.
👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.
There was a problem hiding this comment.
Addressed in ed83839c5793: box_name_on now wraps the ShowBox lookup in tokio::time::timeout (2s), so a stalled host gives the id-only line instead of holding the 124 exit.
| .older_than | ||
| .map(|age| format!("--older-than {}", age_label(age))) | ||
| .into_iter() |
There was a problem hiding this comment.
LOW · correctness · confidence 0.60 · in PruneSelectors::flags
The doc on PruneSelectors says the no-match line shows --older-than as the person wrote it. age_label normalises the value instead. --older-than 168h prints as 7d, and 90m prints as 90m but 3600s prints as 1h. The line then names a flag value that the person did not type. Keep the original string, or fix the doc.
What the reviewer checked
flags(): .map(|age| format!("--older-than {}", age_label(age))) with age: Option
Hand this to an agent
Act on a code-review finding.
File: crates/minimal/src/cmd/boxes/lifecycle.rs
Lines: 1276-1278
Category: correctness
Severity: low (reviewer confidence 0.60)
Finding:
The doc on `PruneSelectors` says the no-match line shows `--older-than` as the person wrote it. `age_label` normalises the value instead. `--older-than 168h` prints as `7d`, and `90m` prints as `90m` but `3600s` prints as `1h`. The line then names a flag value that the person did not type. Keep the original string, or fix the doc.
First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.
👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.
There was a problem hiding this comment.
Addressed in ed83839c5793: Fixed the doc: PruneSelectors now says --older-than prints in its largest whole unit (168h prints as 7d), the same label the prune question uses. The parser keeps only a Duration, so the typed string is not available.
The --exec wait looked up the box name with no limit after its own deadline passed. The lookup now gives up after two seconds and the line names the box by its id. The prune selector doc now says that --older-than prints in its largest whole unit.
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Converted to a draft: something above needs a person before review. Review threads the coder judged:
Notes from the agent: Revise round 1. The name lookup after an --exec wait timeout now stops after 2 seconds (NAME_LOOKUP_LIMIT). The line then names the box by its id. For the prune finding, the doc changed and the code did not: the --older-than parser keeps only a Duration, and the no-match line uses the same unit label as the prune question. I did not run just clippy-strict this round. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The new push conforms to the design. The name lookup after a wait timeout now stops after 2 seconds and falls back to the box id. The wait still returns 124 with wait_timeout and leaves the box running, as architecture.md line 506 requires. The other change is a doc comment, so the earlier PASS on 6bb53ac7 stands for the rest. This ruling does not cover the failed otel_cli test in the verify run. That failure is a CI question, not a design question.
Ruled at ed83839 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/boxes/wait.rs:291, minimal-foundry[bot] crates/minimal/src/cmd/boxes/lifecycle.rs:1281. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
…ename-prune-and-address-messages-name # Conflicts: # crates/minimal/src/tests.rs
|
A merge of main before round 2, not counted against the cap (1 of 3), pushed as Resolved conflicts in:
Verify Converted to a draft: something above needs a person before review. After the merge with main, Notes from the agent: This round resolved the merge conflict with main in crates/minimal/src/tests.rs. Both sides added a new test at the same place: this branch added box_messages_name_the_box_and_the_next_step, and main added session_entry_network_mode_and_ingress. The merge keeps both tests, one after the other. No other code changed this round. The other files in the merge commit come from main. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This head merges main into the branch. The PR's own changes are the same as on ed83839c, which passed. The one merge conflict, in crates/minimal/src/tests.rs, keeps both tests whole. The messages still name the box, and the exit codes stay as the Exit codes table gives them. The PASS carries forward.
Ruled at 4121db8 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
T50 — The wait, rename, prune and address messages name the box and give the next step
slice: S2
kind: task
covers: BCLI-013, BCLI-058, BCLI-061, BCLI-002, BCLI-064
size: M
est: 90 code, 140 tests
executor: agent
difficulty: routine
model: standard
diagnostics: the wait-timeout, rename, ambiguous-id-start and prune lines change to the text in the issue; the wait hint prints in text mode; box_messages_name_the_box_and_the_next_step pins each line, and the wait and rename tests listed in the issue move with them
observability: none new; each verb's existing tracing event records the box id and the outcome
layers:
- client:
- crates/minimal/src/cmd/boxes/wait.rs:
BoxTimedOut::waitedandwaited_execname the box by its record's name and id, orBox <id>when it has no name- crates/minimal/src/main.rs: a text-mode
BoxTimedOutprints its hint on its own line after theerror:line- crates/minimal/src/cmd/boxes/lifecycle.rs: the rename line names the old name from the record;
finish_prunenames the--older-thanand--parentvalues in its nothing-matched line- crates/minimal/src/cmd/boxes/address.rs:
AmbiguousIdStartcarries and lists its candidates- crates/minimal/src/cli.rs: every box-address argument takes clap's non-empty value parser
- crates/minimal/src/tests.rs: the in-process minimald test harness gains this layer's tests, and the pinned wait texts move to the new wording
test: cargo nextest run -p minimal box_messages_name_the_box_and_the_next_step
produces: none
consumes: none
proof:
min box wait --timeout 1s <id>names the box and prints the wait-again hint;min box rename <id-start> <new>names the old name;min box show ""exits 2; an ambiguous id start lists its candidates; a prune that matches nothing names its selectors.Proof
min box wait --timeout 1s <id>printserror: Stopped waiting after 1s. Box web (<id>) has not ended.and then the lineRun \min box wait ` to wait again, or `min box stop ` to stop it.A box with no name printsBox.min box rename frontprintsRenamed box web () to front.with the old name from the record.min box show ""is refused by the argument parser with exit 2. An ambiguous id start lists each matching box wit 8000 h its id, name, state and provider/host. A prune that matches nothing printsNo stopped or exited box matched --older-than 7d and --parent web, so nothing was removed.`Notes from the agent: The task refers to "the text in the issue", but the issue was not staged. I chose the wording myself and pinned it in box_messages_name_the_box_and_the_next_step: wait
Stopped waiting after <d>. Box <name> (<id>) has not ended.(orBox <id>); exec waitExec <exec> in box <name> (<id>) has not ended.; renameRenamed box <old> (<id>) to <new>.(orRenamed box <id> to <new>.when the record has no name or cannot be read); ambiguous id start: a header line, one row per box (<id> <name or -> <state> <provider>/<host>), thenGive more of the id.; prune:No stopped or exited box matched --older-than <age> and --parent <box>, so nothing was removed.If the issue fixes other text, the code and that test must change together. The exec wait has no record read, so on timeout it makes one ShowBox call to get the name. If that call fails, the line names the box by id only. The non-empty value parser applies to everymin boxbox argument and --parent, themin box spectarget, and the session-identifier arguments of themin sessionverbs in cli.rs. Themin box prune --dry-runno-match line and the show.rs id-start message are out of this task's layers and stay unchanged. In lifecycle.rs I moved the age formatting from prune_question into age_label and replacedsecs % size == 0with `is_multiple_…[truncated]Tests
cargo nextest run -p minimal box_messages_name_the_box_and_the_next_stepVerify
min task run agent-verifyexited 100, so this PR is a draft.Closes #3423