8000 fix(minimal): address box spec review findings · gominimal/minimal@69b7227 · GitHub
[go: up one dir, main page]

Skip to content

fix(minimal): address box spec review findings

Minimal Arch / arch- 3913 review failed Nov 11, 2026

CONDITIONS

Baseline. This is a re-review of 69b7227b against the CONDITIONS on 1eda4a95 (this PR), on the same arch 15b603e6. The checkout has no arch-map.md, so I found the sections by search. The compare is one commit, and it touches only crates/minimal/src/cmd/box_spec.rs and crates/minimal/src/tests.rs.

Governs. min box line 476: the entry form validates, and an invalid file is exit 3. Line 477: the box form renders the stored spec. Output conventions line 381: every -o json object carries schema. Line 384: secrets never appear in any output mode. Addressing line 389: scripts bind to the id. Spec 28 line 635 and line 667 read a bare name as an entry first.

Ruling. Four of the five changes in the compare conform. These are the min/v1/spec stamp on both forms, the reference-only filter on a stored grant, the grant parse before the strip, and the tighter YAML quoting. The fifth is the fallback to the box form when minimal.toml does not load. It applies to every target. A bare name can be an entry, and the file that would say so is broken. So the fallback can show a same-named box with exit 0 where the design asks for exit 3. The new test pins exactly that case ([tasks.build, then min box spec build). C1 narrows the fallback to targets that cannot be entry names: a qualified address, a full id, or self. C2 makes the test prove the narrowed rule.

Precedent. This is not a departure from 1eda4a9. That ruling's text in the ledger is cut at 400 characters, so I could not read its conditions in full. The commit message says that the fallback answers one of them. C1 keeps the fallback for an id, so min box spec <id> still works in a directory with a broken minimal.toml. It removes the fallback only for the case that line 476 decides.

Not checked. I did not compile. I did not check that crate::output::ObjectType resolves from box_spec.rs, but five other modules use the same path. I did not check that resolve_box_on_local_hosts resolves self. The compare does not touch it.

Conditions

  • C1: crates/minimal/src/cmd/box_spec.rs box_spec_to(), the Err(project_error) arm (head lines 259-282): take the box form only when target cannot be an entry name. That is when super::box_verbs::parse_box_address(&target) is BoxAddress::Qualified, boxes::SessionId::parse_str(&target) is Ok, or target == "self". For every other target, return Err(project_error) (exit 3) before ensure_daemon and before any box lookup. Keep the existing override-flag check and the existing tracing::info! with outcome = "project file invalid" on the refusal path.
  • C2: crates/minimal/src/tests.rs box_spec_argument_directory_then_entry_then_box (head lines 15260-15275): with the invalid [tasks.build file, assert that min box spec build fails with crate::ProjectFileInvalid (exit 3) although box build exists. Then assert that min box spec <id_text>, the box's full id, renders # The spec box {id} was created with. past the invalid file. Keep the nothing-here assertion.

Ruled at 69b7227 against gominimal/arch@15b603e6afb8 by claude-opus-5-5; arch_rulings 1154, job 9b920a84-1d46-4c69-aae1-a557babdd0f5.

0