8000 fix(minimal): min box spec reports a minimal.toml that does not load as a spec it cannot show, and a by minimal-foundry[bot] · Pull Request #3618 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

fix(minimal): min box spec reports a minimal.toml that does not load as a spec it cannot show, and a - #3618

Merged
norrietaylor merged 3 commits into
mainfrom
agent/3601-min-box-spec-reports-a-minimal-toml-that-does-no
Nov 19, 2026
Merged

norrietaylor merged 3 commits into
mainfrom
agent/3601-min-box-spec-reports-a-minimal-toml-that-does-no

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

Follow-up

Fixes #3601

  • Epic: none; not charged to an epic
  • Size: S; estimated 45 code, 60 tests
  • May touch:
    • crates/minimal/src/cmd/box_spec.rs
    • crates/minimal/src/cmd/mod.rs
    • crates/minimal/src/main.rs
    • crates/minimal/src/tests.rs
Task marker
### D3599 — min box spec reports a minimal.toml that does not load as a spec it cannot show, and a start keeps "Cannot start the box"
  kind: task
  size: S
  est: 45 code, 60 tests
  executor: agent
  origin: bug
  layers:
    - spec:
      - crates/minimal/src/cmd/box_spec.rs: adds SpecFileInvalid (exit 3, text: Cannot show the spec: the project's minimal.toml does not load: {error}) and box_spec_to maps every ProjectFileInvalid to it
      - crates/minimal/src/cmd/mod.rs: re-exports SpecFileInvalid from box_spec so that main.rs can read it
      - crates/minimal/src/main.rs: failure_exit_code gives exit 3 for SpecFileInvalid, and a new test pins the spec text and keeps the start text in invalid_project_file_prints_toml_error_once
      - crates/minimal/src/tests.rs: box spec tests (spec_project_error and the downcasts near lines 17925, 18595, 18612) downcast SpecFileInvalid and check that the text does not say Cannot start the box
      test: cargo test -p minimal invalid_project_file_prints_toml_error_once
      test: cargo test -p minimal invalid_project_file_for_box_spec_says_spec_cannot_show
  proof: With a minimal.toml that has mode = "host_ip" under [defaults.session.network], min box spec prints that the spec cannot be shown because the project's minimal.toml does not load, exits 3, and min box start still prints Cannot start the box.

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

line exit tail
cargo test -p minimal invalid_project_file_prints_toml_error_once 0 ed; 0 ignored; 0 measured; 1026 filtered out; finished in 0.00s running 2 tests test tests::invalid_project_file_prints_toml_error_once_for_io ... ok test tests::invalid_project_file_prints_toml_error_once ... ok test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 40 filtered out; finishe
cargo test -p minimal invalid_project_file_for_box_spec_says_spec_cannot_show 0 running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 1026 filtered out; finished in 0.00s running 1 test test tests::invalid_project_file_for_box_spec_says_spec_cannot_show ... ok test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 41 filtered out; finished in 0.0

Verify

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

 {
                "parent_span_id": "7df4013bd836f19c",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "c96009cae03235cc",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "c96009cae03235cc",
                "queued_behind": "0",
                "span_id": "cda8e8761426ad23",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "7df4013bd836f19c",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "0e3274198ba37c57",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "0e3274198ba37c57",
                "queued_behind": "0",
                "span_id": "08534165567f0b6c",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "0e3274198ba37c57",
                "queued_behind": "0",
                "span_id": "26eb5734db820a0f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "26eb5734db820a0f",
                "span_id": "5c388d363e17646d",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "26eb5734db820a0f",
                "queued_behind": "0",
                "span_id": "41bdbcb6112e3c0b",
                "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 [  92.620s] 1197 tests run: 1196 passed, 1 failed, 2 skipped
        FAIL [  13.204s] (1197/1197) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Base

The base branch moved while the coder worked; it was merged in before the tests ran.

…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.
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.
@coderabbitai
coderabbitai Bot commented Nov 19, 2026 •
Copy link
Copy Markdown
Contributor

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: f24ace0c-3129-4685-9ca6-768bc8c0356c

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

@norrietaylor
norrietaylor marked this pull request as ready for review November 19, 2026 06:11
@norrietaylor
norrietaylor requested a review from a team as a code owner November 19, 2026 06:11
@norrietaylor
Copy link
Copy Markdown
Member

Un-drafted: the agent-verify result is the same minimald trace-span failure (or a 1800 s verify timeout) seen across this batch, not a failure in this diff. Every lane is green.

@norrietaylor
Copy link
8000 Copy Markdown
Member

/review

@norrietaylor
Copy link
Copy Markdown
Member

/arch-review

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

Approved: no findings at 5d2796ad940c.

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.

@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 19, 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: 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.

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

Gate passed at 5d2796a: minimal-review APPROVE, arch-review APPROVED, lanes green, no open threads.

@norrietaylor
norrietaylor added this pull request to the merge queue Nov 19, 2026
Merged via the queue into main with commit d675364 Nov 19, 2026
40 checks passed
@norrietaylor
norrietaylor deleted the agent/3601-min-box-spec-reports-a-minimal-toml-that-does-no branch November 19, 2026 07:18
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.

D3599 — min box spec reports a minimal.toml that does not load as a spec it cannot show, and a start keeps "Cannot start the box"

1 participant

0