8000 docs(minimal): T65 — The CLI reference lists every min/v1/error code and its exit code by minimal-foundry[bot] · Pull Request #3667 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

docs(minimal): T65 — The CLI reference lists every min/v1/error code and its exit code - #3667

Merged
mitodrummer merged 5 commits into
mainfrom
agent/3402-the-cli-reference-lists-every-min-v1-error-code
Nov 20, 2026
Merged

mitodrummer merged 5 commits into
mainfrom
agent/3402-the-cli-reference-lists-every-min-v1-error-code

Conversation

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

T65 — The CLI reference lists every min/v1/error code and its exit code

slice: S3
kind: task
covers: BCLI-033
size: S
est: 0 code, 40 tests, 80 docs
executor: agent
difficulty: routine
model: standard
diagnostics: none new
observability: none new
layers:
- client:
- docs/reference/cli-min.md: the min/v1/error object, its fields, and every code with its exit code and when it is given
- crates/minimal/src/tests.rs: cli_reference_lists_every_error_code
- crates/minimal/src/main.rs: one list of the codes, only if the test needs it
test: cargo nextest run -p minimal cli_reference_lists_every_error_code
produces: none
consumes: none
proof: docs/reference/cli-min.md lists usage (2), not_found (4) and host_unreachable (7) among the others, and the test fails when a code is added in the code but not in the reference.

Proof

docs/reference/cli-min.md has a new section, Errors in JSON output. It describes the min/v1/error object and its schema, code, message and hint fields. It lists every code that the source gives, each with its exit code and when it is given: ambiguous (2), not_found (4), host_unreachable (7), insufficient_resources (8), github_sign_in_required (3), gatehouse_unenrolled_node (5), audit_self_unsupported_unenrolled (1), timeout (124), wait_timeout (124), daemon_unreachable (1), policy_unavailable (1), output_failed (1) and unspecified (1, or the exit code of the failure). The reference does not list usage (2), because no code gives it. A command line that min cannot parse exits 2 with the argument parser's plain-text error, and the reference says so. The test cli_reference_lists_every_error_code fails when the source has a code that the reference does not list. It also fails when the reference lists a code that the source does not give. I checked the first case: I removed the policy_unavailable row, and the test failed.

Notes from the agent: The proof is only partly delivered. The proof names usage (2), but no code path in crates/minimal gives a usage code. Clap parse errors exit 2 through Cli::try_parse(...).exit() before the output mode is known, so they print text and no object. Listing usage would document a code that the CLI never prints, so I described the plain-text exit 2 instead. Adding a real usage object is a code change for a separate task. The code that maps to exit 2 in machine mode is ambiguous. main.rs did not change: tests.rs is in the lib target, so it cannot read a list in the bin target. The test scans the product source instead. It reads the literal in each MachineModeFailure::new call, each CODE constant and code: field, and each literal or string constant that a fn code returns. It also reads crates/boxes/src/core/bep.rs for the sign-in and enrollment codes. Facts for a later task: in machine mode, several refusals that ha…[truncated]

Tests

line exit tail
car 8000 go nextest run -p minimal cli_reference_lists_every_error_code 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-2... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args

Verify

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

_project_file_for_box_spec_says_spec_cannot_show
        PASS [   0.006s] (1190/1215) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.007s] (1191/1215) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.007s] (1192/1215) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.006s] (1193/1215) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.010s] (1194/1215) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.008s] (1195/1215) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.006s] (1196/1215) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.007s] (1197/1215) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.007s] (1198/1215) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.007s] (1199/1215) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.006s] (1200/1215) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.007s] (1201/1215) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.008s] (1202/1215) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.007s] (1203/1215) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.007s] (1204/1215) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.008s] (1205/1215) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.008s] (1206/1215) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.008s] (1207/1215) minimal::bin/min tests::session_run_is_a_stdout_contract
        PASS [   0.008s] (1208/1215) minimal::bin/min tests::session_policy_json_is_a_stdout_contract
        PASS [   0.007s] (1209/1215) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.008s] (1210/1215) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.006s] (1211/1215) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.006s] (1212/1215) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.006s] (1213/1215) minimal::bin/min tests::type_refusals_exit_3_and_4
        PASS [   0.999s] (1214/1215) 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 12.89s

  stderr ───

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

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

Residuals

Closes #3402

The CLI reference gets an Errors in JSON output section with the
error object's fields and each code with its exit code. A test scans
the product source for every code and fails when the reference and
the source disagree.
The error code table named min session policy, a removed spelling that
the reference check refuses. min box show --network carries the case.
@coderabbitai
coderabbitai Bot commented Nov 19, 2026 •
8000 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: 9868dd9a-66f9-449f-a0e2-618c8a624087

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

@agent-137
agent-137 marked this pull request as ready for review November 20, 2026 02:42
@agent-137
agent-137 requested a review from a team as a code owner November 20, 2026 02:42
@minimal-foundry
minimal-foundry Bot commented Nov 20, 2026 •
Copy link
Copy Markdown
Contributor Author

Reviewed: 1 finding, none blocking at b46cf2c3a810.

Address the comments on the diff.

Clobber: none seen.

@minimal-foundry minimal-foundry Bot left a comment
8000 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 thread crates/minimal/src/tests.rs Resolved
…ference-lists-every-min-v1-error-code

# Conflicts:
#	crates/minimal/src/tests.rs
#	docs/reference/cli-min.md
A changed exit code in the reference now fails the test, not only the three named codes.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on the runtime's review findings, pushed as 5d4ca53730f9.

Resolved conflicts in: crates/minimal/src/tests.rs, docs/reference/cli-min.md

line exit tail
cargo nextest run -p minimal cli_reference_lists_every_error_code 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot)

Verify min task run agent-verify exited 100.

1241) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.010s] (1216/1241) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.007s] (1217/1241) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.008s] (1218/1241) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.008s] (1219/1241) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.007s] (1220/1241) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.008s] (1221/1241) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.007s] (1222/1241) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.007s] (1223/1241) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.008s] (1224/1241) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.007s] (1225/1241) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.007s] (1226/1241) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.009s] (1227/1241) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.012s] (1228/1241) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.008s] (1229/1241) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.008s] (1230/1241) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.009s] (1231/1241) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.009s] (1232/1241) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.008s] (1233/1241) minimal::bin/min tests::session_policy_json_is_a_stdout_contract
        PASS [   0.008s] (1234/1241) minimal::bin/min tests::session_run_is_a_stdout_contract
        PASS [   0.008s] (1235/1241) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.008s] (1236/1241) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.008s] (1237/1241) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.009s] (1238/1241) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.009s] (1239/1241) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.009s] (1240/1241) 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 12.97s

  stderr ───

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

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

Converted to a draft: verify exited 100.

Review threads the coder judged:

  • 👍 valid — crates/minimal/src/tests.rs:24937: The test now pins the exit code of every row in a table, and fails when a documented code has no pinned exit code. The source has no one code-to-exit map, so the table is the record a source change must update.

docs/reference/cli-min.md has an Errors in JSON output section that lists every min/v1/error code with its exit code, among them ambiguous (2), not_found (4) and host_unreachable (7). The test cli_reference_lists_every_error_code fails when the source gives a code that the reference does not list, and now also when any row's exit code changes.

Notes from the agent: Revise round 1. The runner merged origin/main. I resolved both conflicts by keeping both sides: in cli-min.md the new Choosing the provider on Linux subsection of Global flags comes first, then ## Errors in JSON output. In tests.rs the BCLI-033 test and the new NET-138 tests sit one after the other. I committed the merge alone, then the review fix. The merge brings base-branch changes to many files, among them .github/workflows/release.yml. Those come from origin/main, not from this task. The exit-code pin is a table in the test, because the source has no single code-to-exit map. So the test catches a reference row that changes, and a source change still needs a person to update the table and the reference together. The reference has no code named usage. A parse error exits 2 as plain text, and the code for exit 2 is ambiguous.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 20, 2026 03:13
@agent-137
agent-137 marked this pull request as ready for review November 20, 2026 03:14
@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 thread docs/reference/cli-min.md
| `not_found` | 4 | No box matches the box name or id, the box is on a VM that is stopped, or `min type show` names no box type. When `min box show --network -o json` finds no box, the exit code is 1 |
| `host_unreachable` | 7 | A host that the command must ask does not answer |
| `insufficient_resources` | 8 | The VM host has no network address left for another box |
| `github_sign_in_required` | 3 | The box spec needs a GitHub sign-in, and you are not signed in. Run `min auth login` |
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 github_sign_in_required

The row says github_sign_in_required exits 3. ActivationRefused::exit_code returns 5 when any refusal is UnenrolledNode. machine_mode_answer picks the first refusal that has a code. A spec with both problems can give code github_sign_in_required with exit 5. Say so in the row. The test pins 3 and cannot see this case.

What the reviewer checked

bep.rs:926 exit_code: any UnenrolledNode => 5 else 3; main.rs:~517 find_map over refusals for first code

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

File:       docs/reference/cli-min.md
Lines:      102-102
Category:   correctness
Severity:   low (reviewer confidence 0.50)

Finding:
The row says `github_sign_in_required` exits 3. `ActivationRefused::exit_code` returns 5 when any refusal is `UnenrolledNode`. `machine_mode_answer` picks the first refusal that has a code. A spec with both problems can give code `github_sign_in_required` with exit 5. Say so in the row. The test pins 3 and cannot see this case.

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: No path puts both refusals in one ActivationRefused. SignInRequired comes only from require_sign_in, and UnenrolledNode only from unenrolled_node/require_proxy (crates/boxes/src/core/bep.rs:1182-1262). Each of those returns a vec of one refusal. refusals() and store_refusals(), the multi-refusal builders, emit neither kind, and no code extends a refusal list. So github_sign_in_required always exits 3, and the row is correct.

@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: the one review thread did not hold, so this round adds no commit. The branch head 5d4ca53 is unchanged and its test line passes.

Review threads the coder judged:

  • 👎 invalid — docs/reference/cli-min.md:102: No path puts both refusals in one ActivationRefused. SignInRequired comes only from require_sign_in, and UnenrolledNode only from unenrolled_node/require_proxy (crates/boxes/src/core/bep.rs:1182-1262). Each of those returns a vec of one refusal. refusals() and store_refusals(), the multi-refusal bui

@agent-137
Copy link
Copy Markdown
Member

/arch-review

@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_WITH_CONDITIONS · 2 conditions · the full ruling

The new Errors in JSON output section matches the design's min/v1/error object and the codes the source gives. The test fails both ways, and that proves the rule. The reference documents two gaps against the design, but the PR files no issue for them. One gap is plain-text parse errors under -o json (architecture line 383), and C1 files it. The other gap is min box show --network -o json not-found at exit 1 (line 365), and C2 files it. Link both issues in the PR body.

Ruled at 5d4ca53 against gominimal/arch@8b824707cde6 by claude-opus-5-5.

Comment thread docs/reference/cli-min.md
| `output_failed` | 1 | The command did not write its JSON output to stdout, for example on a full disk |
| `unspecified` | 1, or the exit code of the failure | Any other failure. The exit code is the one the command gives without `-o` |

A command line that `min` cannot parse, such as an unknown flag, exits 2
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 paragraph describes a gap. Architecture line 383 says errors in machine modes are one JSON object on stderr. A parse failure under -o json prints plain text from Cli::try_parse().exit() in main.rs. File an issue for the usage object and link it from the PR body.

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.

Filed as #3680 and linked from the PR body under Residuals.

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 action this finding asks for is already done: #3680 tracks the plain-text parse error under -o json, and the PR body links it. The fix is in main.rs parse handling, outside this merge-only round, so this round changes nothing for it.

Comment thread docs/reference/cli-min.md
| `code` | Exit code | When the command gives it |
|--------|-----------|---------------------------|
| `ambiguous` | 2 | A box name or id prefix matches more than one box |
| `not_found` | 4 | No box matches the box name or id, the box is on a VM that is stopped, or `min type show` names no box type. When `min box show --network -o json` finds no box, the exit code is 1 |
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 · Exit 1 for not_found does not match architecture line 365, which gives 4. PolicyJsonFailure::SessionNotFound becomes a bare MachineModeFailure, and failure_exit_code has no arm for it. File an issue for the fix and link it from the PR body.

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.

Filed as #3681 and linked from the PR body under Residuals.

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 action this finding asks for is already done: #3681 tracks the exit 1 for not_found from min box show --network -o json, and the PR body links it. The reference row states the exit 1 as it is today. The code fix is outside this task's layers.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 20, 2026
@agent-137
Copy link
Copy Markdown
Member

/revise Merge main into this branch. The merge queue ejected this PR after #3670 landed, and the merge now conflicts in crates/minimal/src/tests.rs. Keep both sides: this PR's cli_reference_lists_every_error_code and every test #3670 and #3666 added. Change nothing else.

Run cargo nextest run -p minimal cli_reference_lists_every_error_code.

…ference-lists-every-min-v1-error-code

# Conflicts:
#	crates/minimal/src/tests.rs
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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

Resolved conflicts in: crates/minimal/src/tests.rs

line exit tail
cargo nextest run -p minimal cli_reference_lists_every_error_code 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot)

Verify min task run agent-verify exited 100.

PASS [   0.006s] (1225/1251) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.004s] (1226/1251) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.005s] (1227/1251) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.004s] (1228/1251) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.006s] (1229/1251) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.007s] (1230/1251) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.005s] (1231/1251) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.006s] (1232/1251) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.005s] (1233/1251) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.005s] (1234/1251) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.005s] (1235/1251) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.005s] (1236/1251) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.006s] (1237/1251) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.006s] (1238/1251) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.006s] (1239/1251) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.005s] (1240/1251) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.005s] (1241/1251) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.005s] (1242/1251) minimal::bin/min tests::session_policy_json_is_a_stdout_contract
        PASS [   0.005s] (1243/1251) minimal::bin/min tests::session_run_is_a_stdout_contract
        PASS [   0.008s] (1244/1251) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.005s] (1245/1251) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.005s] (1246/1251) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.005s] (1247/1251) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.005s] (1248/1251) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.004s] (1249/1251) minimal::bin/min tests::type_refusals_exit_3_and_4
        PASS [   2.054s] (1250/1251) 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 12.92s

  stderr ───

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

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

Converted to a draft: verify exited 100.

Review threads the coder judged:

docs/reference/cli-min.md lists every min/v1/error code with its exit code, including not_found (4) and host_unreachable (7), and cli_reference_lists_every_error_code still passes after the merge of main. The test fails when the product source gives a code that the reference does not list.

Notes from the agent: This round only merged origin/main. The one conflict was in crates/minimal/src/tests.rs. I kept this PR's cli_reference_lists_every_error_code and main's daemon_only_broker_refusal_exits_5, and changed nothing else. The other files in the merge commit come from main as they are. The reference has no usage row: a parse failure exits 2 as plain text, not as a JSON object (see #3680). So the proof's usage (2) is true only as the prose paragraph under the table, not as a table row.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 20, 2026 06:36
@agent-137
agent-137 marked this pull request as ready for review November 20, 2026 06:37
@agent-137
Copy link
Copy Markdown
Member

/arch-review

@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 merge from main changes no line of this PR, and it adds no error code that the reference does not list. C1 is met: the PR body links #3680 for the missing usage object on a parse failure. C2 is met: the PR body links #3681 for the exit 1 of min box show --network when no box matches. The reference agrees with architecture.md lines 361–383. BCLI-033 conforms.

Ruled at b46cf2c against gominimal/arch@8b824707cde6 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 20, 2026
Merged via the queue into main with commit 1127136 Nov 20, 2026
39 checks passed
@mitodrummer
mitodrummer deleted the agent/3402-the-cli-reference-lists-every-min-v1-error-code branch November 20, 2026 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T65 — The CLI reference lists every min/v1/error code and its exit code

2 participants

0