fix(minimal): min task list in a project with only session boxes says the project has no task boxes by minimal-foundry[bot] · Pull Request #3363 · gominimal/minimal · GitHub
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(minimal): min task list in a project with only session boxes says the project has no task boxes - #3363
### D3203 — min task list in a project with only session boxes says the project has no task boxes, and a test proves it
kind: task
size: S
est: 0 code, 45 tests
executor: agent
defect: bug
layers:
- cli:
- crates/minimal/src/tests.rs: adds a test: a project with only a session box, scoped min task list prints the no task boxes line, not EMPTY_PROJECT_LIST
- crates/minimal/src/cmd/session.rs: keeps empty_typed_list for an empty filtered list. Change it only if the new test shows the box list empty line
test: cargo test -p minimal task_list_in_a_session_only_project_says_no_task_boxes
proof: In a project that holds only a session box, min task list prints This project has no task boxes, and min box list still prints its own empty line.
Proof
A test now creates a project that holds only a session box. In that project, a scoped min task list prints "This project has no task boxes. Run min task list --all to list the task boxes of every project." The line is not the min box list empty line. min box list still prints its own line, "This project has no boxes. ...", for a project with no boxes.
Notes from the agent: The current code already prints the task-typed line through empty_typed_list. The new test passed on its first run, so crates/minimal/src/cmd/session.rs needs no change and I did not change it.
Tests
line
exit
tail
cargo test -p minimal task_list_in_a_session_only_project_says_no_task_boxes
0
running 1 test test tests::task_list_in_a_session_only_project_says_no_task_boxes ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 941 filtered out; finished in 0.27s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 33 filtered out; finished in 0.00s
Verify
min task run agent-verifyexited 100, so this PR is a draft.
The reason will be displayed to describe this comment to others. L
8000
earn more.
Read at the current head against #3351 and #3203. A test-only PR is the right shape here: the behaviour #3203
asked for landed with #3297 on 2026-11-12, and this test pins it in the one case the existing empty-list test
cannot tell apart (a project that holds a session box and no task box). It first proves the session box is
there through the scoped session list, then asserts the exact task-typed line and an empty stderr; the line
comes from empty_typed_list in session.rs, reached through the same function min task list calls, and
the unwrapped call turns an error exit into a failure. Approving, with three small things to tidy:
The title's type is fix(minimal) but nothing but a test changes; the squash commit wants test(minimal).
The title is 99 characters, so the shorter prefix keeps it under the limit.
The comment at crates/minimal/src/tests.rs:13328 opens with the plan key "D3203:". The file's other
comments cite a requirement id; "BCLI-030:", which #3203 itself names, matches them.
The min box list check at tests.rs:13368 renders an empty list against a constant, so its not-equal
assertion is always true (the bot's open nit). Either list the real project through the box-list code and
assert the web row, or drop those lines.
Also: "Fixes #3351" closes only the task issue; #3203 should close against #3297 and this PR.
Checked and fine: the exact text and newline match what the code prints; no ordering or user-daemon
dependency (the test runs its own daemon as its neighbours do); the name follows the file's sentence style;
session.rs was in the task's "may touch" list only for the case the test did not need, so leaving it alone
was right. One known gap, shared with the sibling test: the project root is passed directly, so the
project-from-cwd step and minimal.toml are never read; the filter works on box records, so that is fine.
/revise One change, from the open NIT on crates/minimal/src/tests.rs:13373 (task_list_in_a_session_only_project_says_no_task_boxes). Change nothing else.
The min box list half calls render_box_list with an empty slice, so it never lists the project that holds the session box, and its assert_ne is always true because the two strings differ by constant text. Make it render the real listing for the session-only project (the session box in the list), and assert what the proof claims: the task listing says there are no task boxes, while min box list for the same project shows the session box. Drop the assert_ne.
The min box list check now renders the boxes of the project that holds
the session box, and asserts the session box is in it, in place of an
always-true assert_ne again
8000
st an empty listing.
Round 1 of 10 on a /revise note, pushed as db79ff8a602e.
line
exit
tail
cargo test -p minimal task_list_in_a_session_only_project_says_no_task_boxes
0
running 1 test test tests::task_list_in_a_session_only_project_says_no_task_boxes ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 961 filtered out; finished in 0.35s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 34 filtered out; finished in 0.00s
Converted to a draft: something above needs a person before review.
Review threads the coder judged:
👍 valid — crates/minimal/src/tests.rs: The min box list check now renders the real listing for the session-only project, asserts the web session row and no empty line, and drops the always-true assert_ne.
In a project that holds only a session box, the test shows that min task list prints This project has no task boxes. The test also shows that min box list for the same project lists the session box web, not its empty line.
Notes from the agent: Revise round 1: only the min box list half of the test changed. It now reads the boxes from the local hosts, keeps the ones in the project, and renders them as the scoped min box list. It asserts a header and one session row for web, and no EMPTY_PROJECT_LIST line. The assert_ne is gone. crates/minimal/src/cmd/session.rs needed no change.
Re-run the failed jobs. If the same checks go red again on this head, the next failed suite starts a round; if this red is not the flake, /revise <note> starts one now.
The reason will be displayed to describe this comment to others. Learn more.
Re-read at db79ff8a. The one change since
8BD0
8fc8832d (besides the main merge) is the NIT: the min box list half of task_list_in_a_session_only_project_says_no_task_boxes now lists the project's real boxes and asserts the session row, so it can fail. Required CI is green; agent-verify fails only on #3398.
The reason will be displayed to describe this comment to others. Learn more.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of db79ff8a602e 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.
/revise One change, from the arch ruling on db79ff8a (arch_rulings 1267, condition C1). Change nothing else.
In crates/minimal/src/tests.rstask_list_in_a_session_only_project_says_no_task_boxes, the min box list half reads every box without a scope (cmd::read_host_boxes sends None) and then filters on project_root in the test. That copies the typed list's filter and does not prove the scope that min box list sends. cmd_box_list (crates/minimal/src/cmd/boxes/list.rs) sends it to the daemon in ListBoxes.
Do:
Replace the for host in local_hosts(&global) loop and its project_root filter with let mut client = connect_daemon(&global).await.unwrap(); and list_box_records(&mut client, Some(root.clone())), the way other tests in the file call it.
Map each record to cmd::ListedBox with the selected host's provider and host, and pass the result to cmd::render_box_list.
Keep the assertions: a header and one web session row, and no EMPTY_PROJECT_LIST line.
Run cargo test -p minimal task_list_in_a_session_only_project_says_no_task_boxes.
The box list half of task_list_in_a_session_only_project_says_no_task_boxes
now asks the daemon for the project's boxes through list_box_records, as
min box list does, in place of a filter in the test.
Round 2 of 10 on a /revise note, pushed as a6884fb77995.
line
exit
tail
cargo test -p minimal task_list_in_a_session_only_project_says_no_task_boxes
0
running 1 test test tests::task_list_in_a_session_only_project_says_no_task_boxes ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 961 filtered out; finished in 0.32s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 34 filtered out; finished in 0.00s
Converted to a draft: something above needs a person before review.
In a project that holds only a session box, min task list prints This project has no task boxes, and min box list, scoped to the project through ListBoxes as the command sends it, prints a header and the web session row and not its own empty line.
Notes from the agent: Revise round 2: the box list half of the test now connects with connect_daemon and calls list_box_records(&mut client, Some(root.clone())), maps the records to cmd::ListedBox with the selected host's provider and host, and renders them with cmd::render_box_list. The assertions are unchanged. crates/minimal/src/cmd/session.rs needed no change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Defect
Fixes #3351
crates/minimal/src/tests.rscrates/minimal/src/cmd/session.rsTask marker
Proof
A test now creates a project that holds only a session box. In that project, a scoped min task list prints "This project has no task boxes. Run
min task list --allto list the task boxes of every project." The line is not the min box list empty line. min box list still prints its own line, "This project has no boxes. ...", for a project with no boxes.Notes from the agent: The current code already prints the task-typed line through empty_typed_list. The new test passed on its first run, so crates/minimal/src/cmd/session.rs needs no change and I did not change it.
Tests
cargo test -p minimal task_list_in_a_session_only_project_says_no_task_boxesVerify
min task run agent-verifyexited 100, so this PR is a draft.test(minimal): task list in a session-only project says no task boxes8fc8832Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Bot user detected.
To trigger a single review, invoke the
@coderabbitai reviewcommand.c7e8ca92-92c2-483f-b3a5-a7cfaed0bb8eYou can disable this status message by setting the
reviews.review_statustofalsein the CodeRabbit configuration file.Use the checkbox below for a quick retry:
exec_run_attach_and_task_run_share_the_commands_tracemisses a daemon span under the cmd span #3398e2eactivate times out inConfigureLoadoutafter 60s #3399Uh oh!
There was an error while loading. Please reload this page.
Approved: no findings at
a6884fb77995.Nothing to do.
Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it.
Clobber: none.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimal-review— approvedVerdict
APPROVE— 1 finding, 1 inline.Panel: 3 of 3 personas ran (correctness, security, supply-chain).
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. L 8000 earn more.
Read at the current head against #3351 and #3203. A test-only PR is the right shape here: the behaviour #3203
asked for landed with #3297 on 2026-11-12, and this test pins it in the one case the existing empty-list test
cannot tell apart (a project that holds a session box and no task box). It first proves the session box is
there through the scoped session list, then asserts the exact task-typed line and an empty stderr; the line
comes from
empty_typed_listin session.rs, reached through the same functionmin task listcalls, andthe unwrapped call turns an error exit into a failure. Approving, with three small things to tidy:
fix(minimal)but nothing but a test changes; the squash commit wantstest(minimal).The title is 99 characters, so the shorter prefix keeps it under the limit.
comments cite a requirement id; "BCLI-030:", which #3203 itself names, matches them.
min box listcheck at tests.rs:13368 renders an empty list against a constant, so its not-equalassertion is always true (the bot's open nit). Either list the real project through the box-list code and
assert the
webrow, or drop those lines.Also: "Fixes #3351" closes only the task issue; #3203 should close against #3297 and this PR.
Checked and fine: the exact text and newline match what the code prints; no ordering or user-daemon
dependency (the test runs its own daemon as its neighbours do); the name follows the file's sentence style;
session.rs was in the task's "may touch" list only for the case the test did not need, so leaving it alone
was right. One known gap, shared with the sibling test: the project root is passed directly, so the
project-from-cwd step and minimal.toml are never read; the filter works on box records, so that is fine.
/revise One change, from the open NIT on
crates/minimal/src/tests.rs:13373(task_list_in_a_session_only_project_says_no_task_boxes). Change nothing else.The
min box listhalf callsrender_box_listwith an empty slice, so it never lists the project that holds the session box, and itsassert_neis always true because the two strings differ by constant text. Make it render the real listing for the session-only project (the session box in the list), and assert what the proof claims: the task listing says there are no task boxes, whilemin box listfor the same project shows the session box. Drop theassert_ne.Merge remote-tracking branch 'origin/main' into agent/3351-min-task-l…29a8610test(minimal): box list half lists the real session-only projectdb79ff8Round 1 of 10 on a /revise note, pushed as
db79ff8a602e.cargo test -p minimal task_list_in_a_session_only_project_says_no_task_boxesVerify
min task run agent-verifyexited 100.Converted to a draft: something above needs a person before review.
Review threads the coder judged:
crates/minimal/src/tests.rs: The min box list check now renders the real listing for the session-only project, asserts the web session row and no empty line, and drops the always-true assert_ne.In a project that holds only a session box, the test shows that min task list prints This project has no task boxes. The test also shows that min box list for the same project lists the session box web, not its empty line.
Notes from the agent: Revise round 1: only the min box list half of the test changed. It now reads the boxes from the local hosts, keeps the ones in the project, and renders them as the scoped min box list. It asserts a header and one session row for web, and no EMPTY_PROJECT_LIST line. The assert_ne is gone. crates/minimal/src/cmd/session.rs needed no change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimal-review— approval withheldVerdict
COMMENT— APPROVE withheld: 1 unresolved thread — minimal-foundry[bot] crates/minimal/src/tests.rs. No findings.Panel: 3 of 3 personas ran (correctness, security, supply-chain).
Every failing check on
db79ff8a602ematches an open known-flake issue, so the failed suite started no revise round:e2e: Flaky: macOSe2eactivate times out inConfigureLoadoutafter 60s #3399ci-macos-success: red becausee2eisRe-run the failed jobs. If the same checks go red again on this head, the next failed suite starts a round; if this red is not the flake,
/revise <note>starts one now.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Re-read at
db79ff8a. The one change since8BD0 8fc8832d(besides the main merge) is the NIT: themin box listhalf oftask_list_in_a_session_only_project_says_no_task_boxesnow lists the project's real boxes and asserts the session row, so it can fail. Required CI is green; agent-verify fails only on #3398.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimal-review— approvedVerdict
APPROVE— every review thread is resolved; @norrietaylor closed the last one. The review ofdb79ff8a602ewithheld 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./arch-review db79ff8
/revise One change, from the arch ruling on
db79ff8a(arch_rulings 1267, condition C1). Change nothing else.In
crates/minimal/src/tests.rstask_list_in_a_session_only_project_says_no_task_boxes, themin box listhalf reads every box without a scope (cmd::read_host_boxessendsNone) and then filters onproject_rootin the test. That copies the typed list's filter and does not prove the scope thatmin box listsends.cmd_box_list(crates/minimal/src/cmd/boxes/list.rs) sends it to the daemon inListBoxes.Do:
for host in local_hosts(&global)loop and itsproject_rootfilter withlet mut client = connect_daemon(&global).await.unwrap();andlist_box_records(&mut client, Some(root.clone())), the way other tests in the file call it.cmd::ListedBoxwith the selected host's provider and host, and pass the result tocmd::render_box_list.websession row, and noEMPTY_PROJECT_LISTline.cargo test -p minimal task_list_in_a_session_only_project_says_no_task_boxes.Merge remote-tracking branch 'origin/main' into agent/3351-min-task-l…08467d4test(minimal): box list half sends the project scope in ListBoxesa6884fbRound 2 of 10 on a /revise note, pushed as
a6884fb77995.cargo test -p minimal task_list_in_a_session_only_project_says_no_task_boxesVerify
min task run agent-verifyexited 100.Converted to a draft: something above needs a person before review.
In a project that holds only a session box, min task list prints This project has no task boxes, and min box list, scoped to the project through ListBoxes as the command sends it, prints a header and the web session row and not its own empty line.
Notes from the agent: Revise round 2: the box list half of the test now connects with connect_daemon and calls list_box_records(&mut client, Some(root.clone())), maps the records to cmd::ListedBox with the selected host's provider and host, and renders them with cmd::render_box_list. The assertions are unchanged. crates/minimal/src/cmd/session.rs needed no change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minimal-review— approvedVerdict
APPROVE— No findings.Panel: 3 of 3 personas ran (correctness, security, supply-chain).
/arch-review a6884fb
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved.
dbf9f7eUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Labels
3 participants