Repository navigation
feat(minimal): T74 — min box spec <entry> folds the selected loadouts as the start does - #3830
Conversation
min box spec <entry> now expands the entry over the loadouts that min box start selects, with the type layers and the user policy's var ignore list, so the rendered spec matches what the start stores. It honours --no-loadouts and --no-hooks, and each env_vars name and each loadout value names the loadout that set it.
…ec-entry-folds-the-selected-loadouts-a
|
Important Review skippedBot 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.
|
|
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. |
|
/arch-review |
|
/revise Fix the lower-case sentence in the BOX-231 warning that this PR makes reachable from
|
…ec-entry-folds-the-selected-loadouts-a
|
/revise Follow-up to r1, as the owner of
|
|
That 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. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This change conforms to the design. The architecture says that min box spec <entry> takes the start's flags and renders exactly what the host receives (architecture.md line 1294). The selected loadouts are layer 6 of that expansion, and --no-hooks is in layer 7. expand_entry now builds the same layers as box_entry for the stored spec, and it honours --no-loadouts and --no-hooks. No condition is open. The lower-case sentence in the BOX-231 loadout warning comes from mfile, and no design line decides it.
Ruled at 8593b6b against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
T74 makes a loadout-only variable's warning reachable from min box spec <entry>, where it printed "the loadout `gh` sets it" mid-text. The Display now capitalises the label. The label builders stay lower case for the messages that use them mid-sentence.
|
Round 1 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: outside the task's The six tests pass, and Notes from the agent: Revise round 1: the second sentence of the BOX-231 warning now starts in upper case. |
The refusal opened its second sentence with the first layer's label, so a type default printed "the built-in `session` box type sets one value". It now uses the crate's sentence_start helper, which the secret-name warning shares.
|
Round 2 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: outside the task's The six box_spec_entry tests pass, and Notes from the agent: Revise round 2. crates/mfile/src/error.rs already had a private |
|
/arch-review |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The ruling at 8593b6b stands. The new commits change only the letter case of two messages in crates/mfile, and that crate owns both messages. The loadout fold in box_spec.rs does not change, so it still follows box.toml lines 8-10. The design states no rule on the letter case of a message. No condition is open.
Ruled at 539e45a against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5.
…kages or env_vars #3830 wrote that min box spec <ENTRY> includes the loadouts' values "as the spec of a started box does". It does not: the host stores the v0 Box Spec, built from the expansion without the selected loadouts (stamp_session_spec_as), and that spec has no env_vars. The box still gets the loadouts' packages and variables. The entry form now drops the comparison, and the box form says what its spec leaves out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA
…'s stored spec holds (gominimal#3847) * docs(cli): clear the prose-lint alerts on the name-rule lines the BOX tasks wrote vale flagged the two sentences that say which written box names min refuses with exit code 3 (an AI tricolon and a passive). Each now states the rule as two plain sentences, with the same meaning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * docs(cli): say that a box's stored spec does not yet hold loadout packages or env_vars gominimal#3830 wrote that min box spec <ENTRY> includes the loadouts' values "as the spec of a started box does". It does not: the host stores the v0 Box Spec, built from the expansion without the selected loadouts (stamp_session_spec_as), and that spec has no env_vars. The box still gets the loadouts' packages and variables. The entry form now drops the comparison, and the box form says what its spec leaves out. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * docs(cli): name the loadout layer without 'for example' in the box spec paragraph Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * docs(cli): rewrap the box spec paragraph Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * docs(cli): wrap the box spec paragraph's lines under 80 columns Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA * docs(cli): name the reserved box names, and link the stored-spec gap to gominimal#3257 - The box-name rule in the box start exit table and in box rename names the five reserved names, self included (arch C1). They are host, local, localhost, minimald and self, in any case, from RESERVED_NAMES. - The stored-spec paragraph links gominimal#3257, which tracks storing the loadouts' packages and env_vars (arch C2). It also says to pass min box spec <ENTRY> the same --loadout or --no-loadouts flags as the start. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016CYvTvep9ZaSf5pJMB2hQA --------- Co-authored-by: Karl Godard <karl@minimal.dev> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
T74 — min box spec folds the selected loadouts as the start does
slice: S5
kind: task
covers: BCLI-021, BCLI-073, BCLI-075, BCLI-076, BCLI-077, BCLI-084
size: M
est: 70 code, 150 tests
executor: agent
difficulty: moderate
model: standard
diagnostics: none new
observability: none new
layers:
- cli:
- crates/minimal/src/cmd/box_spec.rs:
entry_specresolves the loadouts first, foldsSelectedLoadouts::layersinto the expansion, honours--no-loadoutsand--no-hooks;origin_labelnames the loadout- crates/minimal/src/cmd/boxes/create.rs:
SelectedLoadouts::layersreachable from box_spec.rs; thestart_loadout_selectiondoc comment- crates/minimal/src/tests.rs: the three new tests,
box_spec_entry_loadouts_resolve_as_start, and any test that pins the entry form's output- crates/minimal/tests/cli.rs:
box_spec_entry_warns_on_a_loadout_only_secret_nametest: cargo nextest run -p minimal box_spec_entry_folds_selected_loadouts_as_start box_spec_entry_shows_builtin_default_loadout box_spec_entry_no_hooks_renders_no_hook box_spec_entry_loadouts_resolve_as_start box_spec_entry_warns_on_a_loadout_only_secret_name box_spec_entry_prints_secret_name_warnings_on_stderr
- docs:
- docs/reference/cli-min.md: the
box specsection on loadoutsproduces: none
consumes: none
proof: the six tests pass, and
git grep -n 'Folding their values into the spec is #3236' -- cratesprints nothing.This is a residual of epic #2879 (BCLI).
Proof
min box spec <entry>now renders the spec with the selected loadouts folded in, asmin box startstores it. A loadout's packages, env_vars and hooks appear in the spec and name the loadout (for example# env_vars.PAGER: from loadout dev).--no-loadoutsand--no-hookswork. A secret-looking variable from a loadout only gets its stderr warning. The six tests pass, andgit grep -n 'Folding their values into the spec is #3236' -- cratesprints nothing.Notes from the agent: Design: expand_entry in box_spec.rs now resolves the loadout gate and the loadouts before it expands the entry, which is the order the start uses. It puts SelectedLoadouts::layers (now pub(crate)) into Layers::loadouts and applies the user policy's var ignore list. The expansion folds loadouts only when it has the type chain's layers, because those layers open the loadout gate. So box spec now also sets the type layers through create.rs entry_type_layers (now pub(crate)), and it sets host_vars for inherit names, as box_entry does. One effect: the rendered spec now shows values from the type defaults, such as
loadout_modefromtype session defaults. For BCLI-077 the sources now have oneenv_vars.<NAME>row for each variable, which names the layer whose value the merge kept. Test change: box_spec_renders_formats_secrets_as_refs pinnedspec:followed directly bynetwork:. The built-in default loadout now addsenv_varsfirst, so I updated that assertion. Other runs:cargo nextest run -p minimal box_spec(46 passed) andcargo nextest run -p minimal spec loadout hooks(113 passed). Printed text: revisions r1 and r2 fixed the BOX-231 warning (see "Revisions" and "Outside the task's layers"). Its second sentence now starts upper case: "... looks like a secret's. The loadoutghsets it, in ." The new cli.rs test pins that text. I could not runjust lint-prose…[truncated]Tests
cargo nextest run -p minimal box_spec_entry_folds_selected_loadouts_as_start box_spec_entry_shows_builtin_default_loadout box_spec_entry_no_hooks_renders_no_hook box_spec_entry_loadouts_resolve_as_start box_spec_entry_warns_on_a_loadout_only_secret_name box_spec_entry_prints_secret_name_warnings_on_Verify
min task run agent-verifyexited 100 under rustc 1.100.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.Revisions
SecretNameWarning'sDisplaystarts its second sentence upper case through a helper,sentence_start. Before, a loadout or a type default printed "the loadoutghsets it" or "the built-insessionbox type sets it". The label builders (layer_words,loadout_file) are unchanged, because other messages use those labels mid-sentence.Error::LoadoutVarConflictuses the same helper for{first} sets one value. This follows the advice ofcrates/mfile's owner (the BOX session).{second}stays lower case, mid-sentence. New mfile tests cover a loadout layer and a type-default layer in both messages.main(with docs: clear the prose-lint alerts on the lines the BCLI tasks wrote #3826).Outside the task's layers
crates/mfile/src/expand.rs:SecretNameWarning'sDisplayand its tests. This PR makes a loadout-only variable's BOX-231 warning reachable frommin box spec <entry>, and that warning's second sentence started in lower case.crates/mfile/src/error.rs:sentence_start, andLoadoutVarConflict's first sentence. The same lower-case sentence start in a refusal, fixed with the same helper, as the crate's owner recommended.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.rscrates/minimal/src/tests.rsdocs/reference/cli-min.mdCloses #3236