Repository navigation
fix(boxes): T51 — The Box Egress Proxy refusals name the minimal.toml tables - #3433
mitodrummer merged 12 commits into
Conversation
The Box Egress Proxy refusals and the -o json hint now name [defaults.session.network.bep] or [defaults.session.secrets] in minimal.toml, where the setting loads today. The grant refusals of min box create, the pinned tests and the e2e hint read the new text.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Every failing check on
Re-run the failed jobs. If the same checks go red again on this head, the next failed suite starts a round; if this red is not the flake, |
|
Round 1 of 10 on a failed check suite: the coder changed nothing. Revise round 1: no new commits. The directive lists two failed checks, e2e and ci-macos-success. The ci-macos-success excerpt shows only the aggregator's |
|
Reviewed: no findings; approval withheld, 5 threads unresolved at APPROVE withheld: 5 unresolved threads — minimal-arch[bot] crates/boxes/src/core/bep.rs, minimal-arch[bot] crates/boxes/src/core/bep.rs, minimal-arch[bot] crates/boxes/src/core/bep.rs, minimal-foundry[bot] crates/boxes/src/core/bep.rs, minimal-foundry[bot] crates/minimal/src/cmd/box_spec.rs:540. Resolving the last thread releases the approval on this head. Resolve the open threads. Resolving the last one releases the approval on this head; no new review is required. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The refusals on min box start conform. There, the code reads grants only from [defaults.session], so the new text names the correct table. min box spec <entry> prints three of the same refusals for a spec that it expands from every layer. For a task or agent entry, or for an entry that sets its own secrets or network table, [defaults.session.*] is the wrong table (architecture.md lines 1205 and 1234). The hint then does not change the refused setting. C1 adds the table to these refusals and fills it from the layer that expand_entry already records.
Ruled at 6402c82 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
| "This box declares the secret {} but has no network, so the secret \ | ||
| cannot reach anything. Use --network own_ip, or remove the secret.", | ||
| cannot reach anything. Use --network own_ip, or remove {} from \ | ||
| [defaults.session.secrets] in minimal.toml.", |
There was a problem hiding this comment.
C1 · min box spec <entry> also prints this refusal, and that path reads secrets from every layer. For a [tasks.ci] entry, [defaults.session.secrets] is the wrong table (architecture.md line 1205). Print a table field here, and fill it from the layer that set the grant (C1).
| "This box declares a secret with steering = \"{}\", but this host has no \ | ||
| box DNS resolver. Set steering = \"proxy_env\" in [network.bep].", | ||
| box DNS resolver. Set steering = \"proxy_env\" in \ | ||
| [defaults.session.network.bep] in minimal.toml.", |
There was a problem hiding this comment.
C1 · [network.bep] can come from the entry or from [defaults.<type>]. An entry network table replaces the defaults table (architecture.md line 1234), so this hint can point at a value that has no effect. Name the table from the network source (C1).
| A grant with source = \"broker\" takes only github: scopes. For a secret \ | ||
| you stored with `min secret set`, write source = \"store\", \ | ||
| store = \"keychain\" and id = \"<id>\" in place of source and scopes." | ||
| you stored with `min secret set`, go to {grant} in [defaults.session.secrets] \ |
There was a problem hiding this comment.
C1 · BrokerScopeNotGithub is one of the refusals that box_spec.rs render previews for an expanded entry. Name the layer that set secrets, for example [tasks.<name>.secrets], not a fixed [defaults.session.secrets] (C1).
|
/revise Head Arch C1: each BEP refusal names the table that set the refused value.
Reply on PRRT_kwDOPdfcxM63b-IY, PRRT_kwDOPdfcxM63b-Ia and PRRT_kwDOPdfcxM63b-Ic with the commit. Change nothing else. |
…ress-proxy-refusals-name-the-minimal-t
The refusals and the un-enrolled next step named a fixed [defaults.session.*] table. min box spec <entry> previews the same refusals for a spec expanded from every layer, so the table now comes from the spec's BepTables.
min box start passes [defaults.session.secrets] and [defaults.session.network.bep], so its text does not change. min box spec <entry> passes the table of the layer that set secrets or network, such as [tasks.ci.secrets].
|
Round 2 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:
Each BEP refusal and the un-enrolled -o json hint name the minimal.toml table that set the refused value. min box start names [defaults.session.secrets] and [defaults.session.network.bep], as before. min box spec ci for a [tasks.ci] entry with a refused grant names [tasks.ci.secrets]. An edit in the named table changes the refused setting. Notes from the agent: Revise round 2 (arch C1). The refusal variants NoNetworkWithGrant, SteeringOffWithProxyEnv, NoResolver, InstallationUnenrolled, UnenrolledNode, StoreReferenceToSignIn and BrokerScopeNotGithub now carry a table field. ActivationSpec carries BepTables. create.rs passes BepTables::SESSION. box_spec.rs passes the table of the layer that set secrets or network (setting_table). When no file table set the value, it names the entry's own table, or [defaults..*] for the implicit default entry. SignInRequired names no table, so it has no field. unenrolled_node and store_refusals keep their signatures and fill [defaults.session.secrets]: only min box start and minimald (crates/minimald/src/box_manager.rs, not touched) raise them. Outside layers: crates/minimal/src/cmd/box_spec.rs (the directive asked for it, edit limited to passing the table) and crates/minimal/src/tests.rs (the new min box spec test the directive asked for, plus the earlier round's edits). scripts/session-e2e.sh needed no change this round, because the min box start text did not change. Commits: dad1606 (boxes), 7dd1869 (minimal). |
|
The runtime will not revise this pull request again on its own: the diff is +431/-61 (492 lines), past 3x the plan's estimate of 90 lines (est: 25 code, 65 tests, as #3424 reads now), at round 2 (the last trigger was a /revise note). A person decides now. Remove |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The two fix commits resolve the earlier conditions. Each BEP refusal now takes its minimal.toml table as a field. min box spec <entry> names the table of the layer that set secrets or network. This follows the expansion order in architecture.md lines 1205 and 1231. min box start reads [defaults.session], and its refusals name that table. I found no deviation from the design.
Ruled at 7dd1869 against gominimal/arch@15b603e6afb8 by claude-opus-5-5.
| // Only `min box start` and the daemon refuse this, and both read the | ||
| // grants from `[defaults.session.secrets]`. | ||
| let refusal = BepRefusal::UnenrolledNode { | ||
| grants, | ||
| stored, | ||
| cause, | ||
| table: SESSION_SECRETS_TABLE.to_owned(), | ||
| }; |
There was a problem hiding this comment.
MEDIUM · correctness · confidence 0.60 · in unenrolled_node
The comment says only min box start and the daemon refuse this, and both read grants from [defaults.session.secrets]. The daemon check in crates/minimald/src/box_manager.rs (unenrolled_broker_refusal, line 4418) runs on any create spec, including task entries. For a task entry whose grant sits in [tasks.ci.secrets], the refusal tells the person to edit [defaults.session.secrets]. That edit does not remove the grant. This is the same wrong-table defect that the review threads fixed for min box spec. Pass the table in from the caller, or word the hint without a fixed table when the daemon cannot know it.
What the reviewer checked
bep.rs:1175 table: SESSION_SECRETS_TABLE.to_owned(); box_manager.rs:1869 boxes::core::bep::unenrolled_node(grants.clone(), not_github, ProxyAbsence::NotServed) with no box type input
Hand this to an agent
Act on a code-review finding.
File: crates/boxes/src/core/bep.rs
Lines: 1169-1176
Category: correctness
Severity: medium (reviewer confidence 0.60)
Finding:
The comment says only `min box start` and the daemon refuse this, and both read grants from `[defaults.session.secrets]`. The daemon check in `crates/minimald/src/box_manager.rs` (`unenrolled_broker_refusal`, line 4418) runs on any create spec, including task entries. For a task entry whose grant sits in `[tasks.ci.secrets]`, the refusal tells the person to edit `[defaults.session.secrets]`. That edit does not remove the grant. This is the same wrong-table defect that the review threads fixed for `min box spec`. Pass the table in from the caller, or word the hint without a fixed table when the daemon cannot know it.
First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.
👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.
There was a problem hiding this comment.
Addressed in f1f1a568b993: Fixed in ddf833f and b05faf2. unenrolled_node now takes the table as Option. min box start passes [defaults.session.secrets], because it reads the grants from [defaults.session]. The daemon passes None, and its text and next_step read 'remove {grants} from the secrets of this box's entry in minimal.toml'. The doc comment is corrected. unenrolled_refusal_of_a_task_entry_names_no_session_table pins a task-entry spec.
| fn setting_table( | ||
| report: &mfile::expand::ExpansionReport, | ||
| entry: &mfile::entry::BoxEntry, | ||
| key: &str, | ||
| path: &str, | ||
| ) -> String { | ||
| use mfile::expand::{Layer, ValueOrigin}; | ||
| let box_type = entry.box_type.as_deref().unwrap_or(boxes::SESSION_BOX_TYPE); | ||
| let layer = match report.values.get(key) { | ||
| Some(ValueOrigin::Value(origin)) => Some(origin.layer), | ||
| _ => None, | ||
| }; | ||
| match layer { | ||
| Some(Layer::Defaults) => format!("[defaults.{path}]"), | ||
| Some(Layer::DefaultsType) => format!("[defaults.{box_type}.{path}]"), | ||
| _ if entry.implicit => format!("[defaults.{box_type}.{path}]"), |
There was a problem hiding this comment.
LOW · correctness · confidence 0.50 · in setting_table
setting_table falls through to the entry's own table for every layer except Defaults and DefaultsType. A value set by Layer::TypeDefaults, Layer::Loadouts or Layer::Upstream therefore names [tasks.ci.secrets], a table that does not set it. An edit there does not change the refused grant. Handle those layers, for example by naming the loadout or the type default, or state that the value comes from outside the file.
What the reviewer checked
box_spec.rs: match layer { Some(Defaults) .. Some(DefaultsType) .. _ if entry.implicit .. _ => [entry.table.key().name.path] }; Layer also has Upstream, TypeDefaults, Loadouts (mfile/src/expand.rs:92-104)
Hand this to an agent
Act on a code-review finding.
File: crates/minimal/src/cmd/box_spec.rs
Lines: 510-525
Category: correctness
Severity: low (reviewer confidence 0.50)
Finding:
`setting_table` falls through to the entry's own table for every layer except Defaults and DefaultsType. A value set by `Layer::TypeDefaults`, `Layer::Loadouts` or `Layer::Upstream` therefore names `[tasks.ci.secrets]`, a table that does not set it. An edit there does not change the refused grant. Handle those layers, for example by naming the loadout or the type default, or state that the value comes from outside the file.
First verify this against the code yourself. It is model output and
may be wrong. If it is wrong, or the tradeoff was deliberate, say so
and change nothing.
👍 useful · 👎 noise — react to tell the reviewer. Replying works too, and says more.
There was a problem hiding this comment.
Addressed in f1f1a568b993: Fixed in c01ad81. Upstream and TypeDefaults sit below Entry in the fold, so the entry's own table is right for them: an edit there replaces the lower value. Loadouts and Overrides sit above Entry. Loadouts now names 'the loadout <name>' from the report's Origin.loadout, or 'a selected loadout'. Overrides names 'the command line'. The doc comment says this, and setting_table_names_the_layer_above_the_entry pins it.
|
Marking ready for review. CI is green at |
|
/revise Head 1. MEDIUM, PRRT_kwDOPdfcxM63cmpl: the daemon's unenrolled-node refusal names a table it cannot know.
2. LOW, PRRT_kwDOPdfcxM63cmpn:
3. PR body. |
…ress-proxy-refusals-name-the-minimal-t
unenrolled_node takes the minimal.toml table that set the grants. A caller that cannot know it passes None, and the text names the secrets of the box's entry. A non-table source reads without 'in minimal.toml'.
A value from a selected loadout or a flag sits above the entry, so an edit to the entry's table does not change it.
…ress-proxy-refusals-name-the-minimal-t
|
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:
Each BEP refusal and hint names the minimal.toml table where an edit changes the refused setting. min box start names [defaults.session.secrets]. min box spec names the layer that set the value, or the loadout or the command line when a layer above the entry set it. The host daemon cannot know the table, so its refusal tells the person to remove the grant from the secrets of the box's entry in minimal.toml. Notes from the agent: Revise round 1. The directive asked for changes in two files outside the task's layers. crates/minimald/src/box_manager.rs passes no table to unenrolled_node. crates/minimald/src/box_manager/tests.rs adds unenrolled_refusal_of_a_task_entry_names_no_session_table. crates/minimal/src/cmd/box_spec.rs (changed in an earlier round) handles the Loadouts and Overrides layers in setting_table. min box start does not read its grants from the expansion. project_bep_and_grants reads them from [defaults.session], so create.rs passes [defaults.session.secrets] to require_proxy and unenrolled_node explicitly. A new Place helper in bep.rs writes 'in minimal.toml' after a bracketed table only, so 'the command line' and 'the loadout |
|
The runtime will not revise this pull request again on its own: the diff is +607/-70 (677 lines), past 3x the plan's estimate of 90 lines (est: 25 code, 65 tests, as #3424 reads now), at round 1 (the last trigger was a /revise note). A person decides now. Remove |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The new commits conform to the design. The un-enrolled refusal from the host daemon no longer names [defaults.session.secrets] for a task entry. Line 1224 merges that table into session entries only. setting_table names a loadout or the command line when that layer set the value. Lines 1250 and 1253 apply those layers after the entry. The ruling on 7dd1869 stands for the rest of the change.
Ruled at f1f1a56 against gominimal/arch@327e1b57d16b by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 5 unresolved threads — minimal-arch[bot] crates/boxes/src/core/bep.rs, minimal-arch[bot] crates/boxes/src/core/bep.rs, minimal-arch[bot] crates/boxes/src/core/bep.rs, minimal-foundry[bot] crates/boxes/src/core/bep.rs, minimal-foundry[bot] crates/minimal/src/cmd/box_spec.rs:532. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
|
Marking ready for review. CI is green at |
…ress-proxy-refusals-name-the-minimal-t # Conflicts: # crates/minimal/src/cmd/box_spec.rs
|
A merge of main before round 1, not counted against the cap (1 of 3), pushed as Resolved conflicts in:
Verify Outside the task's
Converted to a draft: something above needs a person before review. Each Box Egress Proxy refusal and hint names the minimal.toml table that set the refused value. That is [defaults.session.network.bep] or [defaults.session.secrets] for min box start, and the layer that set it for min box spec . A person who edits the named table gets a file that loads and changes the refused setting. Notes from the agent: This round resolves the merge conflict with main in crates/minimal/src/cmd/box_spec.rs. Main added a read_rules argument to proxy_rows, and this branch added a tables argument. The merge keeps both, so proxy_rows takes 8 arguments. It carries #[allow(clippy::too_many_arguments)], which follows the same pattern as secret.rs, exec.rs and policy.rs. Main's store-rule source rows are kept beside this branch's secrets_table and bep_table. The other merged files had no conflicts. cargo clippy -p minimal --all-targets is clean, and cargo fmt --check is clean. |
|
The runtime will not revise this pull request again on its own: the diff is +611/-70 (681 lines), past 3x the plan's estimate of 90 lines (est: 25 code, 65 tests, as #3424 reads now), at round 1 (the last trigger was a conflict with the base branch). A person decides now. Remove |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The head is a merge of main into the PASS head f1f1a568. The merge resolves one conflict in box_spec.rs. proxy_rows now takes both tables and read_rules, and the refusals still name the layer that set the value. That follows the expansion order in minimal.toml layout, lines 1224 and 1247–1250. The earlier PASS stands, and this change has no conditions.
Ruled at 00a857e against gominimal/arch@327e1b57d16b by claude-opus-5-5.
|
Marking ready for review. CI is green at |
T51 — The Box Egress Proxy refusals name the minimal.toml tables
slice: S3
kind: task
covers: BCLI-021, BCLI-078
size: S
est: 25 code, 65 tests
executor: agent
difficulty: routine
model: standard
diagnostics: each BEP refusal and hint names
[defaults.session.network.bep]or[defaults.session.secrets]in minimal.toml; bep_refusals_name_the_minimal_toml_table pins them, and the tests and script listed in the issue move with themobservability: none new; the refusal's existing debug line keeps its rule and fields
layers:
- client:
- crates/boxes/src/core/bep.rs: the refusals and
next_stepname[defaults.session.network.bep]and[defaults.session.secrets]in minimal.toml- crates/minimal/src/cmd/boxes/create.rs: the grant refusals name
[defaults.session.secrets]; the tests that pin the BEP text read the new text- crates/minimal/src/main.rs: the machine-mode test of the un-enrolled refusal's hint reads the new table
- scripts/session-e2e.sh: the pinned un-enrolled hint reads
[defaults.session.secrets]test: cargo nextest run -p boxes bep_refusals_name_the_minimal_toml_table
produces: none
consumes: none
proof: Following any BEP refusal's hint as written, in the minimal.toml table it names, gives a file that loads and changes the refused setting.
Proof
Each Box Egress Proxy refusal that tells the person to edit the project, and the -o json hint of the un-enrolled refusal, now names [defaults.session.network.bep] or [defaults.session.secrets] in minimal.toml. That is the table the file loads today: mfile reads [defaults.session] into the session settings, and its legacy hint itself asks to rename [session] to [defaults.session]. The grant refusals of box creation (invalid name, no store rule, denied store item) name [defaults.session.secrets] too.
Notes from the agent: Out of layers: crates/minimal/src/tests.rs. Five assertions in a_grant_box_with_no_proxy_is_refused_as_an_unenrolled_node pin the un-enrolled refusal text, and they break without this change. The plan did not list the file. Only those five strings changed. Wording: InstallationUnenrolled, StoreReferenceToSignIn, BrokerScopeNotGithub and NoNetworkWithGrant now say where to make the edit ("for GH_TOKEN in [defaults.session.secrets] in minimal.toml", "go to GH_TOKEN in [defaults.session.secrets] in minimal.toml", "remove GH_TOKEN from [defaults.session.secrets] in minimal.toml"). PROJECT_ACKNOWLEDGEMENT_IGNORED names [defaults.session.secrets]. Not changed: the egress.allow_dns_hosts hints (the task names only the bep and secrets tables), and NarrowScopesUnenrolled, which names [secrets] in config.toml, not minimal.toml. scripts/session-e2e.sh: only the pinned hint changed. Its fixtures still write the legacy [session.*] tables, which still load. The e2e script was not run on this box (it needs a VM). Commit subjects: the first commit was made before cargo fmt, so a second style commit formats the new test.
Tests
cargo nextest run -p boxes bep_refusals_name_the_minimal_toml_tableVerify
min task run agent-verifyexited 100, so this PR is a draft.Out of scope
These files are outside the task's
layers:, so this PR is a draft:crates/minimal/src/tests.rsCloses #3424