Repository navigation
fix(minimal): T70 — A task-entry start sends its requested name - #3791
Conversation
min box start <task entry> --name <name> now sends <name> as the requested name, and the run path sends the entry's [box] name, else no name. The run path no longer asks for a fresh instance, and the task's stored spec carries no box name. The interim --name refusal is gone.
The run path no longer asks for a fresh instance, so a task box under a free derived name takes no number. Fix the constructor-lint hit in the new task-request helper, and apply rustfmt.
|
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 task-entry start conforms to "Box names" (architecture.md lines 401-407). --name is the written name, else [box] name, else no name, and the daemon numbers only a derived name. The PR closes #3196, but min task run and min box run still have no --name. The design gives it to run (line 488). The interim comment on TaskRunArgs says to add the flag when RunEntry takes a name, and this PR adds that name. C1 adds the flag to both run verbs and removes the interim. C2 corrects two comments that still say every run is a fresh instance.
Ruled at f151368 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
| network: args.network, | ||
| egress: args.egress, | ||
| other: args.other, | ||
| box_name: None, |
There was a problem hiding this comment.
C1 · This sets box_name: None for min task run. The design gives --name to run (architecture.md line 488). Add --name to TaskRunArgs and set box_name: args.name here.
There was a problem hiding this comment.
Addressed in 1b31e9fcd6f9: Added --name to TaskRunArgs, and From now sets box_name: args.name. A test asserts that RunEntry carries it.
| network: args.network, | ||
| egress: args.egress, | ||
| other: args.other, | ||
| box_name: None, |
There was a problem hiding this comment.
C1 · Do the same for min box run. Add --name to BoxRunArgs and set box_name: args.name here. Then move run --name out of DEFERRED_ARCH_FLAGS.
There was a problem hiding this comment.
Addressed in 1b31e9fcd6f9: Added --name to BoxRunArgs, set box_name: args.name, and moved run --name out of DEFERRED_ARCH_FLAGS into the expected run flags.
| // The run path takes no `--name`, so the start refuses that flag | ||
| // rather than drop it. That refusal is the #3196 interim: remove it | ||
| // when `RunEntry` takes a name. | ||
| // `--name` reaches the run path as the requested name (BCLI-069). |
There was a problem hiding this comment.
BCLI-069 · This start path conforms to lines 401-402. The run verbs still lack the flag, and C1 adds it.
There was a problem hiding this comment.
Addressed in 1b31e9fcd6f9: The run verbs now take --name too (see the C1 threads), so start, min box run and min task run all send it as the requested name.
BCLI-069 gives --name to the run verbs as well as to start. RunEntry now carries it as the requested name, so both run verbs name the box exactly <name>. A task argument called --name now goes after --. The run path asks for no fresh instance, so a task box under a free derived name takes no number. The session e2e now accepts the <project>-<task> name with an optional -<n>.
|
Round 1 of 10 on a failed check suite, 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 named tests pass, and Notes from the agent: Revise round 1. (1) native-daemon-e2e failed because scripts/session-e2e.sh still expected a task run's box to be --. The run path no longer asks for a fresh instance, so a free derived name takes no number (BCLI-070). Both name matches in the script (task_kept_check and the port-run check) now accept an optional -. shellcheck -S warning is clean. I did not run the e2e on this box. ci-linux-native-success is the lane aggregator and fails only because of that job. (2) Out of layers: crates/minimal/src/cli.rs gets --name on TaskRunArgs and BoxRunArgs (review threads C1). scripts/session-e2e.sh is out of layers for the e2e fix. (3) Behaviour change: |
|
/arch-review |
There was a problem hiding this comment.
arch-review: CONDITIONS · 2 conditions · the full ruling
The code part of C1 is done. min task run and min box run now take --name, and a written name stays exact, as architecture.md lines 404 and 488 require. Two items are still open. C1: docs/reference/cli-min.md does not list --name for task run and box run, and it still says each run box is <TASK>-<n>. C2: the comments on request_fresh_instance in create.rs and in box_name.rs still say that the run verbs ask for a fresh instance. Make these edits, and the change conforms.
Outside the diff
docs/reference/cli-min.md:381: C1 · This line says the box is<TASK>-<n>. That is false at this head. Write that the box takes--name, else[box] name, else<project>-<task>, with-<n>only when that name is taken. Add a--name <NAME>row to the table below.docs/reference/cli-min.md:444: C1 · Replace "Each run creates a new box, named<ENTRY>-<n>." with the naming rule of C1. Add a--name <NAME>row to the table (architecture.md line 488).crates/minimal/src/cmd/boxes/create.rs:3826: C2 · Remove "min task runandmin box runcreate every box this way."run_entryno longer callsrequest_fresh_instance. Only--newcalls it.crates/minimal-client/src/box_name.rs:45: C2 · Replace "Onlymin task runasks for one." with "Only--newasks for one." The run path no longer asks for a fresh instance.
Ruled at 1b31e9f against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
|
/revise Arch's ruling at 1b31e9f (CONDITIONS): C1 part (4) and C2. Edit only the four places below. Leave the code as it is.
Run |
The run verbs take --name and no longer ask for a fresh instance. Update the CLI reference and two comments that said they did.
|
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 The five task tests pass, and Notes from the agent: This round made only the four edits that the directive names. The code is unchanged. docs/reference/cli-min.md and crates/minimal-client/src/box_name.rs are outside the task layers. The directive asked for these edits by name. |
|
/arch-review |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The fix commit closes both open conditions. C1 is met: docs/reference/cli-min.md now gives --name on task run and box run. It describes the written and derived names as the Box names rule states them (architecture.md lines 401-404). C2 is met: the request_fresh_instance and no_invented_directory_hex_name comments now name only --new. Nothing is left to do for the design.
Ruled at ad584c2 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
There was a problem hiding this comment.
Approved. The five files outside the task's layers are accepted.
|
Reviewed: no findings; approval withheld, 3 threads unresolved at APPROVE withheld: 3 unresolved threads — minimal-arch[bot] crates/minimal/src/task.rs, minimal-arch[bot] crates/minimal/src/task.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:905. 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: 3 unresolved threads — minimal-arch[bot] crates/minimal/src/task.rs, minimal-arch[bot] crates/minimal/src/task.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:905. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
T70 — A task-entry start sends its requested name
slice: S3
kind: task
covers: BCLI-029, BCLI-069, BCLI-079, BCLI-080
size: S
est: 75 code, 145 tests
executor: agent
difficulty: routine
model: standard
depends on:
- blocked by #3752
- blocked by #3753
diagnostics: none new
observability: none new
layers:
- cli:
- crates/minimal/src/task.rs:
RunEntrycarriesbox_name;run_entryputs it onrequest.config.namebeforeput_task_specand stops callingrequest_fresh_instance;put_task_specwrites no box name into the spec and takes the request name from--name, else[box] name- crates/minimal/src/cmd/boxes/create.rs:
plan_startpasses--nametoRunEntry;NameUnsupported(variant, exit code, Display, plan_start arm, interim comment) and itsstart_refusals_escape_entry_namesrow are removed- crates/minimal/src/main.rs:
start_entry_refusals_exit_with_their_codesloses theNameUnsupportedrow- crates/minimal/src/tests.rs: the five new tests;
run_and_start_new_request_fresh_instanceandcreate_verbs_name_flag_overrides_box_namestop pinning the run path's fresh-instance request and the refusaltest: cargo nextest run -p minimal task_entry_start_sends_name_flag_as_requested_name task_entry_start_sends_box_name_from_entry task_entry_start_without_name_sends_no_requested_name task_spec_stores_no_box_name interactive_task_name_flag_is_written
produces: none
consumes: none
proof: the five tests pass, and
git grep -n NameUnsupported -- cratesprints nothing.This is a residual of epic #2879 (BCLI).
Proof
The five tests pass, and
git grep -n NameUnsupported -- cratesprints nothing.min box start <task entry> --name apisendsapias the requested name. Without --name it sends the entry's [box] name, else no name. The stored task spec carries no box name.What changes for the user (at
ad584c2e)min box start <task entry> --name <name>creates the box as<name>. Before, it refused with exit 2.min task run <task> --name <name>andmin box run <entry> --name <name>are new. The box takes<name>.--name,min box start,min task runandmin box runof a task entry use the entry's[box] name. Without that, the box takes the derived name<project>-<entry>, with-<n>only when that name is taken. Before, every run box was a fresh instance,<project>-<entry>-<n>, so the first run is now<project>-<entry>with no number.docs/reference/cli-min.mdlists--namefortask runandbox runand gives the naming rule.Also delivers #3212 (
--nameonmin task runandmin box run), so this PR closes it.Known gap: #3792
An interactive task (a task whose box has a terminal) sends no Box Spec, so the daemon has no entry to derive a name from. Without
--name,min box startof an interactive task still names the box<entry>-<n>(a fresh instance) and does not read the entry's[box] name. With--name, the name is written and exact. Arch accepted this fallback atad584c2e. #3792 tracks the fix.Files outside T70's layers
crates/minimal/tests/cli.rs:task_run_exits_with_held_open_stdin_pipepinned the old fresh-instance name<project>-e2e-echo-1. A free derived name now takes no number.crates/minimal/src/cli.rs: arch C1 atf1513689adds--nametoTaskRunArgsandBoxRunArgsand removes the interim comment.scripts/session-e2e.sh: two checks matched the kept task box as<project>-<task>-<n>. They now accept<project>-<task>with an optional-<n>.docs/reference/cli-min.md: arch C1 at1b31e9fcadds the--namerows and replaces the<TASK>-<n>/<ENTRY>-<n>text.crates/minimal-client/src/box_name.rs: arch C2 corrects a test comment. Only--newasks for a fresh instance now.Notes
The tests.rs allowlist in
every_create_session_asserts_the_daemon_buildgets two entries for the new request sites (task_create_request,interactive_task_name_flag_is_written). The helper's return type uses a local aliasTaskCreate, becausecli_create_requests_use_the_constructorflags a wrapped-> ...CreateSessionRequest {line.Arch: PASS with no conditions at
ad584c2e(arch_rulings 1692), after revise rounds 1 and 2 met C1 and C2. CI is green atad584c2e.Tests
cargo nextest run -p minimal task_entry_start_sends_name_flag_as_requested_name task_entry_start_sends_box_name_from_entry task_entry_start_without_name_sends_no_requested_name task_spec_stores_no_box_name interactive_task_name_flag_is_writtenVerify
min task run agent-verifyexited 100, so this PR is a draft. The failure is the known flake #3483 (exec_run_attach_and_task_run_share_the_commands_trace), outside this diff. The output below is from the first head,f1513689.Closes #3196
Closes #3212