8000 fix(minimal): a box created from min dash comes from a picked session entry and stores the same spec by minimal-foundry[bot] · Pull Request #3738 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimal): a box created from min dash comes from a picked session entry and stores the same spec - #3738

Merged
mitodrummer merged 11 commits into
mainfrom
agent/3731-a-box-created-from-min-dash-comes-from-a-picked
Nov 23, 2026
Merged

mitodrummer merged 11 commits into
mainfrom
agent/3731-a-box-created-from-min-dash-comes-from-a-picked

Conversation

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

Follow-up

Fixes #3731
Closes #3533

Task marker
### D3533 — A box created from min dash comes from a picked session entry and stores the same spec that min box start stores
  kind: task
  size: M
  est: 220 code, 160 tests
  executor: agent
  origin: bug
  epic: 2236
  layers:
    - shared:
      - crates/minimal/src/cmd/boxes/create.rs: extracts the entry expansion, contribution entry, stamp_session_spec_as and put_spec_hooks steps of activate_box into one helper that the dashboard can call, and removes the known-gap note
      test: cargo test -p minimal activation_puts_the_spec_on_the_create_request
    - dash:
      - crates/minimal/src/dash/rpc.rs: activate takes the picked entry, builds the request through the shared helper, and drops its own copy of the steps that the helper covers
      - crates/minimal/src/dash/app.rs: adds an Entry field to CreateForm with the project session entries and default preselected, carries it on Effect::Create to rpc::activate, and puts a refusal on the status line
      - crates/minimal/src/dash/render.rs: draws the entry field in the create form
      test: cargo test -p minimal dashboard_create_with_a_named_entry_stores_the_box_start_spec
      test: cargo test -p minimal create_form_preselects_the_default_session_entry
  proof: A box created in min dash with the entry dev has a stored spec and projection digest equal to those of min box start dev for the same project.

Residuals

Proof

In min dash, the create form (n) now has an entry field. It lists the project's session entries and preselects the entry that min session start picks with no entry (default when the project has one). Left, right and space change the entry. A box created with the entry dev gets the spec and the client projection digest that min box start dev puts on its create for the same project, through the same helper (put_session_entry). The test dashboard_create_with_a_named_entry_stores_the_box_start_spec checks this with min box start's own plan_start. A project with no session entry to offer, or a minimal.toml that does not load, closes the form and shows 'error: no session created: ' on the status line. Nothing is created.

Notes from the agent: Files outside the layers: (1) crates/minimal/tests/cli.rs: rpc::activate takes the picked entry as a new argument (PickedEntry), so the one integration call site passes PickedEntry::default(). Without that change, the test target does not compile. (2) crates/minimal/src/tests.rs: every_create_session_asserts_the_daemon_build inventories each CreateSessionRequest::new site. The new dash test builds requests, so the inventory gets one line for it. In create.rs, project_entries became pub(crate) so that the dashboard can list the entries. Behaviour: the dashboard still sends BoxPolicy::default() and ignores the project's network and egress keys. The CheckProject step of activate_box is not in the shared helper. So the spec is equal to min box start's only when the network and policy are equal: same mode, and no project egress or flags. At this head the dashboard refuses an entry that declares network, egress, ingress, secret or BEP settings, and tells the person to run min box start <entry>. Applying those settings from the dashboard is tracked in #3739, which lifts the refusal. The form's name is also the spec's [box] name, as min box start --name gives it. With no entry picked, put_picked_entry applies min session start's entry pick. An undeclared entry is refused before anything reaches the daemon. Expansi…[truncated]

Tests

line exit tail
cargo test -p minimal activation_puts_the_spec_on_the_create_request 0 t; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 43 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 18 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 fai
cargo test -p minimal dashboard_create_with_a_named_entry_stores_the_box_start_spec 0 running 1 test test dash::rpc::tests::dashboard_create_with_a_named_entry_stores_the_box_start_spec ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1067 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 43 filtered out
cargo test -p minimal create_form_preselects_the_default_session_entry 0 running 1 test test dash::app::tests::create_form_preselects_the_default_session_entry ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1067 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 43 filtered out; finished in

Verify

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

5) minimal::bin/min tests::invalid_project_file_for_box_spec_says_spec_cannot_show
        PASS [   0.010s] (1210/1235) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.010s] (1211/1235) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.010s] (1212/1235) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.010s] (1213/1235) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.011s] (1214/1235) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.009s] (1215/1235) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.008s] (1216/1235) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.010s] (1217/1235) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.008s] (1218/1235) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.008s] (1219/1235) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.010s] (1220/1235) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.009s] (1221/1235) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.009s] (1222/1235) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.011s] (1223/1235) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.009s] (1224/1235) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.010s] (1225/1235) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.010s] (1226/1235) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.009s] (1227/1235) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.011s] (1228/1235) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.013s] (1229/1235) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.011s] (1230/1235) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.009s] (1231/1235) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.009s] (1232/1235) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.010s] (1233/1235) minimal::bin/min tests::type_refusals_exit_3_and_4
        PASS [   2.077s] (1234/1235) minimal::named_vm named_vm_reaches_autospawn
  stdout ───

    running 1 test
    test exec_run_attach_and_task_run_share_the_commands_trace ... FAILED

    failures:

    failures:
        exec_run_attach_and_task_run_share_the_commands_trace

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 5 filtered out; finished in 13.32s

  stderr ───

    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
error: test run failed

Base

The base branch moved while the coder worked and was merged in before the tests ran. These files changed on BOTH sides since the branch point — read them first, because a rewrite from a stale reading can undo a merge without a conflict:

  • crates/minimal/src/cmd/boxes/create.rs
  • crates/minimal/src/dash/app.rs
  • crates/minimal/src/dash/render.rs
  • crates/minimal/src/dash/rpc.rs
  • crates/minimal/src/tests.rs

Out of scope

These files are outside the task's layers:, so this PR is a draft:

  • crates/minimal/src/tests.rs
  • crates/minimal/tests/cli.rs

activate_box ran the entry expansion, the contribution entry, the spec
stamp and the spec hooks inline. put_session_entry runs them, so the
dashboard's create can call the same steps. The known-gap note on
stamp_session_spec is gone.
The create form gets an entry field with the project's session entries
and the default entry preselected. The dashboard's activate puts the
picked entry on the create through put_session_entry, so the box stores
the spec and digest that min box start <entry> stores. A project with
no session entry to offer is refused on the status line.
@coderabbitai
coderabbitai Bot commented Nov 23, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

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

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: 72ded6c1-3f9e-4a9e-805c-47d45d576393

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

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

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

Reviewed: no findings; approval withheld, 10 threads unresolved at c05e12c8ce43.

APPROVE withheld: 10 unresolved threads — minimal-arch[bot] crates/minimal/src/dash/rpc.rs:934, minimal-arch[bot] crates/minimal/src/dash/rpc.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/dash/rpc.rs:937, minimal-foundry[bot] crates/minimal/src/dash/rpc.rs:967, …. 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.

Clobber: Not checked in depth, since it is outside the supply-chain remit. If that was not intentional, restore the earlier change.

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

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 23, 2026
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: CONDITIONS · 2 conditions · the full ruling

The shared helper is correct, and a plain entry now gets the same stored spec from min dash as from min box start. For an entry that declares [network], [secrets] or BEP keys, the dashboard stores BoxPolicy::default() as [network] but the entry's [secrets], with no CheckProject check. The design says an entry expands into one Box Spec, and the stored spec and its projection carry the same value (lines 61, 1336–1346, 477). C1 refuses those entries in put_picked_entry before the daemon. C2 files an issue for the parity work and corrects the two comments that claim the specs are the same.

Ruled at b9f53d3 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

// The pick `min session start` makes: a typed entry the project does
// not declare as a session is refused, and no entry picks one.
let entries = crate::project_entries(&dir)?;
let entry = crate::pick_session_start_entry(&entries, picked.name.as_deref())?.name;
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C1 · After this pick, refuse an entry whose expansion has egress, ingress, [secrets], BEP settings, env or quic443. spec_flags takes [network] from BoxPolicy::default() on this path, and [secrets] comes from the expansion. The stored spec is then not the entry's expansion (Policy layers, lines 1336–1346). Add a test for the refusal.

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.

Addressed in 2f66a35de95d: put_picked_entry now refuses an entry with egress, ingress, secrets, BEP settings, env or quic443 before put_session_entry, with two tests for the refusal (#3739 lifts it).

Comment thread crates/minimal/src/dash/rpc.rs Outdated
// through.
request.must_match_version = minimal_client::version_assertion();
// The picked entry's expansion, the project root and the box's spec,
// through the helper `min box start` uses, so both store one spec for
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C2 · This comment says the dashboard and min box start store one spec for one entry. That is true only for an entry with no network or secret keys, because this request has BoxPolicy::default(). Say that the caller gives the network and policy, and name the C2 issue.

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.

Addressed in 2f66a35de95d: The comment in activate() now says the network and policy come from the caller, only activate_box sets them from the project, and names #3739.

Comment thread crates/minimal/src/cmd/boxes/create.rs Outdated

/// The session entry a create starts a box from, and what its expansion
/// reads. `min session activate`, `min box start` and the dashboard's
/// create fill it in, so the three store the same spec for one entry.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C2 · put_session_entry takes the network and policy from the request. Only activate_box sets them from the project in CheckProject. Replace so the three store the same spec for one entry with that fact, and name the C2 issue.

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.

Addressed in 2f66a35de95d: The SessionEntryCreate doc now says put_session_entry takes network and policy from the caller, only activate_box sets them from the project, and names #3739.

@agent-137
Copy link
Copy Markdown
Member

/revise

Arch ruling CONDITIONS on b9f53d3 (2 conditions). The off-plan lines in crates/minimal/src/tests.rs and crates/minimal/tests/cli.rs stand. C2's parity work is filed as #3739. Apply both:

  • C1: In crates/minimal/src/dash/rpc.rs put_picked_entry(), after the entry is picked and before crate::put_session_entry, refuse the create when the picked entry's expansion carries settings the dashboard does not apply: crate::project_egress(&dir, Some(&entry)) with a policy or an ingress, or crate::project_bep_and_grants(&dir, Some(&entry)) with a non-empty SecretGrants, a non-default BepSettings, a non-empty env list, or a Quic443 stance. The error reason is exactly the entry <name> declares network or secret settings that min dash does not apply. Run min box start <name>. with the entry's name filled in. The existing error: no session created: <reason> status line shows it. Add tests in dash::rpc::tests: a picked entry that declares [network.egress], and one that declares [secrets], are each refused by put_picked_entry with no spec put on the request. Name min dash: apply the project's network, secret and grant checks when it creates a box from an entry #3739 in a comment above the refusal, as the issue that lifts it.
  • C2: Replace so the three store the same spec for one entry in the SessionEntryCreate doc comment (crates/minimal/src/cmd/boxes/create.rs) and so both store one spec for one entry in the comment in activate() (crates/minimal/src/dash/rpc.rs) with text that says the request's network and policy come from the caller, and that only activate_box sets them from the project. Name min dash: apply the project's network, secret and grant checks when it creates a box from an entry #3739 in both.

In the PR body, replace a candidate follow-up with #3739, and add - #3739 under a ## Residuals heading. Keep the Fixes #3731 and Closes #3533 lines.

The dashboard's create request carries its own network and policy, so
an entry that declares egress, ingress, secrets or BEP settings would
store a spec that is not its expansion. Refuse it until #3739, and say
in the comments that only activate_box sets those from the project.
The new assert_dashboard_refuses_entry_with helper builds a create
request that it never sends. The inventory test lists every such site,
so it failed until the helper was in the list.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note, pushed as 2f66a35de95d.

line exit tail
cargo test -p minimal activation_puts_the_spec_on_the_create_request 0 t; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 43 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 18 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 fai
cargo test -p minimal dashboard_create_with_a_named_entry_stores_the_box_start_spec 0 running 1 test test dash::rpc::tests::dashboard_create_with_a_named_entry_stores_the_box_start_spec ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1069 filtered out; finished in 0.02s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 43 filtered out
cargo test -p minimal create_form_preselects_the_default_session_entry 0 running 1 test test dash::app::tests::create_form_preselects_the_default_session_entry ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1069 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 43 filtered out; finished in

Verify min task run agent-verify exited 100.

7) minimal::bin/min tests::invalid_project_file_for_box_spec_says_spec_cannot_show
        PASS [   0.009s] (1212/1237) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.010s] (1213/1237) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.010s] (1214/1237) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.010s] (1215/1237) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.011s] (1216/1237) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.010s] (1217/1237) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.010s] (1218/1237) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.009s] (1219/1237) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.010s] (1220/1237) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.010s] (1221/1237) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.008s] (1222/1237) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.010s] (1223/1237) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.008s] (1224/1237) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.010s] (1225/1237) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.010s] (1226/1237) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.009s] (1227/1237) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.009s] (1228/1237) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.013s] (1229/1237) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.011s] (1230/1237) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.011s] (1231/1237) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.011s] (1232/1237) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.009s] (1233/1237) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.010s] (1234/1237) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.009s] (1235/1237) minimal::bin/min tests::type_refusals_exit_3_and_4
        PASS [   2.066s] (1236/1237) minimal::named_vm named_vm_reaches_autospawn
  stdout ───

    running 1 test
    test exec_run_attach_and_task_run_share_the_commands_trace ... FAILED

    failures:

    failures:
        exec_run_attach_and_task_run_share_the_commands_trace

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 5 filtered out; finished in 13.26s

  stderr ───

    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
error: test run failed

Outside the task's layers::

  • crates/minimal/src/tests.rs
  • crates/minimal/tests/cli.rs

Converted to a draft: verify exited 100; outside the task's layers:: crates/minimal/src/tests.rs.

Review threads the coder judged:

A box created in min dash with the entry dev has a stored spec and projection digest equal to those of min box start dev for the same project. An entry that declares network or secret settings is refused on the min dash status line with: error: no session created: the entry declares network or secret settings that min dash does not apply. Run min box start .

Notes from the agent: C1: put_picked_entry now refuses an entry whose project_egress has a policy or ingress, or whose project_bep_and_grants has grants, non-default BepSettings, env, or a quic443 stance. The reason text is the exact wording from the directive. A comment above the refusal names #3739. Two new tests in dash::rpc::tests (dashboard_create_refuses_an_entry_that_declares_network_egress, dashboard_create_refuses_an_entry_that_declares_secrets) check the refusal and that no spec and no expansion are put on the request. C2: both comments now say the network and policy come from the caller and only activate_box sets them from the project, and name #3739. PR body: the runner writes it, so I did not change it. The directive asks to replace 'a candidate follow-up' with #3739, add '- #3739' under a '## Residuals' heading, and keep the 'Fixes #3731' and 'Closes #3533' lines. cargo clippy -p minimal --all-targets is clean, and cargo fmt is applied.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 23, 2026 18:09
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: CONDITIONS · 1 condition · the full ruling

C1 is met. put_picked_entry refuses an entry with network or secret settings before the daemon sees the create, and two tests check the refusal. C2 is half met. The comments in create.rs and rpc.rs name #3739. The PR body still says "a candidate follow-up" and gives no issue URL. Put the issue URL in the body in place of that text, as C2 says. Then the residual is filed, and the change conforms.

Ruled at 2f66a35 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

let entry = crate::pick_session_start_entry(&entries, picked.name.as_deref())?.name;
// This request carries the network and policy the dashboard gives it,
// not the entry's. So an entry that declares network or secret settings
// would store a spec that is not its expansion. Refuse it until #3739
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C2 · This comment names #3739, and that is correct. The PR body still says "a candidate follow-up". Put the URL of #3739 in the body in place of that text.

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.

Addressed in a825911b5837: The pull request body names #3739 in place of the candidate follow-up text, and the ruling on 2f66a35 counts this condition met. No code change was needed.

@agent-137
agent-137 marked this pull request as ready for review November 23, 2026 18:49
@agent-137
Copy link
Copy Markdown
Member

/arch-review

@agent-137
Copy link
Copy Markdown
Member

/review

@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 — advisory review

Verdict COMMENT — 1 finding, 1 inline.

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

Comment on lines +941 to +962
if egress.policy.is_some()
|| egress.ingress.is_some()
|| !grants.is_empty()
|| bep != boxes::core::bep::BepSettings::default()
|| !env.is_empty()
|| quic443.is_some()
{
tracing::debug!(
entry = %entry,
egress = egress.policy.is_some(),
ingress = egress.ingress.is_some(),
grants = grants.len(),
env = env.len(),
quic443 = ?quic443,
"dashboard create refused: the entry declares network or secret settings"
);
anyhow::bail!(
"the entry {entry} declares network or secret settings that min dash does not apply. \
Run min box start {entry}."
);
}
crate::put_session_entry(
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.

MEDIUM · correctness · confidence 0.50 · in put_picked_entry

The new guard in put_picked_entry refuses every entry whose expansion has egress, ingress, grants, env, BEP or quic443 settings. A project layer such as [defaults.network.egress] reaches every session entry. So min dash can no longer create a box for such a project. Before this change it created the box. The refusal is deliberate and the code defers it to #3739. Still, it turns a working path into a hard failure for these projects. Apply the settings from the project, or keep the old behaviour until #3739 lands.

What the reviewer checked

if egress.policy.is_some() || egress.ingress.is_some() || !grants.is_empty() || bep != BepSettings::default() || !env.is_empty() || quic443.is_some() { anyhow::bail!(...) }

Hand this to an agent
Act on a code-review finding.

File:       crates/minimal/src/dash/rpc.rs
Lines:      941-962
Category:   correctness
Severity:   medium (reviewer confidence 0.50)

Finding:
The new guard in `put_picked_entry` refuses every entry whose expansion has egress, ingress, grants, env, BEP or quic443 settings. A project layer such as `[defaults.network.egress]` reaches every session entry. So `min dash` can no longer create a box for such a project. Before this change it created the box. The refusal is deliberate and the code defers it to #3739. Still, it turns a working path into a hard failure for these projects. Apply the settings from the project, or keep the old behaviour until #3739 lands.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

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.

Disputed — not addressed: The refusal is deliberate. Thread PRRT_kwDOPdfcxM6695ao (C1) asked for it in round 1. The old path was not a working path: dash/rpc.rs builds the request with BoxPolicy::default(), so egress is None. A project with [defaults.network.egress] got a box without its declared egress rules, and no message said so. To apply the settings, the dash needs the grant, store and GitHub checks of activate_box's CheckProject step. That work is #3739, and it is outside this task.

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

Round 2 of 10 on the runtime's review findings: the coder changed nothing. Revise round 2 changed no code, so the diff of this round is empty. The follow-up for the network and secret settings in min dash is #3739. Use this URL in the pull request body in place of the text "a candidate follow-up". The coder has no credential to edit the body. I ran no test: line this round, because no file changed since the last round.

Review threads the coder judged:

  • 👎 invalid — crates/minimal/src/dash/rpc.rs:962: The refusal is deliberate. Thread PRRT_kwDOPdfcxM6695ao (C1) asked for it in round 1. The old path was not a working path: dash/rpc.rs builds the request with BoxPolicy::default(), so egress is None. A project with [defaults.network.egress] got a box without its declared egress rules, and no message

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: CONDITIONS · 1 condition · the full ruling

The shared helper put_session_entry is in the right place, and activate_box and the dashboard both use it. The dashboard refusal in put_picked_entry does not check the entry's [network] mode. An entry that declares only mode = "none" is accepted. The box then gets the preselected host_ip, but min box start gives that box no network. The design permits only a network override that the create was given (line 1346), and it requires default-deny networking (line 339). Make the change in C1: refuse a declared mode that is not the request's mode, and add the test.

Ruled at 2f66a35 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

// applies those settings here, as `activate_box` does.
let egress = crate::project_egress(&dir, Some(&entry))?;
let (bep, grants, env, quic443) = crate::project_bep_and_grants(&dir, Some(&entry))?;
if egress.policy.is_some()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

C1 · This predicate does not read egress.mode. An entry with only [network] mode = "none" is accepted, and the box gets the form's preselected host_ip. Add egress.mode.is_some_and(|mode| mode != request.config.network) to the predicate. Add mode = ?egress.mode to the debug fields. Add a test that calls assert_dashboard_refuses_entry_with with that table.

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.

Addressed in a825911b5837: put_picked_entry now refuses an entry whose network.mode differs from the form's mode, logs mode = ?egress.mode, and dashboard_create_refuses_an_entry_whose_network_mode_differs pins it.

@agent-137
Copy link
Copy Markdown
Member

/revise

Arch ruling CONDITIONS on 2f66a35 (1 condition). C1 and C2 of the ruling on b9f53d3 are met, and the body now names #3739. Apply:

The minimal-foundry finding at rpc.rs:962 (a project-level [defaults.network.egress] is refused too) needs no code change: such an entry's min box start spec carries that egress, which the dashboard does not apply, so the refusal is the intended interim until #3739. Reply to that thread saying so. Reply to the arch threads whose conditions the ruling counts met. Keep the Fixes #3731 and Closes #3533 lines and the ## Residuals entry for #3739.

The dashboard applies the form's network mode, not the entry's. An entry
whose network.mode differs would store a spec that is not its expansion,
so refuse it until #3739, as the other network settings are.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a /revise note, pushed as a825911b5837.

line exit tail
cargo test -p minimal activation_puts_the_spec_on_the_create_request 0 t; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 18 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 fai
cargo test -p minimal dashboard_create_with_a_named_entry_stores_the_box_start_spec 0 running 1 test test dash::rpc::tests::dashboard_create_with_a_named_entry_stores_the_box_start_spec ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1088 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out
cargo test -p minimal create_form_preselects_the_default_session_entry 0 running 1 test test dash::app::tests::create_form_preselects_the_default_session_entry ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1088 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out; finished in

Verify min task run agent-verify exited 100.

/min tests::init_refusals_exit_with_their_codes
        PASS [   0.007s] (1233/1258) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.010s] (1234/1258) minimal::bin/min tests::invalid_project_file_for_box_spec_says_spec_cannot_show
        PASS [   0.011s] (1235/1258) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.006s] (1236/1258) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.008s] (1237/1258) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.007s] (1238/1258) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.013s] (1239/1258) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.007s] (1240/1258) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.010s] (1241/1258) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.012s] (1242/1258) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.007s] (1243/1258) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.008s] (1244/1258) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.008s] (1245/1258) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.011s] (1246/1258) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.007s] (1247/1258) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.014s] (1248/1258) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.007s] (1249/1258) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.013s] (1250/1258) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.009s] (1251/1258) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.006s] (1252/1258) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.010s] (1253/1258) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.009s] (1254/1258) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.007s] (1255/1258) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.015s] (1256/1258) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.011s] (1257/1258) minimal::bin/min tests::type_refusals_exit_3_and_4
  stdout ───

    running 1 test
    test exec_run_attach_and_task_run_share_the_commands_trace ... FAILED

    failures:

    failures:
        exec_run_attach_and_task_run_share_the_commands_trace

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 5 filtered out; finished in 13.86s

  stderr ───

    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
error: test run failed

Outside the task's layers::

  • crates/minimal/src/tests.rs
  • crates/minimal/tests/cli.rs

Converted to a draft: verify exited 100; outside the task's layers:: crates/minimal/src/tests.rs, crates/minimal/tests/cli.rs.

Review threads the coder judged:

A box created in min dash with the entry dev has a stored spec and projection digest equal to those of min box start dev for the same project. An entry whose network mode differs from the form's mode is now refused before the daemon sees the create, so the dashboard never stores a spec that differs from the entry's expansion.

Notes from the agent: Round 3 applies ruling C1: put_picked_entry() refuses an entry whose network.mode differs from the form's mode, logs mode = ?egress.mode in the debug refusal, and the #3739 comment names the mode refusal. New test dashboard_create_refuses_an_entry_whose_network_mode_differs. An entry whose mode equals the form's mode stays accepted by the predicate. The minimal-foundry thread at rpc.rs:962 (PRRT_kwDOPdfcxM67Aq0B) was already answered invalid and the verdict does not change: a project-level [defaults.network.egress] is in the min box start spec of that entry, the dashboard does not apply it, so the refusal is the intended interim until #3739. clippy -p minimal --all-targets is clean. Keep the Fixes #3731 and Closes #3533 lines and the Residuals entry for #3739 in the body.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 23, 2026 19:41
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS · the full ruling

C1 is met. put_picked_entry() now refuses an entry whose network.mode differs from the form's mode, and it logs the mode. The new test checks the refusal with a none entry against a host_ip form. The merge of main does not change the steps that this PR shares. The other settings that the dashboard does not apply stay refused until #3739.

Ruled at a825911 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

@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 — advisory review

Verdict COMMENT — 2 findings, 2 inline.

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

Comment on lines +942 to +966
if egress.policy.is_some()
|| egress
.mode
.is_some_and(|mode| mode != request.config.network)
|| egress.ingress.is_some()
|| !grants.is_empty()
|| bep != boxes::core::bep::BepSettings::default()
|| !env.is_empty()
|| quic443.is_some()
{
tracing::debug!(
entry = %entry,
egress = egress.policy.is_some(),
mode = ?egress.mode,
ingress = egress.ingress.is_some(),
grants = grants.len(),
env = env.len(),
quic443 = ?quic443,
"dashboard create refused: the entry declares network or secret settings"
);
anyhow::bail!(
"the entry {entry} declares network or secret settings that min dash does not apply. \
Run min box start {entry}."
);
}
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.

MEDIUM · correctness · confidence 0.50 · in put_picked_entry

put_picked_entry now refuses any entry that declares egress policy, ingress, a differing network.mode, grants, env or BEP settings. min dash could create such a project before. Now it cannot, and the user must use min box start. Network egress in [defaults.network.egress] is a common setting. This turns a missing-spec bug into a blocked create for those projects. Apply the settings, as activate_box does, or confirm the maintainers accept the block until #3739.

What the reviewer checked

if egress.policy.is_some() || egress.mode.is_some_and(|mode| mode != request.config.network) || egress.ingress.is_some() || !grants.is_empty() ... anyhow::bail!("the entry {entry} declares network or secret settings that min dash does not apply...")

Hand this to an agent
Act on a code-review finding.

File:       crates/minimal/src/dash/rpc.rs
Lines:      942-966
Category:   correctness
Severity:   medium (reviewer confidence 0.50)

Finding:
`put_picked_entry` now refuses any entry that declares egress policy, ingress, a differing `network.mode`, grants, env or BEP settings. `min dash` could create such a project before. Now it cannot, and the user must use `min box start`. Network egress in `[defaults.network.egress]` is a common setting. This turns a missing-spec bug into a blocked create for those projects. Apply the settings, as `activate_box` does, or confirm the maintainers accept the block until #3739.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

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.

Disputed — not addressed: The block is deliberate. Review finding C1 (thread PRRT_kwDOPdfcxM6695ao) asked for this refusal. Without it, the dash stores a spec that is not the entry's expansion, because the request carries the form's network and a default policy. That is the bug this task fixes. The code names #3739 as the change that applies these settings, and the refusal tells the user to run min box start . Applying egress, grants, env and BEP here belongs to #3739, not to this task.

Comment thread crates/minimal/src/dash/app.rs Outdated
Comment on lines +134 to +146
fn read_entries(&mut self) {
let path = self.path.trim().to_string();
let choices = session_entry_choices(camino::Utf8Path::new(&path));
if let Err(reason) = &choices {
tracing::debug!(path = %path, reason = %reason, "the create form offers no session entry");
}
(self.entries, self.entry_idx) = match choices {
Ok((names, picked)) => (Ok(names), picked),
Err(reason) => (Err(reason), 0),
};
self.entries_for = path;
}

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.

LOW · correctness · confidence 0.50 · in CreateForm::read_entries

read_entries reads and parses minimal.toml synchronously. It runs from update_modal on Tab, BackTab, Enter and submit, and from CreateForm::new on n. That is the TUI event path. A slow or stalled mount freezes the dashboard. The same diff moves the equivalent reads in rpc.rs off the worker for this reason. Also, sync_entries compares only the path, so an edited minimal.toml is not read again while the form stays open.

What the reviewer checked

fn read_entries(&mut self) { ... let choices = session_entry_choices(camino::Utf8Path::new(&path)); ... } called from sync_entries in update_modal

Hand this to an agent
Act on a code-review finding.

File:       crates/minimal/src/dash/app.rs
Lines:      134-146
Category:   correctness
Severity:   low (reviewer confidence 0.50)

Finding:
`read_entries` reads and parses `minimal.toml` synchronously. It runs from `update_modal` on Tab, BackTab, Enter and submit, and from `CreateForm::new` on `n`. That is the TUI event path. A slow or stalled mount freezes the dashboard. The same diff moves the equivalent reads in `rpc.rs` off the worker for this reason. Also, `sync_entries` compares only the path, so an edited `minimal.toml` is not read again while the form stays open.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

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.

Addressed in 416a789abd2f: Moved the minimal.toml read to a background task (Effect::ReadEntries and Msg::EntriesRead). The entry field shows reading… until the read returns. The form reads the file again each time the focus reaches the entry field, so an edit shows.

The create form read minimal.toml on each Tab and Enter, so a stalled
mount froze the dashboard. A background task now reads the entries and
returns them as a message. The entry field shows reading… until the read
returns, and the entry field reads minimal.toml again on each focus.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 4 of 10 on the runtime's review findings, pushed as 416a789abd2f.

line exit tail
cargo test -p minimal activation_puts_the_spec_on_the_create_request 0 t; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 18 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 fai
cargo test -p minimal dashboard_create_with_a_named_entry_stores_the_box_start_spec 0 running 1 test test dash::rpc::tests::dashboard_create_with_a_named_entry_stores_the_box_start_spec ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1088 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out
cargo test -p minimal create_form_preselects_the_default_session_entry 0 running 1 test test dash::app::tests::create_form_preselects_the_default_session_entry ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1088 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out; finished in

Verify min task run agent-verify exited 100.

lid_project_file_for_box_spec_says_spec_cannot_show
        PASS [   0.011s] (1233/1258) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.014s] (1234/1258) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.015s] (1235/1258) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.012s] (1236/1258) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.009s] (1237/1258) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.010s] (1238/1258) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.008s] (1239/1258) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.011s] (1240/1258) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.009s] (1241/1258) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.008s] (1242/1258) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.009s] (1243/1258) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.009s] (1244/1258) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.009s] (1245/1258) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.009s] (1246/1258) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.008s] (1247/1258) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.008s] (1248/1258) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.009s] (1249/1258) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.008s] (1250/1258) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.010s] (1251/1258) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.009s] (1252/1258) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.008s] (1253/1258) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.007s] (1254/1258) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.012s] (1255/1258) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.008s] (1256/1258) minimal::bin/min tests::type_refusals_exit_3_and_4
        PASS [   1.035s] (1257/1258) minimal::otel_cli a_silent_collector_costs_min_ls_little_and_prints_nothing
  stdout ───

    running 1 test
    test exec_run_attach_and_task_run_share_the_commands_trace ... FAILED

    failures:

    failures:
        exec_run_attach_and_task_run_share_the_commands_trace

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 5 filtered out; finished in 13.86s

  stderr ───

    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
error: test run failed

Outside the task's layers::

  • crates/minimal/src/tests.rs
  • crates/minimal/tests/cli.rs

Converted to a draft: verify exited 100; outside the task's layers:: crates/minimal/src/tests.rs, crates/minimal/tests/cli.rs.

Review threads the coder judged:

  • 👎 invalid — crates/minimal/src/dash/rpc.rs:966: The block is deliberate. Review finding C1 (thread PRRT_kwDOPdfcxM6695ao) asked for this refusal. Without it, the dash stores a spec that is not the entry's expansion, because the request carries the form's network and a default policy. That is the bug this task fixes. The code names min dash: apply the project's network, secret and grant checks when it creates a box from an entry #3739 as the ch
  • 👍 valid — crates/minimal/src/dash/app.rs: Moved the minimal.toml read to a background task (Effect::ReadEntries and Msg::EntriesRead). The entry field shows reading… until the read returns. The form reads the file again each time the focus reaches the entry field, so an edit shows.

A box created in min dash with the entry dev has a stored spec and projection digest equal to those of min box start dev for the same project. The dashboard_create_with_a_named_entry_stores_the_box_start_spec test shows this. An entry with network or secret settings is still refused with a pointer to min box start until #3739.

Notes from the agent: Round 4. The create form no longer reads minimal.toml on the key path. A new Effect::ReadEntries runs the read on a spawn_blocking task, and Msg::EntriesRead brings the result back. The entry field shows reading… until the read for the current path returns. A submit before that point keeps the form open and asks for the read again. Each time the focus reaches the entry field, the form reads minimal.toml again, so an edit made while the form is open shows. A picked entry stays picked when the project still declares it. I also changed create_from_a_host_header_targets_that_host so that it runs the read the form asks for. cargo test -p minimal dash:: passed: 73 tests. cargo clippy -p minimal --all-targets reported no warnings. I did not run just clippy-strict.

@agent-137
agent-137 marked this pull request as ready for review November 23, 2026 20:22
@agent-137
Copy link
Copy Markdown
Member

/arch-review

@agent-137
Copy link
Copy Markdown
Member

/review

@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 — advisory review

Verdict COMMENT — 2 findings, 2 inline.

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

Comment on lines +940 to +965
let egress = crate::project_egress(&dir, Some(&entry))?;
let (bep, grants, env, quic443) = crate::project_bep_and_grants(&dir, Some(&entry))?;
if egress.policy.is_some()
|| egress
.mode
.is_some_and(|mode| mode != request.config.network)
|| egress.ingress.is_some()
|| !grants.is_empty()
|| bep != boxes::core::bep::BepSettings::default()
|| !env.is_empty()
|| quic443.is_some()
{
tracing::debug!(
entry = %entry,
egress = egress.policy.is_some(),
mode = ?egress.mode,
ingress = egress.ingress.is_some(),
grants = grants.len(),
env = env.len(),
quic443 = ?quic443,
"dashboard create refused: the entry declares network or secret settings"
);
anyhow::bail!(
"the entry {entry} declares network or secret settings that min dash does not apply. \
Run min box start {entry}."
);
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.

MEDIUM · correctness · confidence 0.55 · in put_picked_entry

Every dashboard create now fails for a project whose picked entry, or its defaults layer, declares egress, ingress, a network mode other than the form's, secrets or BEP settings. Before this change the dashboard created such a box and ignored those settings. The user now has no way to create the box from min dash at all. The workaround is min box start. The code comment says #3739 will lift this. Until then the fix traded a missing spec for a blocked create. Apply the project's network and policy in the dashboard instead, or confirm that the block is intended.

What the reviewer checked

rpc.rs: if egress.policy.is_some() || egress.mode.is_some_and(|mode| mode != request.config.network) || egress.ingress.is_some() || !grants.is_empty() ... bail!("... min dash does not apply. Run min box start ...")

Hand this to an agent
Act on a code-review finding.

File:       crates/minimal/src/dash/rpc.rs
Lines:      940-965
Category:   correctness
Severity:   medium (reviewer confidence 0.55)

Finding:
Every dashboard create now fails for a project whose picked entry, or its defaults layer, declares egress, ingress, a network mode other than the form's, secrets or BEP settings. Before this change the dashboard created such a box and ignored those settings. The user now has no way to create the box from `min dash` at all. The workaround is `min box start`. The code comment says #3739 will lift this. Until then the fix traded a missing spec for a blocked create. Apply the project's network and policy in the dashboard instead, or confirm that the block is intended.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

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.

The block is intended. Arch condition C1 (rulings on b9f53d3 and 2f66a35) asked for it: before this change the dashboard created such a box with BoxPolicy::default(), so the box did not get the network, egress or secret settings its entry declares, and from this PR on it would also store a spec that is not the entry's expansion. Refusing, with Run min box start <entry>, fails closed. #3739, a must-have, applies the project's checks and grants on the dashboard path and lifts the refusal.

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.

Disputed — not addressed: The block is intended. Before this PR, min dash stored a spec that was not the entry's expansion, which is the bug this task fixes. Until #3739 applies the project's network and policy in the dashboard, the create is refused with the min box start command as the next step. Applying them here is #3739's scope, not this task's.

Comment on lines +1064 to +1068
if !form.entries_current() {
let read = form.read_request();
model.action = Some(Action::Create(form));
return vec![read];
}
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.

LOW · correctness · confidence 0.50 · in CreateForm::entries_current

With an empty path, entries_for (empty) equals the trimmed path, so entries_current() is true while entries still holds the placeholder reading the session entries. No read is asked. Submit then closes the form with error: no session created: reading the session entries, which is false. Treat the placeholder as not current, or refuse an empty path with its own message.

What the reviewer checked

CreateForm::new: entries: Err(ENTRIES_READING), entries_for: String::new(); entries_current: self.entries_for == self.path.trim()

Hand this to an agent
Act on a code-review finding.

File:       crates/minimal/src/dash/app.rs
Lines:      1064-1068
Category:   correctness
Severity:   low (reviewer confidence 0.50)

Finding:
With an empty path, `entries_for` (empty) equals the trimmed path, so `entries_current()` is true while `entries` still holds the placeholder `reading the session entries`. No read is asked. Submit then closes the form with `error: no session created: reading the session entries`, which is false. Treat the placeholder as not current, or refuse an empty path with its own message.

First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.

👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.

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.

Addressed in 3008a9a6a850: entries_for is now Option, None until a read returns, so the placeholder is never current. An empty path reads as 'the project path is empty', and the test covers it.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS · the full ruling

The compare reads the create form's session entries on a background task and not on the event path. The create still expands the picked entry through put_session_entry, as min box start does. So the stored spec and the projection come from one expansion (architecture.md line 61, gatehouse-spec.md §6.3.2). A submit before the read comes back creates nothing, and put_picked_entry checks the entry again at create time. The ruling at a825911b stands for the rest of the change. #3739 stays the filed residual.

Ruled at 416a789 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

The form treated an empty path as read before any read came back, so a
submit closed it with the placeholder as the reason. The form now marks
no read as current until one returns, and an empty path reads as its
own refusal.
@agent-137
Copy link
Copy Markdown
Member

/revise

Arch PASS on 416a789. Act on the LOW finding at crates/minimal/src/dash/app.rs:1068 (CreateForm::entries_current): with an empty project path, entries_for (empty) equals the trimmed path, so the placeholder reading the session entries counts as current, no read is asked, and submit closes the form with a false error.

  • Treat the placeholder as not current: entries_current() is false while entries holds ENTRIES_READING.
  • Refuse a submit whose project path is empty, before any read or create, with the status line error: no session created: the project path is empty.
  • Add a test in dash::app::tests that clears the path, submits, and asserts that exact status line and that no create effect is emitted.

The MEDIUM finding at rpc.rs:965 needs no change: the refusal is arch's C1, answered on the thread. Keep the Fixes #3731 and Closes #3533 lines and the ## Residuals entry for #3739.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

That /revise is held, not dropped. A coder is already running on #3731. Your note is kept and goes into the next round here, which starts when that coder finishes.

Nothing to type again: the command gets a rocket when its round starts, or a refusal that names the reason. No round was counted for it yet.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 5 of 10 on the runtime's review findings, pushed as 3008a9a6a850.

line exit tail
cargo test -p minimal activation_puts_the_spec_on_the_create_request 0 t; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 18 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 fai
cargo test -p minimal dashboard_create_with_a_named_entry_stores_the_box_start_spec 0 running 1 test test dash::rpc::tests::dashboard_create_with_a_named_entry_stores_the_box_start_spec ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1089 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out
cargo test -p minimal create_form_preselects_the_default_session_entry 0 running 1 test test dash::app::tests::create_form_preselects_the_default_session_entry ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1089 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out; finished in

Verify min task run agent-verify exited 100.

/1259) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.009s] (1234/1259) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.007s] (1235/1259) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.006s] (1236/1259) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.008s] (1237/1259) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.008s] (1238/1259) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.008s] (1239/1259) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.006s] (1240/1259) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.008s] (1241/1259) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.007s] (1242/1259) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.007s] (1243/1259) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.007s] (1244/1259) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.007s] (1245/1259) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.008s] (1246/1259) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.008s] (1247/1259) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.007s] (1248/1259) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.007s] (1249/1259) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.008s] (1250/1259) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.008s] (1251/1259) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   1.006s] (1252/1259) minimal::otel_cli a_silent_collector_costs_min_ls_little_and_prints_nothing
        PASS [   0.007s] (1253/1259) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.008s] (1254/1259) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.008s] (1255/1259) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.007s] (1256/1259) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.007s] (1257/1259) minimal::bin/min tests::type_refusals_exit_3_and_4
        PASS [   2.064s] (1258/1259) minimal::named_vm named_vm_reaches_autospawn
  stdout ───

    running 1 test
    test exec_run_attach_and_task_run_share_the_commands_trace ... FAILED

    failures:

    failures:
        exec_run_attach_and_task_run_share_the_commands_trace

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 5 filtered out; finished in 13.85s

  stderr ───

    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
error: test run failed

Outside the task's layers::

  • crates/minimal/src/tests.rs
  • crates/minimal/tests/cli.rs

Converted to a draft: verify exited 100; outside the task's layers:: crates/minimal/src/tests.rs.

Review threads the coder judged:

A box created in min dash with the entry dev stores the same spec and projection digest as min box start dev for the same project. An entry with network or secret settings that the dashboard does not apply yet is refused on the status line. It is not stored with a different spec.

Notes from the agent: Round 5. The create form now records 'no read yet' as None. An empty project path reads as the refusal 'the project path is empty'. It does not read the minimal.toml of the dashboard's working directory. The create_form_preselects_the_default_session_entry test now covers the empty path. The refusal of entries with network or secret settings stays, by design, until #3739. The dash:: lib tests (73) and clippy -p minimal --all-targets are clean.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 23, 2026 20:55
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS · the full ruling

This push adds one fix to the min dash create form, and it merges main with no conflict. The form now refuses an empty project path. It no longer reads the minimal.toml of the dashboard's own directory. The form also does not treat a path as read until a read returns. That fails closed, as design principle 7 (architecture.md line 339) asks. The rest keeps the earlier PASS, and #3739 holds the residual.

Ruled at 3008a9a against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

A submit with an empty project path now closes the form with the
refusal at once. It no longer asks for a read first.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 6 of 10 on a /revise note, pushed as c05e12c8ce43.

line exit tail
cargo test -p minimal activation_puts_the_spec_on_the_create_request 0 t; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 18 filtered out; finished in 0.00s running 0 tests test result: ok. 0 passed; 0 fai
cargo test -p minimal dashboard_create_with_a_named_entry_stores_the_box_start_spec 0 running 1 test test dash::rpc::tests::dashboard_create_with_a_named_entry_stores_the_box_start_spec ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1089 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out
cargo test -p minimal create_form_preselects_the_default_session_entry 0 running 1 test test dash::app::tests::create_form_preselects_the_default_session_entry ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 1089 filtered out; finished in 0.01s running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 45 filtered out; finished in

Verify min task run agent-verify exited 100.

/1259) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.009s] (1234/1259) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.008s] (1235/1259) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.008s] (1236/1259) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.009s] (1237/1259) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.009s] (1238/1259) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.008s] (1239/1259) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.007s] (1240/1259) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.008s] (1241/1259) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.008s] (1242/1259) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.011s] (1243/1259) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.009s] (1244/1259) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.009s] (1245/1259) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.009s] (1246/1259) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.008s] (1247/1259) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.009s] (1248/1259) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.010s] (1249/1259) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.974s] (1250/1259) minimal::otel_cli a_silent_collector_costs_min_ls_little_and_prints_nothing
        PASS [   0.009s] (1251/1259) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.008s] (1252/1259) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.009s] (1253/1259) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.008s] (1254/1259) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.008s] (1255/1259) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.009s] (1256/1259) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.012s] (1257/1259) minimal::bin/min tests::type_refusals_exit_3_and_4
        PASS [   2.069s] (1258/1259) minimal::named_vm named_vm_reaches_autospawn
  stdout ───

    running 1 test
    test exec_run_attach_and_task_run_share_the_commands_trace ... FAILED

    failures:

    failures:
        exec_run_attach_and_task_run_share_the_commands_trace

    test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 5 filtered out; finished in 13.41s

  stderr ───

    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
error: test run failed

Outside the task's layers::

  • crates/minimal/src/tests.rs
  • crates/minimal/tests/cli.rs

Converted to a draft: verify exited 100; outside the task's layers:: crates/minimal/src/tests.rs.

A box created in min dash with the entry dev has a stored spec and projection digest equal to those of min box start dev for the same project. In the create form, a submit with an empty project path now closes the form at once with the status line error: no session created: the project path is empty, and asks no read and no create.

Notes from the agent: Round 6. Commit e38a947 already made entries_current() false while the placeholder shows (entries_for is None until a read returns). This round adds a check in the submit path of app.rs: an empty trimmed path is refused before the read and the create, with the exact status line from the directive. The test in dash::app::tests (inside create_form_preselects_the_default_session_entry) clears the path, submits once, and asserts no effects, a closed form and that status line. It replaces the earlier two-submit check. No change for the MEDIUM finding at rpc.rs:965, as the directive says. cargo clippy -p minimal --all-targets reports no warnings. The PR body lines (Fixes #3731, Closes #3533, the Residuals entry for #3739) are the runner's to keep.

@agent-137
agent-137 marked this pull request as ready for review November 23, 2026 21:37
@agent-137
Copy link
Copy Markdown
Member

/arch-review

@agent-137
Copy link
Copy Markdown
Member

/review

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

APPROVE withheld: 10 unresolved threads — minimal-arch[bot] crates/minimal/src/dash/rpc.rs:934, minimal-arch[bot] crates/minimal/src/dash/rpc.rs, minimal-arch[bot] crates/minimal/src/cmd/boxes/create.rs, minimal-arch[bot] crates/minimal/src/dash/rpc.rs:937, minimal-foundry[bot] crates/minimal/src/dash/rpc.rs:967, ….

minimal-review — advisory review

Verdict COMMENT — No findings.

Panel: 1 of 3 personas ran (supply-chain); did not complete: correctness, security.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch-review: PASS · the full ruling

This push moves the empty-path refusal in the min dash create form ahead of the entries read. The first Enter now refuses, closes the form and sends nothing to the daemon. The status text is the same as before. The design does not specify form checks, and this change fails closed. The PASS at 3008a9a stays valid for the rest of the change, and #3739 stays the filed residual.

Ruled at c05e12c against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.

@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 23, 2026
Merged via the queue into main with commit 71dc2e3 Nov 23, 2026
39 checks passed
@mitodrummer
mitodrummer deleted the agent/3731-a-box-created-from-min-dash-comes-from-a-picked branch November 23, 2026 23:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants

0