8000 fix(mfile): word the secret-name warning for an inherit variable · gominimal/minimal@19be569 · GitHub
[go: up one dir, main page]

Skip to content

fix(mfile): word the secret-name warning for an inherit variable

Minimal Arch / arch-review failed Nov 24, 2026 in 0s

CONDITIONS

Inputs. Re-review of #3776 at 19be5694, on arch 4f2eb87d, the same arch commit as the ruling at b8759661 (PASS_WITH_CONDITIONS). since.diff runs from b8759661. since-conditions.json holds C1. No findings.json and no arch-map.md are staged. The compare adds StoredVar and a different warning text for each env_vars shape in crates/mfile/src/expand.rs. It also carries a BOX-232 spec hunk that comes from main (#3772), not from this PR: changed_files does not list the spec. I read since.diff, then pr.diff whole, and the changed code at head.

Governs. architecture.md minimal.toml layout line 1294: min box spec <entry> renders exactly what the host receives. Box Spec lines 1015-1016: a string in [env_vars] is a static value, and the table form controls inheritance. Configuration line 81: secrets are references declared in [secrets]. The warning text itself is BOX-231 (spec 29) and BCLI-084 (spec 28). Arch says nothing on it. Placement is unchanged and conforms: the expander in mfile detects, and only box_spec.rs prints on stderr.

Conditions from the last ruling. C1: open. The PR body at this head still lists only #3778 under Residuals. It still says no product path sets Layers.loadouts, and it keeps Closes #3210. crates/minimal/src/cmd/boxes/create.rs line 2298 still sets whole.loadouts. The compare touches only code.

New in the compare. merge_vars stores var.value as written and uses resolve_var only for the BOX-183 conflict check (expand.rs lines 1342-1384). So the new Inherit text, which says the spec stores { inherit = true } and no value, is true. But that arm returns early, so its warning does not name [secrets]. BOX-231 and BCLI-084 require every warning to name [secrets]. That gives C2. The arm also does not say the value is stored as written. Here the spec wording is too broad for an inherit, and the code is more correct than the spec. Rule 9 says amend the spec, not the code. The residual #3778 already asks for a BOX-231 amendment for inherit variables. C3 makes the residual state the interim that this head ships.

Ruling. C2 is a code edit that the change needs before it conforms, so the verdict is CONDITIONS. Departure from precedent: the ruling at b8759661 was PASS_WITH_CONDITIONS. The compare adds the C2 deviation, which did not exist at that head. That is the reason for the change, against line 81.

Not checked. I did not compile or run the tests. Whether the minimal CLI test still passes needs a build. The literal path that it pins is unchanged in the compare.

Conditions

  • C1: Carried open from the ruling at b875966. It is not met at 19be569. The PR body is unchanged on this point. In the PR body ## Residuals, add: "min box spec does not fold the selected loadouts into its expansion, so it prints no BOX-231 warning for a variable that only a loadout sets, though min box start stores that value (crates/minimal/src/cmd/boxes/create.rs line 2298 sets whole.loadouts). #3236." Correct the note that says no product path sets Layers.loadouts. Keep Closes #3210 only with that residual listed. Otherwise change it to Refs #3210.
  • C2: crates/mfile/src/expand.rs impl Display for SecretNameWarning: the StoredVar::Inherit arm (line 301) writes its sentence and falls through to the final Put a secret value in a [secrets] entry to keep it out of the spec. sentence, as the other two arms do. Remove the early return. Update the expected GH_TOKEN string in the credential_like_env_var_name_warns test (line 3769) to end with that sentence. BOX-231 and BCLI-084 require every warning to name [secrets].
  • C3: In the PR body ## Residuals, rewrite the #3778 line to state the interim that this head ships: for { inherit = true } with no default, the warning says the spec stores { inherit = true }, not that a value is stored as written. That departs from the BOX-231 and BCLI-084 wording until #3778 amends them. Keep the #3778 link.

Ruled at 19be569 against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5; arch_rulings 1677, job e1f4de14-f1b6-4614-a131-ce4e02c9e1cf.

0