8000 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
[go: up one dir, main page]

Skip to content

fix(minimal): min task list in a project with only session boxes says the project has no task boxes - #3363

Merged
mitodrummer merged 5 commits into
mainfrom
agent/3351-min-task-list-in-a-project-with-only-session-box
Nov 14, 2026
Merged

mitodrummer merged 5 commits into
mainfrom
agent/3351-min-task-list-in-a-project-with-only-session-box

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

Defect

Fixes #3351

  • Epic: none; not charged to an epic
  • Size: S; estimated 0 code, 45 tests
  • May touch:
    • crates/minimal/src/tests.rs
    • crates/minimal/src/cmd/session.rs
Task marker
### 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

Verify

min task run agent-verify exited 100, so this PR is a draft.

 {
                "parent_span_id": "e83213e21b07961f",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "83883cda212d8e63",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "83883cda212d8e63",
                "queued_behind": "0",
                "span_id": "603abb81390b65ba",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "e83213e21b07961f",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "0fd8d7e3d4908318",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "0fd8d7e3d4908318",
                "queued_behind": "0",
                "span_id": "fc539fc86a968bf0",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "0fd8d7e3d4908318",
                "queued_behind": "0",
                "span_id": "612c4fbfb2bdbfd7",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "612c4fbfb2bdbfd7",
                "span_id": "0afea0bc82e60048",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "612c4fbfb2bdbfd7",
                "queued_behind": "0",
                "span_id": "2e5b3b32aebe6a19",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  63.090s] 1101 tests run: 1100 passed, 1 failed, 2 skipped
        FAIL [   2.786s] (1101/1101) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

A scoped min task list in a project that holds only a session box prints
the task-typed empty line, not the min box list empty line.
@coderabbitai
coderabbitai Bot commented Nov 13, 2026 •
Copy link
Copy Markdown
Contributor
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

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c7e8ca92-92c2-483f-b3a5-a7cfaed0bb8e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@minimal-foundry
minimal-foundry Bot commented Nov 13, 2026 •
Copy link
Copy Markdown
Contributor Author

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.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — 1 finding, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/minimal/src/tests.rs Resolved
@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 13, 2026
@bryan-minimal bryan-minimal left a comment
Copy link
Copy Markdown
Member

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_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.

@norrietaylor
Copy link
Copy Markdown
Member

/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.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "adeb69dcadc00954",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "41229b2411204fb6",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "41229b2411204fb6",
                "queued_behind": "0",
                "span_id": "30efc4148ff79647",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "adeb69dcadc00954",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "5147c4708e5164ef",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "5147c4708e5164ef",
                "queued_behind": "0",
                "span_id": "85d2a390bbba4621",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "5147c4708e5164ef",
                "queued_behind": "0",
                "span_id": "cad10f18cf3d10fa",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "cad10f18cf3d10fa",
                "span_id": "83bdb12947f40dc2",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "cad10f18cf3d10fa",
                "queued_behind": "0",
                "span_id": "a1b74843dc1d7288",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  66.457s] 1122 tests run: 1121 passed, 1 failed, 2 skipped
        FAIL [   2.836s] (1122/1122) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

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.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 13, 2026 19:01
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approval withheld

Verdict 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).

@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Nov 13, 2026
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Every failing check on db79ff8a602e matches an open known-flake issue, so the failed suite started no revise round:

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.

@norrietaylor
norrietaylor marked this pull request as ready for review November 13, 2026 20:54
@norrietaylor norrietaylor left a comment
Copy link
Copy Markdown
Member

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 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.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 13, 2026
@norrietaylor
Copy link
Copy Markdown
Member

/arch-review db79ff8

@norrietaylor
Copy link
Copy Markdown
Member

/revise One change, from the arch ruling on db79ff8a (arch_rulings 1267, condition C1). Change nothing else.

In crates/minimal/src/tests.rs task_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:

  1. 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.
  2. Map each record to cmd::ListedBox with the selected host's provider and host, and pass the result to cmd::render_box_list.
  3. Keep the assertions: a header and one web session row, and no EMPTY_PROJECT_LIST line.
  4. 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.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "299cc1c33f72f75f",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "d9cf677de3112333",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "d9cf677de3112333",
                "queued_behind": "0",
                "span_id": "b8f0c9a8937fbe68",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "299cc1c33f72f75f",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "3531bee88cbf7cff",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "3531bee88cbf7cff",
                "queued_behind": "0",
                "span_id": "76b8f79f54acf2b5",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "3531bee88cbf7cff",
                "queued_behind": "0",
                "span_id": "b05c9c06fb59048e",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "b05c9c06fb59048e",
                "span_id": "fdcafe2429bd2fc6",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "b05c9c06fb59048e",
                "queued_behind": "0",
                "span_id": "8554c7d516b9fed4",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  65.919s] 1122 tests run: 1121 passed, 1 failed, 2 skipped
        FAIL [   2.884s] (1122/1122) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

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.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 13, 2026 21:51
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@norrietaylor
norrietaylor marked this pull request as ready for review November 13, 2026 23:08
@norrietaylor
Copy link
Copy Markdown
Member

/arch-review a6884fb

@mitodrummer mitodrummer left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 14, 2026
Merged via the queue into main with commit dbf9f7e Nov 14, 2026
38 checks passed
@mitodrummer
mitodrummer deleted the agent/3351-min-task-list-in-a-project-with-only-session-box branch November 14, 2026 06:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

D3203 — min task list in a project with only session boxes says the project has no task boxes, and a test proves it

3 participants

0