Repository navigation
fix(minimal): min box spec exits 3 for every BEP refusal that the start gives, with the same egress - #3622
Conversation
The preview now computes the session box's network mode and effective egress with the start's own helpers, and runs the whole activation check with no refusal filter. A project with a broker grant and an egress that does not admit the GitHub hosts now exits 3 from min box spec with the same text as the start.
An own_ip box with no egress is refused by the start (BEP-008), and now by min box spec too. The row tests use a host_ip box, which admits every host.
…ec-exits-3-for-every-bep-refusal-that
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Un-drafted: the |
|
/review |
|
/arch-review |
|
Approved: no findings at Nothing to do. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The project form of min box spec now runs the start's whole BEP check with the start's network, egress and host facts. That part conforms to D6 and to line 1253. The entry form still skips the check for an entry with no credentialed grant. The start refuses such an entry with exit 3 when it sets steering = "off" with proxy_env (BEP-010). Line 476 says min box spec <entry> validates and exits 3 on invalid. Make the edit in C1.
Ruled at 5e59eec against gominimal/arch@8b824707cde6 by claude-opus-5-5.
|
/revise Arch condition C1 ( |
…ec-exits-3-for-every-bep-refusal-that
…ntry The entry preview ran the activation check only for a credentialed grant, so an entry with no grant and steering "off" with proxy_env got no refusal, while the start refused it with exit 3 (BEP-010). The preview now checks every entry and prints rows only for a credentialed grant. It also runs the start's store reference check (BEP-034, BEP-036) after the activation check, in the start's order. The store fixtures in two row tests now allow their rule's upstream in the egress, as the start requires.
|
Round 1 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
For a project with a broker grant and no egress allow for the GitHub hosts, min box spec and min session both exit 3 with the same refusal text. min box spec now also gives the start's exit 3 refusal in three more cases: an entry with no grant and steering "off" with proxy_env, a store reference with no egress section, and an allow_dns_hosts list on a host_ip box on a VM host. Notes from the agent: Revise round 1. expand_entry now calls proxy_rows for every entry, and rows_text stays empty when no grant is credentialed. render now also runs the start's check_store_references (deny set and egress, BEP-034/BEP-036) after check_activation, in the start's order. Before this change the preview never refused a store reference outside the egress. A store reference with no rule, or a rule that asks or denies, still prints a row in the preview, because the start decides those as consent and not as a refusal. The new test box_spec_entry_preview_refuses_like_start in create.rs covers the three cases from the directive. Its start_refusal_of helper runs refuse_unhonourable_grants and then check_store_grants for the entry. Out of layers: crates/minimal/src/tests.rs. Its box_spec_render_carries_client_store_rules fixture had a store rule upstream that its egress did not allow, and the start refuses that fixture. I added allow_dns_hosts = ["registry.npmjs.org"] so that the test still checks the render. The test runs under the box_spec test line. The fixture in box_spec_lists_store_references_with_their_authorities got the same fix: its egress now allows the rule's anthropic hosts. The start reads its refusal tables from [defaults.session]. So the new test puts the settings in [defaults.session] and [defaults.network.egress], where the preview and the start name the same tables. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The ruling on 5e59eec set C1, and this head meets it. expand_entry now runs the start's check for every entry. It prints rows only for a credentialed grant. A new test proves the BEP-010 refusal with exit 3 for an entry with no grant. The new store reference check in render follows the start's order. The change conforms to the min box spec line in architecture.md.
Ruled at 902052e against gominimal/arch@8b824707cde6 by claude-opus-5-5.
|
Marked ready: the lanes are green at this head. |
|
/review |
|
/arch-review |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. min box spec now runs the same activation check and store reference check as the start, with the same network, egress and host facts. architecture.md line 476 says the preview validates with exit 3, and line 1253 says its render is exactly what the host receives. The new tests compare the refusal text and exit code with the start's own steps. There are no conditions.
Ruled at 902052e against gominimal/arch@8b824707cde6 by claude-opus-5-5.
…ec-exits-3-for-every-bep-refusal-that
The entry preview read the full-breadth acknowledgement for every entry. The start reads it only when a grant is narrower than full, so an unreadable organization config.toml failed the preview and not the start. The preview now reads it under the same condition. min task run makes no grant check, so a task entry with no credentialed grant no longer runs the check. A session entry still runs the start's whole check for every entry.
|
Round 2 of 10 on the runtime's review findings, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
For a project with a broker grant and no egress allow for the GitHub hosts, min box spec and min session both exit 3 with the same refusal text. A session entry with no grant that the start refuses is refused by min box spec too. A task entry that min task run accepts is not refused by the preview. Notes from the agent: Revise round 2. proxy_rows reads the full-breadth acknowledgement only when a grant is narrower than full, as activate_box does. No test pins this. expand_entry already reads the user config.toml for loadouts, so only the organization config, at a fixed path, can show the difference. A task entry with no credentialed grant now skips the check, because task::run_entry makes no grant check. A task entry with a credentialed grant still runs the check and prints rows, as on main. The new test box_spec_task_entry_preview_accepts_what_task_run_accepts fails without the fix and passes with it. cargo fmt --check and cargo clippy -p minimal --all-targets report nothing. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The new commit makes min box spec <entry> refuse only what the start refuses. The preview reads config.toml only for a narrow grant, as activate_box does. A task entry with no credentialed grant skips the grant check, because min task run makes none. Lines 490 and 1253 of architecture.md say the preview shows exactly what the box gets. No condition is open.
Ruled at 4d8eb86 against gominimal/arch@8b824707cde6 by claude-opus-5-5.
|
Marked ready: the lanes are green at this head. |
|
/review |
|
/arch-review |
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 3 unresolved threads — minimal-arch[bot] crates/minimal/src/cmd/box_spec.rs, minimal-foundry[bot] crates/minimal/src/cmd/box_spec.rs, minimal-foundry[bot] crates/minimal/src/cmd/box_spec.rs. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to the design. min box spec now checks the grants against the same effective egress, network mode and host facts that the start uses, and it exits 3 with the start's refusal. Section min box line 476 and line 490 require this. The preview calls the start's own helpers, so the code is in the correct owner. The tests.rs edits follow the stricter gate and do not relax it.
Ruled at 4d8eb86 against gominimal/arch@8b824707cde6 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of 4d8eb865b498 withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
|
/review |
There was a problem hiding this comment.
Gate passed at 4d8eb86: minimal-review APPROVE, arch APPROVED, no open threads, lanes green.
Follow-up
Fixes #3586
crates/minimal/src/cmd/box_spec.rscrates/minimal/src/cmd/boxes/create.rsTask marker
Proof
For a project with a broker GitHub grant and an egress that does not allow the GitHub hosts (an egress that names other hosts, or no egress on an own_ip box), min box spec now exits 3 with the same refusal text that min session activate prints: 'This box declares a GitHub grant, but its egress does not allow: github.com, api.github.com, uploads.github.com, codeload.github.com. Add them to egress.allow_dns_hosts.' The test box_spec_preview_refuses_like_start runs the start's steps and min box spec on the same project and checks for the same text and e 8000 xit 3.
Notes from the agent: SpecInputs has a new egress field. render now runs check_activation with no refusal filter, before the no-grant early return, as the start runs it for every project. project_rows computes the network and the egress with the start's own helpers in a new project_network function (flag_network_overrides, project_egress, session_box_network, session_effective_egress, network_override_policy). The preview now also applies the project's network.mode, which preview_host ignored. preview_host is now #[cfg(test)], because only the create.rs parity test uses it. expand_entry passes the egress that it already computed to proxy_rows. In create.rs, session_effective_egress is now pub(crate), and a new test uses it.
Outside the layers: crates/minimal/src/tests.rs. The test line
cargo test -p minimal box_specruns box_spec_path_form_renders_bep_rows and box_spec_renders_formats_secrets_as_refs. Both expected rows for an own_ip box with no egress. The start refuses that box (BEP-008), so the two tests now use --network host_ip.The entry form (min box spec ) calls proxy_rows only when the entry has a broker grant. So for an entry with no grant, the entry form does not show the BEP-010 refusal (steering off with proxy_env). The project form now shows it. The project form still reads the grants from the [session] table, and the start reads them through the expansion. A project that decl…[truncated]
Tests
cargo test -p minimal box_spec_preview_refuses_like_startcargo test -p minimal box_specVerify
min task run agent-verifyexited 100, so this PR is a draft.Base
The base branch moved while the coder worked; it was merged in before the tests ran.
Out of scope
These files are outside the task's
layers:, so this PR is a draft:crates/minimal/src/tests.rs