8000 test(mfile): read a lower-case env_vars name as a strict name · gominimal/minimal@35ce73f · GitHub
[go: up one dir, main page]

Skip to content

test(mfile): read a lower-case env_vars name as a strict name

Minimal Arch / arch-review succeeded Nov 21, 2026 in 0s

PASS

Inputs. First ruling on #3691 at 35ce73fd, on arch 4f2eb87d. That arch commit is PR #190, which changes the loadout example to [loadouts.env_vars]. No since.diff, since-conditions.json, findings.json or arch-map.md is staged. So I read pr.diff whole and found the sections by search. The task says covers: none, so the requirement is the task, T136.

Governs. Box Spec (line 1220: a loadout's variables are [loadouts.env_vars]). minimal.toml layout (line 1264 and line 1294: [env_vars] merges by variable name at every layer, loadouts included, and min box spec is exactly what a Box Host receives). Client maintenance (line 589: version skew fails closed with a named error).

Ruling. The change removes the lenient half of the loadout's variables, WireBoxEntry.vars_lenient and the client's strict/lenient split. One env_vars table now goes from the loadout and the expanded entry to compose_entry, which sets each variable by name over the project's. That is the design's one-table, merge-by-name model, and the wire now carries the entry's table whole, nearer to line 1294. Placement stays with the owners: boxes core, wire and daemon composer, and the minimal client. A name that is not POSIX-shaped is refused, not routed elsewhere (fail closed). The serde rename on WireContribution.vars and the WireBoxEntry field change have no alias. I checked the skew path. By default CreateSession carries must_match_version, and serve_create_session refuses a daemon of another build before ConfigureLoadout sends the contribution. Under the skew override, a mismatched pair fails at decode on the required field, so it also fails closed. The compose record now logs env_vars in place of vars and vars_lenient, as the task's observability line says. The design names no field for that record.

Design silent, noted for the next reviewer. The design states no case rule for variable names, so widening StrictVarName to [A-Za-z_][A-Za-z0-9_]* is not a deviation. A side effect: the daemon's grant-name checks (build_record in crates/minimald/src/box_manager.rs, place_sealed_deliveries in crates/minimald/src/box_runtime.rs) now accept a lower-case grant name, while the client's is_secret_variable_name keeps upper case. Both refuse every name that is not a shell identifier, so the unquoted write into the sourced file stays safe. The case rule for [secrets] names is not in this checkout. The PR body says gominimal/arch#185 decides it. I did not see that issue. Also left as is: mfile::Session.vars_lenient, the upper-case $VAR rule in boxes/src/core/expansion.rs (patch paths, not env_vars), and the test-only edit in crates/mfile/src/expand.rs, which is outside the layers and not in the PR body's out-of-scope list.

Not checked. I did not build or run tests. agent-verify exited 100 on exec_run_attach_and_task_run_share_the_commands_trace in crates/minimal/tests/otel_cli.rs. That is a trace-timing test that does not touch variables, but I did not confirm that the failure is unrelated. The PR says no live box was started, so the proof that EDITOR and http_proxy reach a box environment is unit-level only.

Ruled at 35ce73f against gominimal/arch@4f2eb87d5d12 by claude-opus-5-5; arch_rulings 1571, job 09bda3f6-8ab2-4400-905f-77b00d69da7e.

0