Repository navigation
fix(minimal): min box spec reports a minimal.toml that does not load as a spec it cannot show, and a - #3618
Conversation
…l.toml min box spec started no box but its project file refusal said "Cannot start the box". A new SpecFileInvalid (exit 3) carries the refusal for min box spec. min box start keeps its text.
…ec-reports-a-minimal-toml-that-does-no
builtin_build_entry_setting_open_refused_exit3 and conflicting_loadout_var_refused_before_create run on the start path, so they downcast ProjectFileInvalid, not SpecFileInvalid.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Un-drafted: the |
|
/review |
|
/arch-review |
|
Approved: no findings at 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 seen. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms. min box spec still exits 3 when the project's minimal.toml does not load, as the Exit codes table (line 364) and the min box spec reference (line 476) say. The new SpecFileInvalid changes only the text, so the command does not say that a box cannot start. The start path keeps ProjectFileInvalid and its text. The failed agent-verify test is about command traces, not this path, but the run must be green before the merge.
Ruled at 5d2796a against gominimal/arch@8b824707cde6 by claude-opus-5-5.
There was a problem hiding this comment.
Gate passed at 5d2796a: minimal-review APPROVE, arch-review APPROVED, lanes green, no open threads.
Follow-up
Fixes #3601
crates/minimal/src/cmd/box_spec.rscrates/minimal/src/cmd/mod.rscrates/minimal/src/main.rscrates/minimal/src/tests.rsTask marker
Proof
When the project's minimal.toml does not load, for example with mode = "host_ip" under [defaults.session.network], min box spec prints "Cannot show the spec: the project's minimal.toml does not load: " and exits 3. min box start still prints "Cannot start the box: the project's minimal.toml does not load: " and exits 3.
Notes from the agent: box_spec_to wraps the old body (now box_spec_render) and converts each ProjectFileInvalid to SpecFileInvalid. For a loadout that sets loadout_mode, SpecFileInvalid prints "Cannot show the spec: " without the minimal.toml clause, the same exception that ProjectFileInvalid makes for start. The task gave no exact text for that case. The tests.rs line numbers in the task were st 8000 ale. I changed the box spec downcasts (spec_project_error, box_spec_renders_formats_secrets_as_refs, and two in box_spec_argument_directory_then_entry_then_box). I did not change the downcasts in unresolved_project_type_refuses_loadout_gate_exit3 and session_entry_network_mode_and_ingress, because those tests call session_loadout_mode and project_egress directly, not min box spec. I also ran cargo test -p minimal --lib box_spec: 20 passed. cargo clippy -p minimal --all-targets reported no warnings.
Tests
cargo test -p minimal invalid_project_file_prints_toml_error_oncecargo test -p minimal invalid_project_file_for_box_spec_says_spec_cannot_showVerify
min task run agent-verifyexited 100, so this PR is a draft.Base
The base branch moved while the coder worked; it was merged in before the tests ran.