Repository navigation
T10 — Start a box from its entry - #3185
Conversation
Both verbs create a box from an entry of the project. With no entry, min box start picks the default entry of any type, else the only one, and min session start picks the default session entry, else the only one. The implicit default entry counts. A session box attaches this terminal unless --detach is given. Off a terminal, without --detach, the start exits 2 before it creates anything. A task entry starts detached, with its stdin closed, and one hint names min box run, min box logs and min box wait. --name sets the box's [box] name, and --new asks for a fresh instance. A held name exits 2, names the holder and names --new and --name.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: every review thread resolved at @agent-137 resolved the last thread, which releases the approval this review had withheld. Nothing to do. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 6 conditions · the full ruling
The new start verbs are in the right layers, and the entry choice and terminal rules conform for session entries. One gap is on a security boundary. A named session entry gets the egress of the default or only session entry, not its own (C1, design line 906). The new pickers drop the refusal for a type the client cannot resolve, so they can start the implicit default beside a session-rooted entry (C2, line 1178). A task entry start drops --name, and an unknown entry exits 2, not 4 (C3, C4). The two gaps in the PR body need filed issues before they can stay open (C5, C6).
Ruled at 01ed3e3 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
The run path names a task box itself and takes no name, so the start dropped --name without a word. It now refuses the flag with exit 2 before it creates anything. --new already holds for a task box: its generated name is never held.
|
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:
min box start and min session start create a box from an entry, attach a terminal box, and refuse a held name with the holder named. min box start --name now refuses with exit 2 and does not drop the flag. Notes from the agent: cargo-nextest is not installed on this box. I ran each test: line with cargo test -p minimal --lib , and all passed. The task run path (crates/minimal/src/task.rs, outside the layers) takes no box name, so a task entry cannot pass --name to it in this task. The start refuses the flag instead, with StartEntryRefusal::NameUnsupported (exit 2). New printed text: "Cannot start with --name. A box from a task entry gets a generated name. Run min box start without --name." A later task can carry --name through RunEntry, as BCLI-069 asks for min box run. |
There was a problem hiding this comment.
APPROVE withheld: 9 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/boxes/create.rs:673, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:763, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:319, minimal-arch[bot] crates/minimal/src/cmd/session.rs:58, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:664, ….
minimal-review — advisory review
Verdict COMMENT — No findings.
Panel: 1 of 3 personas ran (supply-chain); did not complete: correctness, security.
There was a problem hiding this comment.
arch-review: CONDITIONS · 3 conditions · the full ruling
The new refusal of --name for a task entry fails closed, and that is better than a dropped flag. It is still an interim. Lines 458 and 468 give min box start a --name, and line 389 makes a plain start refuse a held name. A task-entry start does neither, because run_entry always makes a fresh instance. The PR body names this gap and the refused agent and service entries, but links no issue. File and link the two issues (C1, C3), and correct the run-path comment (C2).
Ruled at de31cf8 against gominimal/arch@4fa352b60f7b by claude-opus-5-5.
|
/revise Head C1: the task-entry C2: correct the run-path comment in C3: the unsupported-type interim links #3197. Reply on each arch thread with the commit that answers it. |
Name the issues that track the task-entry --name refusal and the unsupported-type refusal, and correct the run-path comment: a task-entry start is always a fresh instance named <entry>-<n>.
|
Round 2 of 10 on a /revise note, 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 2, on the /revise note for arch ruling 1075. The note said to change no behaviour, so this round changes comments only (commit c102776). C1: #3196 is in the StartEntryRefusal::NameUnsupported doc comment and in the plan_start comment above the task --name arm, with the flip condition. C2: the run-path comment now names request_fresh_instance and - (BOX-163). C3: #3197 is in a comment on the UnsupportedType arm and in its doc comment. The runner must list #3196 and #3197 under the PR body's gaps. I cannot edit the PR body. cargo-nextest is not installed here, so I ran the ten test names in one |
There was a problem hiding this comment.
arch-review: CONDITIONS · 2 conditions · the full ruling
The entry choice, the attach rule, --name on a session and the exit-2 refusals conform. The #3196 and #3197 interims are honest residuals. One gap is open: min session start <entry> does not create the typed entry's box. activate_box reads egress from the default or only session entry through pick_session_entry. So a typed entry can get a wider egress than it declares. The spec body comes from the legacy [session] table. Policy layers line 1284 makes the entry itself an expansion layer, and line 1294 makes the network default-deny. Make the change in C1, and expand or file the spec body in C2.
Ruled at c102776 against gominimal/arch@949521619eea by claude-opus-5-5.
There was a problem hiding this comment.
Review on Karl's behalf, at c10277659. This is a comment, not an approval. Nothing was built for it: every point comes from reading the code, and each finding says how it was checked.
- Head:
c1027765. - CI at head: ci-success, ci-linux-native-success, ci-linux-kvm-success and ci-shell-installer-success are all green.
e2ewas IN_PROGRESS when fetched. arch-review FAILURE (CHANGES_REQUESTED, 2 conditions). minimal-review NEUTRAL. - Existing reviews:
- minimal-arch: three rulings. The one at the head has C1 (egress from the wrong entry) and C2 (the spec body comes from the legacy
[session]). - minimal-review at the head: 1 MEDIUM finding (the body/egress of the typed entry is ignored).
- CodeRabbit: skipped as a bot user, so there is no review.
- agent-137: /revise (round 2, comments only).
- minimal-arch: three rulings. The one at the head has C1 (egress from the wrong entry) and C2 (the spec body comes from the legacy
Plan task: covers BCLI-029, BCLI-071, BCLI-072 and BCLI-069. The code also implements --new (BCLI-070) for session entries, which the task does not cover. It is in the comments and has no test of its own (run_and_start_new_request_fresh_instance is not in this PR).
Requirement check
| Req | Implemented | Test | Notes |
|---|---|---|---|
BCLI-029: attach a pty box unless --detach, else print the id |
yes (plan_start, create.rs:631) |
start_attaches_pty_box_unless_detached (plan level) |
ok |
BCLI-029 sub: off a TTY, exit 2 naming --detach, nothing created |
yes | start_off_tty_exit2_names_detach. It drives the whole command against a TestServer, but only when the test runs off a terminal |
ok |
| BCLI-029 sub: unattached start closes stdin, plus one hint | yes for task entries | unattached_start_closes_stdin_and_hints_run_logs_wait. It tests open_task_box_run/detach_run, not start_entry |
see should-fix 3 |
BCLI-069: --name |
session entries: yes. Task entries: refused with exit 2, as an interim for #3196. min box run/min task run --name: not done |
create_verbs_name_flag_overrides_box_name |
partial. The residual is #3196 |
BCLI-069 sub: held name gives exit 2, names the holder, hint names --new and --name |
session entries: yes. Task entries never refuse, because the run path always creates a fresh instance | create_name_held_exit2_names_holder_hints_name_flag (unit level) |
partial (#3196) |
| BCLI-071 and its subs | yes (session.rs pick_session_start_entry) |
the three session_start_without_entry_* tests |
see nit 2 for project types |
| BCLI-072 and its sub | yes | the two box_start_without_entry_* tests |
ok |
Arch #166 vs spec vs PR (start/run flags)
- Arch L452-L455 and L469 now give
startandrunthese flags:--loadout,--no-loadouts,--no-hooks,--network,--ingress, one flag for each[network]key, and--deny-all-egress. They take no sync flag until arch#163, per the arch#161 owner ruling. The PR'sBoxStartArgs/SessionStartArgstake onlyentry,--name,--newand--detach, and the start path usesActivateArgs::unflagged(). That is within T10's scope, because BCLI-024 (--network/--ingress) and BCLI-073 (--loadout) belong to other tasks. Spec 28 is out of date:- The NEEDS CLARIFICATION at spec L603 still says "the architecture's grammar has no
--no-hooksand no--sync" and that arch#161 decides. Arch#161 has ruled:--no-hooksis on every start and run, and there is no sync flag. - Spec 28 has no requirement for
--no-hooks,--no-loadouts, the per-key network flags or--deny-all-egressonstart/run. BCLI-024 names only--networkand--ingress. Arch says "spec 28 lists the spellings". - Spec 28 needs those requirements before a later task can add the flags.
- The NEEDS CLARIFICATION at spec L603 still says "the architecture's grammar has no
Should-fix
- create.rs:2596 → :1050: a typed
min session start <entry>is refused when the file has several session entries and declares any network.activate_boxcallsproject_egress(&utf8_path), and that callspick_session_entrywithout the typed entry. Example: aminimal.tomlwith[sessions.api](it declares[sessions.api.network]) and[sessions.web], and nodefault.plan_startpicksapicorrectly.project_egress_fromthen getsNoDefault, and becausedeclares_networkis true it refuses with exit 2: "…None of them is named "default", so the start cannot pick one. Rename the entry to start to "default"…". The user named an entry, and the message tells them to rename it. A project-typed entry anywhere in a file that declares network fails the same way, throughTypeUnresolved. This is the refusal side of arch C1. The arch ruling describes only the "wider egress" side. The fix is the same: passoptions.entryintoproject_egressand pick that entry by name. Verified: readactivate_boxL2596,project_egress_fromL1044-1056 andpick_session_entryL117-160. Not built. - create.rs:2596 and :2434: the typed session entry gets another entry's egress and the legacy
[session]body. Still open from minimal-arch (C1 and C2 at c102776) and from minimal-review (MEDIUM at create.rs:2440). This is a security boundary:min session start lockedcan run with[sessions.default]'s wider egress. Verified: the code is unchanged at the head. - create.rs:587: the unattached-start hint names commands that do not exist at this head. It reads "…Run min box logs for its output, and min box wait for its exit code." At c102776,
BoxCommandhas noLogsand noWait. AGENTS.md says "An instruction names a command the user can run as written." BCLI-029's sub-bullet requires this hint to name both verbs, so this PR must merge after #3195 (wait) and after whichever task shipsmin box logs, or the hint lies on main. Verified: listed theBoxCommandvariants at refs/review/pr-3185. - create.rs:587/779: the hint uses a
<box>placeholder even though the id is known.run_entry→detach_runhas just printed the box id on stdout, but the hint saysmin box logs <box>andmin box wait <box>. AGENTS.md says "Fill in the value when the message knows it." Thread the id back fromrun_entryand printmin box logs <id>andmin box wait <id>. The test that pins the text isunattached_start_closes_stdin_and_hints_run_logs_wait. Verified: read the code.
Nit
- create.rs:442 / main.rs:283: an unknown entry exits 2, but arch says 4. Arch L365 makes 4 "Not found (entry, box, …)". minimal-arch raised this in round 1 (C4) and dropped it from later rulings. It is still unfixed at the head. Spec 28 has no requirement for the unknown-entry exit code, which is a spec gap. Either amend the spec or follow arch. Verified: read the code.
- create.rs:311 / session.rs:58: a session-rooted project type does not block the implicit
default.builtin_rootreturnsNonefor a project type, so with[boxes.dev] type = "mydev"(where mydev extends session), a baremin session startstarts the implicitdefaultnext to the real session entry. minimal-arch raised this in round 1 (C2) and dropped it from later rulings. It is still unfixed at the head. Verified: readstart_candidatesandimplicit_default_entry(mfile/src/entry.rs:112). - create.rs:529:
StartNeedsTerminalprints the entry raw. Every other start refusal passes the entry throughprintable(). Verified: read the code. - Machine mode:
StartEntryRefusal,StartNeedsTerminalandStartNameHeldhave no arm inmachine_mode_answer, so-o jsonreportscode = "unspecified"for these usage refusals. Verified: read main.rsmachine_mode_answer.
Verdict: needs changes. The open items are the security boundary (should-fix 1–2, arch C1/C2) and the hint's text. Merging is also blocked on the order: #3195 and the task that ships min box logs must land first.
|
/revise Head 1. C1: a typed session entry starts with its own egress.
Add a test in
2. C2: the typed entry's body is a residual, #3204. 3. Thread PRRT_kwDOPdfcxM61Xj2k: 4. The hint names the box by its id. 5. Merge order. |
A typed dev is now refused until #3204, so the off-terminal test reaches the terminal refusal through a bare start of the sole entry.
StartNameHeld printed the entry, the held name and the holder's name raw. A name with control characters can no longer move the cursor.
|
Round 10 of 10 on a review requesting changes, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
1 thread was already answered in earlier rounds, with nothing new on it since.
Notes from the agent: Finding 2: plan_start now refuses a typed session entry not named |
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 3 conditions · the full ruling
The start conforms to the design with four filed interims open. This head adds one more: a typed session entry other than default is refused with exit 2 until #3204 (C1). Line 453 of architecture.md gives min session start [<entry>] any session entry. The refusal fails closed and names its issue, so it can merge as an interim. --name on the run verbs stays with #3196 (C2). The agent, service, user-defined and [boxes] task starts stay with #3197 and #3213 (C3).
Ruled at 22b3ffa against gominimal/arch@9e2ff817adba by claude-opus-5-5.
|
/review |
|
Undrafted by the BCLI babysitter after round 10, under the owner's standing rules: the only draft causes are the requested out-of-layers files and the runtime's nextest-missing test lines. @bryan-minimal, rounds 9 and 10 refuse a typed session entry other than |
There was a problem hiding this comment.
Re-read at 22b3ffa. Both points from my last pass are answered:
- Finding 2: d1224b9 refuses a typed session entry other than
defaultwithNamedSessionUnsupported, exit 2, named as the #3204 interim in the code and incli-min.md, andstart_typed_session_entry_other_than_default_exit2_until_its_body_appliespins it. That is the refusal-with-a-filed-issue I asked for. - Finding 4 stays answered by 9a0fd24 (the refusal lives in the pickers, not ahead of every start).
min box wait: #3195 is approved; this PR's hint names it, so #3195 merges first and this one follows.
Approving, on that merge order.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 39 unresolved threads — minimal-foundry[bot] crates/minimal/src/cmd/boxes/create.rs:822, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:914, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/cmd/session.rs:111, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:813, …. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
…x-from-its-entry # Conflicts: # crates/minimal/src/main.rs # crates/minimal/src/task.rs
min box wait is on main now, so the comment's claim that this branch lacks it is false.
…x-from-its-entry # Conflicts: # crates/minimal/src/cli.rs # crates/minimal/src/cmd/boxes/create.rs # crates/minimal/src/main.rs # crates/minimal/src/task.rs
The merge of main added network and egress to RunEntry. The task start of min box start takes no network flags, so it passes none.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs:705. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 4 conditions · the full ruling
The compare is two merges of main and two small commits, and it conforms. A task start through min box start now passes no network override, so the entry's own [network] applies. Section Policy layers line 1286 asks for that. The four start interims do not change. C1–C4 stay open as filed residuals #3196, #3197, #3204 and #3213, with #3212 for --name on the run verbs.
Ruled at 5ab4150 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
|
A merge of main before round 1, not counted against the cap (1 of 3), pushed as Resolved conflicts in:
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
A person can run min box start or min session start. A terminal entry attaches unless --detach is given. Off a terminal, the start refuses with exit 2 and names --detach. An entry with no terminal returns with a hint that names min box run, min box logs and min box wait , and all three commands exist on this branch now. Notes from the agent: Merge round: main.rs conflicted only in the failure_exit_code doc comment. The resolution keeps both the start refusals and the BoxTimedOut line from main. task.rs conflicted on the box run return: the resolution uses main's run_outcome (timeout aware) and keeps this branch's .map(|()| id). After the merge, I removed the four-line comment above unattached_start_hint in create.rs, because min box wait (#3195) is on main now. cargo-nextest is not installed on this box (cargo reports 'no such command: nextest'). So each test line ran as cargo test -p minimal , and all passed. cargo clippy -p minimal --all-targets is clean. |
|
Undrafted by the BCLI babysitter after the runtime's merge of main. The only draft causes are covered by the owner's standing rules: the runtime's nextest-missing test lines, plus, on #3185, out-of-layers files that a round asked for. |
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 5ab41501f536 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.
T10 — Start a box from its entry
slice: S3
kind: task
covers: BCLI-029, BCLI-071, BCLI-072, BCLI-069
size: L
est: 280 code, 600 tests
executor: agent
difficulty: needs care
model: strongest
diagnostics: off a terminal,
min box startof a terminal entry prints " needs a terminal. Run it from a terminal, or pass --detach." on stderr and exits 2 before it creates anything, pinned by start_off_tty_exit2_names_detachobservability: the command's existing tracing span records the verb, the box id it resolved and the outcome
layers:
- client:
- crates/minimal/src/cli.rs: the verb's arguments and help in the one command model
- crates/minimal/src/cmd/mod.rs: dispatches the verb
- crates/minimal/src/cmd/boxes/create.rs:
min box startandmin session start: entry choice,--name,--new, attach unless--detach- crates/minimal/src/cmd/session.rs:
min session startpicks the default, else the sole session entry- 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 start_attaches_pty_box_unless_detached
test: cargo nextest run -p minimal start_off_tty_exit2_names_detach
test: cargo nextest run -p minimal unattached_start_closes_stdin_and_hints_run_logs_wait
test: cargo nextest run -p minimal create_verbs_name_flag_overrides_box_name
test: cargo nextest run -p minimal create_name_held_exit2_names_holder_hints_name_flag
test: cargo nextest run -p minimal session_start_without_entry_picks_default_else_sole
test: cargo nextest run -p minimal session_start_without_entry_ambiguous_exit2_lists_entries
test: cargo nextest run -p minimal session_start_without_entry_blocked_default_exit2_names_fix
test: cargo nextest run -p minimal box_start_without_entry_picks_default_else_sole
test: cargo nextest run -p minimal box_start_without_entry_ambiguous_exit2_lists_entries
produces: none
consumes: none
proof:
min box startandmin session startcreate a box from an entry, attach a terminal box, and refuse a held name with the holder named.depends on:
- blocked by #2892
Residuals
Each interim fails closed with exit 2, and its doc comment names the issue and the condition for removing it (arch ruling 1093, C1–C3).
defaultis refused (NamedSessionUnsupported) until the entry's own body is expanded into the spec.--nameon a task-entry start is refused (NameUnsupported) untilRunEntrytakes a box name.--nameonmin task runandmin box run, after BCLI: min box start of a task entry takes --name and refuses a held name (T10 residual, arch C1) #3196.UnsupportedType).[boxes.<name>] type = "task"entry is refused (TaskNotInTasks) untildeclared_taskreads[boxes].Merge order: this PR merges after #3195 (T8), with
mainmerged in, so the hint'smin box waitexists.Proof
A person can now run min box start [] and min session start []. With no entry, box start picks the default entry of any type, else the only entry. Session start picks the default session entry, else the only session entry. Both count the implicit default entry. A session box attaches this terminal unless --detach is given. Off a terminal without --detach, the command prints " needs a terminal. Run it from a terminal, or pass --detach." and exits 2 before it creates a box. A held name exits 2. The message names the holder and its id, and it names --new and --name.
Notes from the agent: Each nextest line ran as cargo test -p minimal --lib , because cargo-nextest is not installed here. I made one run of the whole minimal lib suite. It reached my 25-minute limit and did not finish. The failures it showed passed when rerun at 4 threads, with two exceptions. (1) legacy_network_spellings_parse_with_hint fails only under cargo test output capture. It passes with --nocapture, and it is the same under nextest. (2) resolver::tests::the_answerer_facts_ride_beside_a_down_proxy_sibling fails alone too. It is about port state on this box, and resolver.rs is not part of this change. I updated every_create_session_asserts_the_daemon_build to list the two unsent requests in my name test.
Gaps that need files outside the layers:
Tests
cargo nextest run -p minimal start_attaches_pty_box_unless_detachedcargo nextest run -p minimal start_off_tty_exit2_names_detachcargo nextest run -p minimal unattached_start_closes_stdin_and_hints_run_logs_waitcargo nextest run -p minimal create_verbs_name_flag_overrides_box_namecargo nextest run -p minimal create_name_held_exit2_names_holder_hints_name_flagcargo nextest run -p minimal session_start_without_entry_picks_default_else_solecargo nextest run -p minimal session_start_without_entry_ambiguous_exit2_lists_entriescargo nextest run -p minimal session_start_without_entry_blocked_default_exit2_names_fixcargo nextest run -p minimal box_start_without_entry_picks_default_else_solecargo nextest run -p minimal box_start_without_entry_ambiguous_exit2_lists_entriesVerify
min task run agent-verifyexited 101 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.Base
The base branch moved while the coder worked; it was merged in before the tests ran.
Closes #2898