8000 feat: T138 — min box spec warns, on stderr, about an env_vars variable whose name looks like a secret's by minimal-foundry[bot] · Pull Request #3776 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

feat: T138 — min box spec warns, on stderr, about an env_vars variable whose name looks like a secret's - #3776

Merged
mitodrummer merged 6 commits into
mainfrom
agent/3770-min-box-spec-warns-on-stderr-about-an-env-vars-v
Nov 24, 2026
Merged

mitodrummer merged 6 commits into
mainfrom
agent/3770-min-box-spec-warns-on-stderr-about-an-env-vars-v

Conversation

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

T138 — min box spec warns, on stderr, about an env_vars variable whose name looks like a secret's

slice: S5
kind: task
covers: BOX-230, BOX-231
size: S
est: 80 code, 140 tests
executor: agent
difficulty: routine
model: strong
diagnostics: min box spec prints one stderr line per variable that BOX-231 flags; stdout stays the spec under -o json and -o yaml
observability: the expander's report carries the flagged variable names and the layer and file of each surviving value
layers:
- expand:
- crates/mfile/src/expand.rs: ExpansionReport gains secret_name_warnings, one per variable that BOX-180's merge keeps whose name contains, ignoring ASCII case, TOKEN, SECRET, PASSWORD, PASSWD, API_KEY, APIKEY, PRIVATE_KEY or CREDENTIAL (BOX-231). Each holds the variable name and the layer and file whose value survives the merge (layer_words). The expansion continues, and the value is stored as written (BOX-230)
test: cargo nextest run -p mfile credential_like_env_var_name_warns
test: cargo nextest run -p mfile loadout_env_var_literal_stored_as_written
- cli:
- crates/minimal/src/cmd/box_spec.rs: entry_spec prints each secret_name_warning on stderr (BCLI-084, spec 28); no other command prints them
- crates/minimal/tests/cli.rs: adds the test below: min box spec on an entry whose loadout sets GITHUB_TOKEN as a literal checks the exact stderr line and that -o json stdout parses
test: cargo nextest run -p minimal box_spec_entry_prints_secret_name_warnings_on_stderr
produces: none
consumes: none
proof: min box spec dev on a project whose loadout sets env_vars.GITHUB_TOKEN = "x" prints the warning line on stderr and the spec with GITHUB_TOKEN = "x" on stdout, and exits 0; min session start on the same project prints no such line.

User-facing text

The exact line min box spec <entry> prints on stderr, once per flagged variable, pinned in box_spec_entry_prints_secret_name_warnings_on_stderr:

warning: env_vars.<NAME>, set by <layer> (<file>), looks like a secret. Its value is stored in the box record as written. Put a secret in [secrets] to keep its value out of the record.

<layer> is the words the expander already uses for a layer (for example the loadout dev), and <file> is that layer's file. Why it is true: BOX-230 stores the merged value as written, and only a [secrets] entry keeps a value out of the spec (BOX-080). Requirements: BOX-230 and BOX-231 (spec 29, #3756), BCLI-084 (spec 28, #3760).

This task implements the fix tracked in #3210, which is closed by hand when the PR merges.

Proof

min box spec dev -o json on a project whose [sessions.dev] sets env_vars.GITHUB_TOKEN = "x" exits 0. It prints one warning line on stderr that names GITHUB_TOKEN and the layer that sets it, says that the box stores the value as written, and names [secrets]. Stdout is the spec as JSON with GITHUB_TOKEN = "x". The expander gives the same warning, with the loadout name and file, for a loadout layer. No command other than min box spec prints the warning. The loadout half of the proof is not true through min box spec today, and the notes say why.

Notes from the agent: Gap in the proof: min box spec does not fold the selected loadouts into its expansion. Layers.loadouts stays empty in expand_entry, and the code comment there says 'Folding their values into the spec is #3236'. min box start does set Layers.loadouts (crates/minimal/src/cmd/boxes/create.rs around line 2298 sets whole.loadouts), but min box spec's expand_entry does not. So a GITHUB_TOKEN that only a loadout file sets is stored by min box start, but does not reach the spec that min box spec prints, and no warning prints for it (#3236). The expander side does handle loadouts: credential_like_env_var_name_warns and loadout_env_var_literal_stored_as_written pass loadout layers, with a file path, directly. When #3236 folds the loadouts in, the CLI prints their warnings with no further change. I did not fold the loadouts into box_spec.rs here, because that changes the stdout of every min box spec (the built-in default loadout adds MINIMAL_MOTD, PROMPT_COMMAND and PS1) and it is the work of #3236 and BCLI-077. For this reason the CLI test sets GITHUB_TOKEN = "x" in [sessions.dev] in minimal.toml, not in a loadout file, as the task described. Printed text: the task and spec give no exact wording, so I wrote it. It is pinned in both tests: 'warning: the variable GITHUB_TOKEN in env_vars has a name that looks like a secret's. [sessions.dev] in minimal.toml sets it. A box from this entry stores its value as written in the box's spec. Put a secret value in a [secrets] entry to keep it out of the spec.' For a loadout with a file, the second sentence is 't…[truncated]

Tests

line exit tail
cargo nextest run -p mfile credential_like_env_var_name_warns 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in bo
cargo nextest run -p mfile loadout_env_var_literal_stored_as_written 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in bo
cargo nextest run -p minimal box_spec_entry_prints_secret_name_warnings_on_stderr 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-2 in bo

Verify

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

2) minimal::bin/min tests::invalid_project_file_for_box_spec_says_spec_cannot_show
        PASS [   0.009s] (1487/1512) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.011s] (1488/1512) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.008s] (1489/1512) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.009s] (1490/1512) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.008s] (1491/1512) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.007s] (1492/1512) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.008s] (1493/1512) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.007s] (1494/1512) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.008s] (1495/1512) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.008s] (1496/1512) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.009s] (1497/1512) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.009s] (1498/1512) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.007s] (1499/1512) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.008s] (1500/1512) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.008s] (1501/1512) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.011s] (1502/1512) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.008s] (1503/1512) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.007s] (1504/1512) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.008s] (1505/1512) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.008s] (1506/1512) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.009s] (1507/1512) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.010s] (1508/1512) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.010s] (1509/1512) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.010s] (1510/1512) minimal::bin/min tests::type_refusals_exit_3_and_4
        PASS [   2.061s] (1511/1512) 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

Closes #3770
Closes #3210

Residuals

The expansion report carries one warning for each kept env_vars
variable whose name contains a secret-like part (BOX-231), with the
layer and file whose value survives the merge. The value stays in the
spec as written (BOX-230).
Each env_vars name that the expander flags as secret-like prints one
warning line on stderr (BCLI-084). Stdout stays the spec in every -o
format, and no other command prints the warning.
@coderabbitai
coderabbitai Bot commented Nov 24, 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: 19b9774f-f153-43af-8221-3b65e465b79e

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 24, 2026 19:52
@agent-137
agent-137 requested a review from a team as a code owner November 24, 2026 19:52
@minimal-foundry
minimal-foundry Bot commented Nov 24, 2026 •
Copy link
Copy Markdown
Contributor Author

Reviewed: no findings; approval withheld, 5 threads unresolved at 69cf26c289a6.

APPROVE withheld: 5 unresolved threads — minimal-foundry[bot] crates/mfile/src/expand.rs, minimal-arch[bot] crates/minimal/src/cmd/box_spec.rs:1036, minimal-arch[bot] crates/mfile/src/expand.rs, minimal-arch[bot] crates/mfile/src/expand.rs, minimal-arch[bot] crates/minimal/src/cmd/box_spec.rs:1036. 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.

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

Verdict COMMENT — 1 finding, 1 inline.

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

Comment thread crates/mfile/src/expand.rs Outdated
Comment on lines +263 to +264
f,
"A box from this entry stores its value as written in the box's spec. \
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 · printed-text · confidence 0.55

The warning says the box stores the value as written. That is false for an inherit = true variable such as GITHUB_TOKEN = { inherit = true }. The spec stores the inherit table and not the host value. The user gets told to move a variable into [secrets] when it holds no secret. Say "as written" only for a literal value, or word the text for the inherit case.

What the reviewer checked

resolve_var: Table with inherit=true resolves from host; merge_vars stores var.value (the table) in spec; secret_name_warnings does not check the value shape.

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

File:       crates/mfile/src/expand.rs
Lines:      263-264
Category:   printed-text
Severity:   low (reviewer confidence 0.55)

Finding:
The warning says the box stores the value as written. That is false for an `inherit = true` variable such as `GITHUB_TOKEN = { inherit = true }`. The spec stores the inherit table and not the host value. The user gets told to move a variable into `[secrets]` when it holds no secret. Say "as written" only for a literal value, or word the text for the inherit 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
Member

Choose a reason for hiding this comment

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

Tracked in #3778: the warning should apply only to a variable whose kept value is a literal, since an inherit = true variable's spec holds the inherit table, not the host value. Narrowing it is a BOX-231 change (spec 29) first, so it does not hold this PR, which implements BOX-231 as written.

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 19be5694269c: SecretNameWarning now records the value shape. For { inherit = true } with no default, the text says the spec stores { inherit = true } and not a value, with no [secrets] advice. An inherit with a default says its default is stored as written. The test pins both texts.

An inherit with no default stores { inherit = true } in the spec, not a
value, so the warning no longer says the value is stored as written.
@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 · 1 condition · the full ruling

The expander finds secret-like env_vars names and keeps the value as written. Only min box spec prints the warning, on stderr. This conforms to architecture.md lines 81, 336 and 1294. One gap is not named: min box start stores a loadout's GITHUB_TOKEN (create.rs line 2298), but min box spec does not fold loadouts and prints no warning for it. That is the #3210 case. Do C1: list #3236 as a residual in the PR body, and correct the note that says no path sets Layers.loadouts.

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

// same read.
let (expansion, read_rules) = expand_with_store_rules(Some(global), entry, &mut layers)?;
let store_ids = store_reference_ids(&expansion.spec);
let secret_name_warnings = expansion.report.secret_name_warnings.clone();
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 copy holds no loadout warning. expand_entry does not fold the selected loadouts (#3236). min box start folds them at create.rs line 2298, so the record stores a loadout's secret-like value with no warning. Architecture.md line 1294 says the min box spec render is what the host receives. List #3236 as a residual in the PR body (C1).

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.

Tracked in #3236, now listed under Residuals in the PR body: expand_entry does not fold the selected loadouts, so min box spec <entry> cannot warn about a loadout's value until #3236 lands, while min box start stores it.

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 69cf26c289a6: C1: the PR body now lists #3236 under Residuals (edited by hand per the arch ruling). expand_entry does not fold the selected loadouts until #3236 lands. No code change in this round.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on the runtime's review findings, pushed as 19be5694269c.

line exit tail
cargo nextest run -p mfile credential_like_env_var_name_warns 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in bo
cargo nextest run -p mfile loadout_env_var_literal_stored_as_written 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in bo
cargo nextest run -p minimal box_spec_entry_prints_secret_name_warnings_on_stderr 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-2 in bo

Verify min task run agent-verify exited 100.

2) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.014s] (1487/1512) minimal::bin/min tests::invalid_project_file_for_box_spec_says_spec_cannot_show
        PASS [   0.011s] (1488/1512) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.015s] (1489/1512) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.012s] (1490/1512) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.014s] (1491/1512) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.012s] (1492/1512) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.011s] (1493/1512) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.011s] (1494/1512) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.019s] (1495/1512) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.014s] (1496/1512) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.014s] (1497/1512) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   2.101s] (1498/1512) minimal::named_vm named_vm_reaches_autospawn
        PASS [   0.012s] (1499/1512) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.018s] (1500/1512) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.017s] (1501/1512) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.016s] (1502/1512) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.013s] (1503/1512) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.016s] (1504/1512) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.011s] (1505/1512) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.017s] (1506/1512) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.012s] (1507/1512) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.022s] (1508/1512) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.012s] (1509/1512) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.015s] (1510/1512) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.011s] (1511/1
10000
512) 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 14.59s

  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/mfile/src/expand.rs: SecretNameWarning now records the value shape. For { inherit = true } with no default, the text says the spec stores { inherit = true } and not a value, with no [secrets] advice. An inherit with a default says its default is stored as written. The test pins both texts.

min box spec dev on a project whose loadout sets env_vars.GITHUB_TOKEN = "x" prints the secret-name warning on stderr, prints the spec with GITHUB_TOKEN = "x" on stdout, and exits 0. Only min box spec prints the warning, so min session start prints no such line. For a { inherit = true } variable with no default, the warning now says the spec stores { inherit = true } and not a value.

Notes from the agent: Revise round 1 changed only crates/mfile/src/expand.rs. SecretNameWarning gains a stored: StoredVar field (Literal, Inherit, InheritWithDefault). The warning text follows it. Deviation from the BOX-231 wording: for an inherit with no default, the warning does not say that the value is stored as written, and it does not give the [secrets] advice, because the spec stores no value for it. An inherit with a default says that the default is stored as written.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 24, 2026 20:30
@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-foundry[bot] crates/mfile/src/expand.rs, minimal-arch[bot] crates/minimal/src/cmd/box_spec.rs:1036. No findings.

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

@agent-137
agent-137 marked this pull request as ready for review November 24, 2026 21:07
@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: CONDITIONS · 3 conditions · the full ruling

C1 from the last ruling is still open. The PR body still lacks the #3236 residual, and it keeps Closes #3210. The new StoredVar::Inherit arm returns before the [secrets] sentence. BOX-231 and BCLI-084 require every warning to name [secrets], and arch line 81 makes [secrets] the place for secrets. Make the change in C2. The inherit text correctly does not say a value is stored. State that departure from the spec wording in the #3778 residual (C3).

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

Comment thread crates/mfile/src/expand.rs Outdated
f,
"A box from this entry stores its value as written in the box's spec. "
)?,
StoredVar::Inherit => {
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 arm returns before the [secrets] sentence. BOX-231 and BCLI-084 require every warning to name [secrets]. Remove the return and fall through to the last write!, as the other arms do.

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 69cf26c289a6: C2: commit 69cf26c removes the early return in the Inherit arm, so the warning falls through to the [secrets] sentence like the other arms.

Comment thread crates/mfile/src/expand.rs Outdated
StoredVar::Inherit,
"the variable GH_TOKEN in `env_vars` has a name that looks like a \
secret's. `[sessions.dev]` in minimal.toml sets it. The box's spec \
stores `{ inherit = true }` for it, not a value."
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 · Add the [secrets] sentence to the end of this expected GH_TOKEN text after the C2 change.

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 69cf26c289a6: C2: commit 69cf26c adds the [secrets] sentence to the end of the expected GH_TOKEN text. credential_like_env_var_name_warns passes.

// same read.
let (expansion, read_rules) = expand_with_store_rules(Some(global), entry, &mut layers)?;
let store_ids = store_reference_ids(&expansion.spec);
let secret_name_warnings = expansion.report.secret_name_warnings.clone();
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 · These warnings come from an expansion that does not include the selected loadouts. min box start includes them (create.rs line 2298). List that gap as a residual with #3236 in the PR body.

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 69cf26c289a6: C1: the gap is listed with #3236 under Residuals in the PR body (edited by hand per the arch ruling). min box spec warnings exclude loadouts until #3236 lands.

@agent-137
Copy link
Copy Markdown
Member

/revise

Arch ruling CONDITIONS on 19be569. C1 and C3 are PR-body edits, already made by hand; do not change the body's ## Residuals or Closes lines. Apply C2:

  • C2: In crates/mfile/src/expand.rs impl Display for SecretNameWarning, the StoredVar::Inherit arm returns early and so skips the final sentence that the other two arms print. Remove that early return, so every warning ends with the [secrets] sentence, as BOX-231 and BCLI-084 require. Update the expected GH_TOKEN string in the credential_like_env_var_name_warns test to end with that sentence.

Reply to each arch thread with the commit that meets it.

The Inherit arm returned early and skipped the [secrets] sentence that
every other warning prints. BOX-231 and BCLI-084 require it in every
warning.
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a /revise note, pushed as 69cf26c289a6.

line exit tail
cargo nextest run -p mfile credential_like_env_var_name_warns 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in bo
cargo nextest run -p mfile loadout_env_var_literal_stored_as_written 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-1 in bo
cargo nextest run -p minimal box_spec_entry_prints_secret_name_warnings_on_stderr 0 warning: unknown fields in task runtime-implement-test-0: network warning: unknown fields in task runtime-implement-test-1: network warning: unknown fields in task runtime-implement-test-2: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-2 in bo

Verify min task run agent-verify exited 100.

tests::exit_code_table_invalid_vm_name_is_usage
        PASS [   0.010s] (1487/1512) minimal::bin/min tests::invalid_project_file_prints_toml_error_once
        PASS [   0.015s] (1488/1512) minimal::bin/min tests::invalid_project_file_for_box_spec_says_spec_cannot_show
        PASS [   0.015s] (1489/1512) minimal::bin/min tests::invalid_project_file_prints_toml_error_once_for_io
        PASS [   0.012s] (1490/1512) minimal::bin/min tests::loadout_not_found_exits_4
        PASS [   0.013s] (1491/1512) minimal::bin/min tests::local_host_not_found_exits_4
        PASS [   0.013s] (1492/1512) minimal::bin/min tests::machine_mode_answers_write_failures
        PASS [   0.012s] (1493/1512) minimal::bin/min tests::machine_mode_error_object_is_one_stamped_line
        PASS [   0.014s] (1494/1512) minimal::bin/min tests::machine_mode_error_line_keeps_an_empty_hint
        PASS [   0.011s] (1495/1512) minimal::bin/min tests::machine_mode_error_object_on_stderr
        PASS [   0.010s] (1496/1512) minimal::bin/min tests::machine_output_mode_keys_on_the_output_flag
        PASS [   0.012s] (1497/1512) minimal::bin/min tests::machine_mode_names_the_grant_refusal_code
        PASS [   0.009s] (1498/1512) minimal::bin/min tests::network_flag_refusal_exits_2
        PASS [   0.013s] (1499/1512) minimal::bin/min tests::misplaced_run_flag_exits_2
        PASS [   0.012s] (1500/1512) minimal::bin/min tests::project_file_not_found_exits_4
        PASS [   0.009s] (1501/1512) minimal::bin/min tests::resume_and_session_attach_refusals_map_to_exit_codes
        PASS [   0.013s] (1502/1512) minimal::bin/min tests::prune_off_tty_needs_yes_exits_2
        PASS [   0.011s] (1503/1512) minimal::bin/min tests::rm_running_box_refuses_naming_force_with_exit_2
        PASS [   0.009s] (1504/1512) minimal::bin/min tests::row_not_back_exit_codes
        PASS [   0.010s] (1505/1512) minimal::bin/min tests::run_verbs_and_wait_timeout_return_124_with_code_timeout
        PASS [   0.011s] (1506/1512) minimal::bin/min tests::start_entry_refusals_exit_with_their_codes
        PASS [   0.012s] (1507/1512) minimal::bin/min tests::task_file_invalid_exits_3
        PASS [   0.012s] (1508/1512) minimal::bin/min tests::task_network_key_a_task_does_not_apply_exits_3
        PASS [   0.009s] (1509/1512) minimal::bin/min tests::task_not_found_exits_4
        PASS [   0.011s] (1510/1512) minimal::bin/min tests::task_run_is_a_stdout_contract
        PASS [   0.011s] (1511/1512) 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.58s

  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:

min box spec dev on a project whose loadout sets env_vars.GITHUB_TOKEN = "x" prints the warning line on stderr and the spec with GITHUB_TOKEN = "x" on stdout, and exits 0. min session start prints no such line. Every warning now ends with the [secrets] sentence, the inherit = true case included.

Notes from the agent: Round 2 applies C2 in commit 69cf26c. The StoredVar::Inherit arm no longer returns early, so its warning ends with 'Put a secret value in a [secrets] entry to keep it out of the spec.' The GH_TOKEN expectation in credential_like_env_var_name_warns now ends with that sentence. C1 and C3 are PR-body edits that a person made. I did not change the PR body. No other test or doc pins the old inherit text.

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

Choose a reason for hiding this comment

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

minimal-review — approval withheld

Verdict COMMENT — APPROVE withheld: 5 unresolved threads — minimal-foundry[bot] crates/mfile/src/expand.rs, minimal-arch[bot] crates/minimal/src/cmd/box_spec.rs:1036, minimal-arch[bot] crates/mfile/src/expand.rs, minimal-arch[bot] crates/mfile/src/expand.rs, minimal-arch[bot] crates/minimal/src/cmd/box_spec.rs:1036. No findings.

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

@agent-137
agent-137 marked this pull request as ready for review November 24, 2026 22:22
@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 edit at this head meets C2. Every secret-name warning, including the { inherit = true } case, now names [secrets], as architecture.md line 81 requires. The PR body meets C1 and C3. It lists the #3236 loadout gap and the #3778 wording interim as residuals. The store.rs changes in the compare come from #3777 through the merge from main. This ruling does not cover them. No condition stays open.

Ruled at 69cf26c 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 24, 2026
Merged via the queue into main with commit 786a504 Nov 24, 2026
39 checks passed
@mitodrummer
mitodrummer deleted the agent/3770-min-box-spec-warns-on-stderr-about-an-env-vars-v branch November 24, 2026 23:23
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