Repository navigation
fix: T72 — Remove --new from min box start and min session start - #3795
mitodrummer merged 5 commits into
Conversation
BCLI-042: min box start and min session start take no --new. A derived name takes a number when it is taken, and --name gives another written name. The held-name refusal names --name and [box] name, and the PTY-entry hint names min box start <entry>.
The session start and box start tables lose the --new row. The held-name row and the sessions concept page say that a derived name takes a number and a written name is refused. The bulk-upload e2e starts with --detach alone.
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
|
Draft reasons: (1) the known flake #3483 ( |
|
/arch-review |
There was a problem hiding this comment.
arch-review: CONDITIONS · 2 conditions · the full ruling
The removal of --new conforms to architecture.md line 402, and the BCLI-010 and BCLI-026 changes conform to lines 487 and 488. Two edits remain. The --new proof is in a new test, but BCLI-042's verify: test does not run it. Move the cases there (C1). The rewritten held-name refusal adds a sentence about [box] name. That sentence is false when the name came from --name and the entry has no [box] name. Remove the sentence and keep the --name hint (C2).
Ruled at 8852cd6 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
| // or visible. The flag fails as the parser fails for any unknown flag, with | ||
| // exit 2, so nothing runs. | ||
| #[test] | ||
| fn box_and_session_start_refuse_new_flag() { |
There was a problem hiding this comment.
C1 · BCLI-042's verify: line runs removed_session_verbs_fail_as_unknown_commands, not this test. Move these --new cases into that test, so the spec's proof checks the removal that architecture.md line 402 states.
There was a problem hiding this comment.
Addressed in ede198f4da43: Moved the four --new parse cases per noun and the model_verb check into removed_session_verbs_fail_as_unknown_commands, and removed box_and_session_start_refuse_new_flag.
| " Run {command} --new {entry} to create another box from the entry, or \ | ||
| pass --name <name> to give the box another name.", | ||
| " Run {command} {entry} --name <name> to start a box from the entry under \ | ||
| another name. Without --name, the box takes its name from [box] name in \ |
There was a problem hiding this comment.
C2 · Remove "Without --name, the box takes its name from [box] name in minimal.toml." When the held name came from --name and the entry has no [box] name, the box takes a derived name. Keep the --name hint, which line 402 asks for.
There was a problem hiding this comment.
Addressed in ede198f4da43: Removed the "Without --name, the box takes its name from [box] name in minimal.toml." sentence. The --name hint stays.
| /// (BCLI-069, BOX-163). It names the holder, and the two flags that create | ||
| /// the box anyway. `main.rs` ends the command with [`Self::EXIT_CODE`]. | ||
| /// (BCLI-069, BOX-163). It names the holder, `--name`, which starts a box | ||
| /// under another name, and the `[box] name` that names the box without it. `main.rs` ends the command with [`Self::EXIT_CODE`]. |
There was a problem hiding this comment.
C2 · Remove "and the [box] name that names the box without it" here, as C2 removes it from the text. Wrap this comment at 100 columns.
There was a problem hiding this comment.
Addressed in ede198f4da43: Removed the [box] name clause from the StartNameHeld doc comment and wrapped it at 100 columns.
| min box start --new default to create another box from the entry, or pass \ | ||
| --name <name> to give the box another name." | ||
| min box start default --name <name> to start a box from the entry under \ | ||
| another name. Without --name, the box takes its name from [box] name in \ |
There was a problem hiding this comment.
C2 · Remove the [box] name sentence from this expected string and from the one at line 3982, to match the C2 change in StartNameHeld.
There was a problem hiding this comment.
Addressed in ede198f4da43: Removed the [box] name sentence from both expected strings in create_name_held_exit2_names_holder_hints_name_flag.
|
/revise Arch's ruling at 8852cd6 (CONDITIONS): C1 and C2. Change only what is below.
Test: |
The sentence was false when --name chose the held name and the entry writes no [box] name. The --new parse cases move into BCLI-042's removed_session_verbs_fail_as_unknown_commands.
|
Round 1 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: verify exited 100; outside the task's Review threads the coder judged:
The five tests pass. Notes from the agent: C1: the --new parse cases and the model_verb check moved into removed_session_verbs_fail_as_unknown_commands, and box_and_session_start_refuse_new_flag is gone. C2: the [box] name sentence left StartNameHeld's Display, its doc comment and both expected strings. One more change: the doc comment on start_refusal also said the hint names |
|
/arch-review |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
C2 is met. The held-name refusal now names only the holder and --name <name>, as architecture.md line 402 requires. The code half of C1 is met: removed_session_verbs_fail_as_unknown_commands, the BCLI-042 verify: test, now checks --new. The PR body still names the removed test box_and_session_start_refuse_new_flag in test:, ## Tests and ## Proof. Make the edit in C1, and run the test: line again. Then the change conforms.
Ruled at ede198f against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
| ); | ||
| } | ||
|
|
||
| // `--new` left `min box start` and `min session start`, hidden or not. |
There was a problem hiding this comment.
C1 · This test now holds the --new cases, and that meets the code half of C1. The PR test: line still names box_and_session_start_refuse_new_flag. Replace that name with removed_session_verbs_fail_as_unknown_commands in test:, ## Tests and ## Proof.
There was a problem hiding this comment.
Disputed — not addressed: No code change is needed. The task's test: line already names removed_session_verbs_fail_as_unknown_commands and not box_and_session_start_refuse_new_flag. The runner writes the PR body from the task, so the coder cannot edit it.
|
/arch-review |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The removal of --new conforms to architecture.md line 402 and to the start flag set at line 487. The min box run hint for a PTY entry conforms to line 488. One condition remains. The new docs say that a start refuses when any box has the written name. At this head the daemon refuses only when a running box has it, and the refusal text says "running box". C1 makes docs/reference/cli-min.md and docs/concepts/sessions.md say "running" until the BOX-163 any-state refusal lands.
Ruled at ede198f against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
| | No terminal, and no `--detach` | 2 | | ||
| | `--no-loadouts` and `--loadout` together | 2 | | ||
| | A running box holds the box's name. Pass `--new` or `--name` to create the box | 2 | | ||
| | A box already has the name from `--name` or `[box] name`. Pass another `--name` to create the box | 2 | |
There was a problem hiding this comment.
C1 · This row says that any box with the name refuses the start. At this head only a running box refuses it, because holds_name is false for stopped and exited boxes. Write "A running box already has the name from --name or [box] name." Line 402 asks for any state, but that is the daemon half of BOX-163.
There was a problem hiding this comment.
Addressed in e6624010be76: The exit-code row now reads "A running box already has the name from --name or [box] name."
| name, and a session already has the name that the start gives, the new session | ||
| takes that name with a number at the end. When you choose the name, with | ||
| `--name <NAME>` or the entry's `[box] name` in `minimal.toml`, and a session | ||
| already has it, `min session start` refuses and creates nothing. Attach to the |
There was a problem hiding this comment.
C1 · Write "and a running session already has it". A stopped or exited session with the name does not make min session start refuse at this head, and the refusal text says "running box".
There was a problem hiding this comment.
Addressed in e6624010be76: The paragraph now says "and a running session already has it". The rest of the paragraph is unchanged, but its lines are rewrapped.
|
/revise Arch's ruling at ede198f (CONDITIONS, arch_rulings 1696): C1. Docs only. Change nothing else.
The daemon refuses only when |
…-from-min-box-start-and-min-session-st
The daemon refuses a start only while a box with the name is pending, materializing or running. A stopped or exited box does not hold it.
|
Round 2 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: verify exited 100; outside the task's Review threads the coder judged:
The session start exit-code table in docs/reference/cli-min.md and the held-name paragraph in docs/concepts/sessions.md now say that only a running box or session with the name makes the start refuse. This matches the daemon, which refuses only while boxes::box_name::holds_name is true. Notes from the agent: This round is docs only, as the directive asks. No code or test changed, so I ran no test: line this round. I did not run |
|
/arch-review |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
C1 is met. The CLI reference row and the sessions concept paragraph now say that a running box has the name. That is the refusal that the code makes at this head. The code did not change since ede198f4, and that ruling stands for it. The change conforms to architecture.md line 402 and the min box start line 487.
Ruled at e662401 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
There was a problem hiding this comment.
Approved. The two files outside the task's layers are accepted.
|
Reviewed: no findings; approval withheld, 7 threads unresolved at APPROVE withheld: 7 unresolved threads — minimal-arch[bot] crates/minimal/src/tests.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/tests.rs, minimal-arch[bot] crates/minimal/src/tests.rs:936, …. 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. |
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 7 unresolved threads — minimal-arch[bot] crates/minimal/src/tests.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/tests.rs, minimal-arch[bot] crates/minimal/src/tests.rs:936, …. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
#3795 removed --new from min box start and min session start. The start refusal keeps main's --name remedy, and its pinned test strings follow it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
T72 — Remove --new from min box start and min session start
slice: S3
kind: task
covers: BCLI-042, BCLI-010, BCLI-026
size: S
est: 60 code, 140 tests
executor: agent
difficulty: routine
model: standard
depends on:
- blocked by #3196
diagnostics: none new
observability: none new
layers:
- cli:
- crates/minimal/src/cli.rs:
BoxStartArgsandSessionStartArgslosenew; usage and--namedoc comments drop--new- crates/minimal/src/cmd/boxes/create.rs:
--newplumbing,ActivationOptions::fresh_instanceandrequest_fresh_instanceremoved;StartNameHeldnames--nameand[box] name- crates/minimal/src/task.rs:
RunNeedsTerminalnamesmin box start <entry>- crates/minimal/src/tests.rs: the tests in step 4
- crates/minimal-client/src/box_name.rs: the
no_invented_directory_hex_namecomment names the interactive task as the only fresh-instance createtest: cargo nextest run -p minimal box_verbs_exist_with_arch_flags removed_session_verbs_fail_as_unknown_commands run_pty_entry_exit2_hints_box_start create_name_held_exit2_names_holder_hints_name_flag create_verbs_name_flag_overrides_box_name
- docs:
- docs/reference/cli-min.md:
--newrows removed;--namerows and the exit-code row- docs/concepts/sessions.md: the
--newbullet removed; the held-name paragraph- scripts:
- scripts/bulk-upload-e2e.sh:
--newremoved from itssession start; the comment aboverun_deadlineproduces: none
consumes: none
proof: the five tests pass, and
git grep -nE -- '--new\b' -- crates/minimal crates/minimal-client scripts docs/concepts docs/reference docs/guide README.mdprints only lines that record the removed spelling.This is a residual of epic #2879 (BCLI).
Proof
min box start --new and min session start --new now fail as an unknown flag with exit 2, and the five named tests pass. The git grep for --new over crates/minimal, crates/minimal-client, scripts, docs/concepts, docs/reference, docs/guide and README.md prints only the lines of
removed_session_verbs_fail_as_unknown_commands(BCLI-042'sverify:test) and its comment in crates/minimal/src/tests.rs. Those lines record the removed spelling.Notes from the agent: Two files outside the layers changed, because the start structs lost their
newfield. In crates/minimal/src/dash/rpc.rs, two test constructors of StartEntry droppednew: false. In crates/minimal/tests/cli.rs, two SessionStartArgs constructors droppednew: false. Without these edits the crate and its test targets do not compile.Some tests in tests.rs changed beyond the five named tests. run_pty_entry_exit2_hints_start_new is now run_pty_entry_exit2_hints_box_start. run_and_start_new_request_fresh_instance is now run_verbs_share_one_run_path, with its fresh-instance half removed, and it is gone from the create-site inventory in every_create_session_asserts_the_daemon_build. start_with_a_box_for_the_path_prints_no_warning now runs box, session, box with no --new. Its second box start relies on a taken derived name taking a number. Two test helpers set fresh_instance inline in place of the removed request_fresh_instance. These tests also pass: every_create_session_asserts_the_daemon_build, task_entry_start_sends_name_flag_as_requested_name, run_verbs_share_one_run_path, start_with_a_box_for_the_path_prints_no_warning, create_stores_client_digest_equal_to_daemon_digest, network_flags_override_stored_spec_and_projection, fresh_instance_grant_box_registers_under_a_creation_key, start_refusals_escape_entry_names, removed_session_verbs_fail_as_unknown_commands, and minimal-client no_invented_directory_hex_name.
New printed text, at
ede198f4and unchanged ate6624010:(<id>)part prints only when the refusal carries the holder's id.min session startnames itself in place ofmin box start. The earlier "Run … --new …" sentence is gone.min box run/min task runof an entry with a terminal: " runs with a terminal. Start it with min box start ."--newonmin box startormin session start: clap's unknown-argument error, exit 2.Arch round 1 (
8852cd62, CONDITIONS) moved the--newparse cases intoremoved_session_verbs_fail_as_unknown_commandsand removedbox_and_session_start_refuse_new_flag(C1), and removed a false[box] namesentence from the refusal (C2). Arch round 2 (ede198f4, CONDITIONS) had thesession startexit-code row indocs/reference/cli-min.mdand the held-name sentence indocs/concepts/sessions.mdsay that a running box holds the name. The daemon refuses only whileholds_nameis true (pending, materializing or running). Revise round 2 made that edit ate6624010, after merging main. Arch PASS ate6624010(arch_rulings 1697), no conditions. The code is unchanged sinceede198f4, so the test record below still holds.Tests
cargo nextest run -p minimal box_verbs_exist_with_arch_flags removed_session_verbs_fail_as_unknown_commands run_pty_entry_exit2_hints_box_start create_name_held_exit2_names_holder_hints_name_flag create_verbs_name_flag_overrides_box_nameede198f4, thetestsjob of CI (Run core workspace tests) ran all five: PASSremoved_session_verbs_fail_as_unknown_commands,box_verbs_exist_with_arch_flags,run_pty_entry_exit2_hints_box_start,create_name_held_exit2_names_holder_hints_name_flag,create_verbs_name_flag_overrides_box_name. Summary: 6429 tests run, 6429 passed, 38 skipped.Verify
min task run agent-verifyexited 100, so this PR is a draft.Out of scope
These files are outside the task's
layers:, so this PR is a draft:crates/minimal/src/dash/rpc.rscrates/minimal/tests/cli.rsCloses #3757