8000 fix(boxes): T51 — The Box Egress Proxy refusals name the minimal.toml tables by minimal-foundry[bot] · Pull Request #3433 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content
< 8000 div class="prc-PageLayout-HeaderContent-gdFfN" style="--spacing:var(--spacing-none)">

fix(boxes): T51 — The Box Egress Proxy refusals name the minimal.toml tables - #3433

Merged
mitodrummer merged 12 commits into
mainfrom
agent/3424-the-box-egress-proxy-refusals-name-the-minimal-t
Nov 16, 2026
Merged

mitodrummer merged 12 commits into
mainfrom
agent/3424-the-box-egress-proxy-refusals-name-the-minimal-t

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

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 them
observability: 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_step name [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

line exit tail
cargo nextest run -p boxes bep_refusals_name_the_minimal_toml_table 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) C

Verify

min task run agent-verify exited 100, so this PR is a draft.

 {
                "parent_span_id": "a9d58d6a77d59a2c",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "6c6c5d1c2c6130a2",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "6c6c5d1c2c6130a2",
                "queued_behind": "0",
                "span_id": "21b599b81c69fbb0",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "a9d58d6a77d59a2c",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "45268f466f3c0edf",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "45268f466f3c0edf",
                "queued_behind": "0",
                "span_id": "a46971735d68aad3",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "45268f466f3c0edf",
                "queued_behind": "0",
                "span_id": "9b918e1b2fc5ea31",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "9b918e1b2fc5ea31",
                "span_id": "e7281602f879344f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "9b918e1b2fc5ea31",
                "queued_behind": "0",
                "span_id": "d5a0ace9703a68e1",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  72.969s] 1776 tests run: 1775 passed, 1 failed, 2 skipped
        FAIL [   3.051s] (1776/1776) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Out of scope

These files are outside the task's layers:, so this PR is a draft:

  • crates/minimal/src/tests.rs

Closes #3424

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.
@coderabbitai
coderabbitai Bot commented Nov 14, 2026 •
Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d9aeea01-2cd7-4558-bc32-29b0ecc32f3a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Every failing check on 6402c829e08f matches an open known-flake issue, so the failed suite started no revise round:

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, /revise <note> starts one now.

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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 exit 1. The e2e excerpt is cut off before the failing proof, so it does not show the cause. The lines it does show are expected min net expose refusals and echoed script source, not BEP text. I searched scripts/ for every BEP string this branch changed. The only pin is mp_next in proof_bep_ahm_missing_proxy_refused (scripts/session-e2e.sh:18803), and it matches the new UnenrolledNode text in crates/boxes/src/core/bep.rs character for character. No other script or test still pins the old [session.secrets] or [network.bep] text. So I found nothing on this branch that explains the e2e failure, and I did not change code to guess at it. Re-run the e2e job, or provide the failing proof's output, if it fails again. Scope note from the earlier round: commit e2e2a2f touched crates/minimal/src/tests.rs. The layers do not name t…[truncated]

@agent-137
agent-137 marked this pull request as ready for review November 14, 2026 09:15
@agent-137
agent-137 requested a review from a team as a code owner November 14, 2026 09:15
@minimal-foundry
minimal-foundry Bot commented Nov 14, 2026 •
Copy link
Copy Markdown
Contributor Author

Reviewed: no findings; approval withheld, 5 threads unresolved at 00a857e85d75.

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.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 14, 2026
@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread crates/boxes/src/core/bep.rs Outdated
"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.",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 7dd186957e78: NoNetworkWithGrant now prints its table field. min box spec fills it from the layer that set secrets, for example [tasks.ci.secrets] (dad1606, 7dd1869).

Comment thread crates/boxes/src/core/bep.rs Outdated
"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.",
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 7dd186957e78: NoResolver and SteeringOffWithProxyEnv now print the network.bep table of the layer that set network, so an entry's own network table is named when it sets one (dad1606, 7dd1869).

Comment thread crates/boxes/src/core/bep.rs Outdated
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] \
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in 7dd186957e78: BrokerScopeNotGithub now prints the secrets table of the layer that set secrets. box_spec_task_entry_refusal_names_the_task_secrets_table pins [tasks.ci.secrets] (dad1606, 7dd1869).

@agent-137
Copy link
Copy Markdown
Member

/revise

Head 6402c829. This round answers arch ruling C1 (run 132402438649).

Arch C1: each BEP refusal names the table that set the refused value.
min box start reads grants only from [defaults.session], so its text is right. min box spec <entry> prints the same refusals for a spec that it expands from every layer. For a [tasks.<name>] 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).

  • In crates/boxes/src/core/bep.rs, every refusal whose text names [defaults.session.secrets] or [defaults.session.network.bep] takes the table as a field instead of a fixed string. That covers NoNetworkWithGrant, SteeringOffWithProxyEnv, NoResolver, InstallationUnenrolled, StoreReferenceToSignIn, BrokerScopeNotGithub, the sign-in refusal and the un-enrolled next_step. The text prints in <table> in minimal.toml.
  • min box start (crates/minimal/src/cmd/boxes/create.rs) passes [defaults.session.secrets] and [defaults.session.network.bep], so its text does not change.
  • min box spec (crates/minimal/src/cmd/box_spec.rs) passes the layer that expand_entry recorded as setting secrets or network, for example [tasks.ci.secrets] or [boxes.dev.network.bep]. An entry's network table replaces the defaults table, so name the entry's table when the entry sets one. box_spec.rs is outside this task's layers, but the condition needs it. Keep that edit to passing the table.
  • Add a test: min box spec for a [tasks.ci] entry whose secrets grant is refused names [tasks.ci.secrets].

Reply on PRRT_kwDOPdfcxM63b-IY, PRRT_kwDOPdfcxM63b-Ia and PRRT_kwDOPdfcxM63b-Ic with the commit.

Change nothing else.

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].
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 2 of 10 on a /revise note, pushed as 7dd186957e78.

line exit tail
cargo nextest run -p boxes bep_refusals_name_the_minimal_toml_table 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) C

Verify min task run agent-verify exited 100.

 {
                "parent_span_id": "7113ec6a25c10add",
                "rpc": "minimald-v1-GetSessionRecord",
                "span_id": "5f431801b55e7501",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "5f431801b55e7501",
                "queued_behind": "0",
                "span_id": "ea6224403bee2234",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "7113ec6a25c10add",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "e0e15f824d05e53a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "e0e15f824d05e53a",
                "queued_behind": "0",
                "span_id": "e0e278146568e208",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "e0e15f824d05e53a",
                "queued_behind": "0",
                "span_id": "c49b77449bfd727b",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "c49b77449bfd727b",
                "span_id": "c4361608f8bb398f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "c49b77449bfd727b",
                "queued_behind": "0",
                "span_id": "d9d8c73c979d446d",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 
────────────
     Summary [  79.832s] 1781 tests run: 1780 passed, 1 failed, 2 skipped
        FAIL [   3.247s] (1781/1781) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Outside the task's layers::

  • crates/minimal/src/cmd/box_spec.rs
  • crates/minimal/src/tests.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/boxes/src/core/bep.rs: NoNetworkWithGrant now prints its table field. min box spec fills it from the layer that set secrets, for example [tasks.ci.secrets] (dad1606, 7dd1869).
  • 👍 valid — crates/boxes/src/core/bep.rs: NoResolver and SteeringOffWithProxyEnv now print the network.bep table of the layer that set network, so an entry's own network table is named when it sets one (dad1606, 7dd1869).
  • 👍 valid — crates/boxes/src/core/bep.rs: BrokerScopeNotGithub now prints the secrets table of the layer that set secrets. box_spec_task_entry_refusal_names_the_task_secrets_table pins [tasks.ci.secrets] (dad1606, 7dd1869).

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).

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 14, 2026 10:17
@minimal-foundry minimal-foundry Bot added the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Nov 14, 2026
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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 needs-human from this pull request to let /revise <note> or the automatic rounds resume, or finish #3424 by hand.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@minimal-foundry minimal-foundry Bot left a comment
10BC8 Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 2 findings, 2 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread crates/boxes/src/core/bep.rs Outdated
Comment on lines 1169 to 1176
// 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(),
};
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +510 to +525
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}]"),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@minimal-foundry minimal-foundry Bot removed the review:approved minimal-review approved the current head label Nov 14, 2026
@agent-137 agent-137 removed the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Nov 15, 2026
@agent-137
Copy link
Copy Markdown
Member

Marking ready for review. CI is green at 7dd18695. Two files are outside #3424's layers:, and arch ruling C1 needs both: crates/minimal/src/cmd/box_spec.rs works out which minimal.toml table set each BEP value, so the refusal can name it, and crates/minimal/src/tests.rs pins that. Karl removed needs-human.

@agent-137
agent-137 marked this pull request as ready for review November 16, 2026 00:51
@agent-137
Copy link
Copy Markdown
Member

/revise

Head 7dd18695. This round answers the two open minimal-review threads. Change nothing else.

1. MEDIUM, PRRT_kwDOPdfcxM63cmpl: the daemon's unenrolled-node refusal names a table it cannot know.
unenrolled_node (crates/boxes/src/core/bep.rs, around line 1169) always sets table to [defaults.session.secrets]. The daemon calls it from unenrolled_broker_refusal (crates/minimald/src/box_manager.rs, around line 1869) for every create spec, task entries included. For a grant in [tasks.ci.secrets], the hint therefore tells the person to edit a table that does not set the grant.

  • Make the table a parameter of unenrolled_node.
  • A caller that knows the layer that set secrets passes that table. min box start passes it from the expansion, as box_spec.rs does with setting_table.
  • The daemon does not know which table set the grant, so its refusal names none. Its next_step reads: "to create the box without the grant, remove {grants} from the secrets of this box's entry in minimal.toml".
  • Correct the doc comment that says both callers read [defaults.session.secrets].
  • Add a test: the daemon refusal for a task-entry spec carrying a GitHub grant names no [defaults.session.secrets] table.
  • Reply on the thread with the commit.

2. LOW, PRRT_kwDOPdfcxM63cmpn: setting_table for the layers above the entry.
Upstream and TypeDefaults sit below Entry in the fold, so naming the entry's own table is right for them: an edit there replaces the lower value. Say that in the reply, and change nothing for those two. Loadouts and Overrides sit above Entry, so an edit to the entry's table does not change the value they set. Fix those two:

  • Overrides names "the command line".
  • Loadouts names the selected loadout that set the value, if the expansion report records which one. Otherwise it names "a selected loadout".
  • Update the doc comment of setting_table to match. Add a test for the Loadouts case.
  • Reply on the thread with the commit.

3. PR body.
Add one line under the notes saying that the daemon's refusal names no table, and why.

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.
< 8 div clas 10BC8 s="pr-1 d-md-inline-block d-none">
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on a /revise note, pushed as f1f1a568b993.

line exit tail
cargo nextest run -p boxes bep_refusals_name_the_minimal_toml_table 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) C

Verify min task run agent-verify exited 100.

  "span_id": "aebecfcb022e0425",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "e2935be8381e8daf",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "d0ac8a04cd3159c9",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "d0ac8a04cd3159c9",
                "queued_behind": "0",
                "span_id": "8f54ef9a2ff9b59f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "d0ac8a04cd3159c9",
                "queued_behind": "0",
                "span_id": "96350a214f9c37d7",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "96350a214f9c37d7",
                "span_id": "ce4b1cc964cab0cc",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "96350a214f9c37d7",
                "queued_behind": "0",
                "span_id": "42a435fef3dd8d75",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 3 tests still running
        PASS [   2.395s] (1821/3293) minimald box_actor::tests::a_box_destroyed_inside_the_landing_window_is_not_resurrected
        PASS [   2.404s] (1822/3293) minimald box_actor::tests::a_box_destroyed_between_enumeration_and_grant_is_released_once
        PASS [   2.459s] (1823/3293) minimald box_actor::tests::a_box_holding_a_host_row_refuses_remint_after_its_host_loop_ends
────────────
     Summary [  75.964s] 1823/3293 tests run: 1822 passed, 1 failed, 29 skipped
        FAIL [   3.049s] (1820/3293) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
warning: 1470/3293 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)
error: test run failed

Outside the task's layers::

  • crates/minimal/src/cmd/box_spec.rs
  • crates/minimal/src/tests.rs
  • crates/minimald/src/box_manager.rs
  • crates/minimald/src/box_manager/tests.rs

Converted to a draft: something above needs a person before review.

Review threads the coder judged:

  • 👍 valid — crates/boxes/src/core/bep.rs: 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 i
  • 👍 valid — crates/minimal/src/cmd/box_spec.rs:532: 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'. O

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 x' read correctly. scripts/session-e2e.sh needs no change: min box start still prints [defaults.session.secrets]. PR body line for item 3 (the runner writes the body): 'The daemon's un-enrolled refusal names no table. The daemon gets a spec from any entry, and not the minimal.toml table that set its secrets, so its hint says to remove the grant from the secrets of the box's entry.' The commits are ddf833f (boxes), b05faf2 (minimald, create.rs, main.rs), c01ad81 (box_spec.rs) and 9ca7632 (test split). just clippy-strict was not run.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 16, 2026 01:20
@minimal-foundry minimal-foundry Bot added the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Nov 16, 2026
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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 needs-human from this pull request to let /revise <note> or the automatic rounds resume, or finish #3424 by hand.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

< 10BC8 div class="d-flex flex-items-center flex-wrap gap-1"> @minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@agent-137
Copy link
Copy Markdown
Member

Marking ready for review. CI is green at f1f1a568. Four files are outside #3424's layers:, and this change needs all four. Round 3 passes the table into the daemon's unenrolled-node refusal, which needs crates/minimald/src/box_manager.rs and crates/minimald/src/box_manager/tests.rs. Arch C1 needs crates/minimal/src/cmd/box_spec.rs and crates/minimal/src/tests.rs, as before.

@agent-137
agent-137 marked this pull request as ready for review November 16, 2026 03:51
@mitodrummer mitodrummer left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 16, 2026
@mitodrummer mitodrummer removed the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Nov 16, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Nov 16, 2026
…ress-proxy-refusals-name-the-minimal-t

# Conflicts:
#	crates/minimal/src/cmd/box_spec.rs
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

A merge of main before round 1, not counted against the cap (1 of 3), pushed as 00a857e85d75.

Resolved conflicts in: crates/minimal/src/cmd/box_spec.rs

line exit tail
cargo nextest run -p boxes bep_refusals_name_the_minimal_toml_table 0 warning: unknown fields in task runtime-implement-test-0: network help: do you need to update to a newer version of minimal? Running task runtime-implement-test-0 in box runtime-implement-test-0-1... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) C

Verify min task run agent-verify exited 100.

               "span_id": "698eb28d7944b250",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "rpc",
            fields: {
                "parent_span_id": "c21b5dc6cbeaa9a6",
                "rpc": "minimald-v1-DestroySession",
                "span_id": "6da209ceb6a2e7a9",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "6da209ceb6a2e7a9",
                "queued_behind": "0",
                "span_id": "0e258decb9d9afb2",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "6da209ceb6a2e7a9",
                "queued_behind": "0",
                "span_id": "d7c1a58a0c8353ec",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "d7c1a58a0c8353ec",
                "span_id": "d6ce2293ef033737",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "HandOverName",
                "parent_span_id": "d7c1a58a0c8353ec",
                "queued_behind": "0",
                "span_id": "cb74f0e9579a085d",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
    ]
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

  Cancelling due to test failure: 3 tests still running
        PASS [   2.299s] (1827/3298) minimald box_actor::tests::a_box_nobody_handed_an_address_publishes_at_the_answerers_grant
        PASS [   2.294s] (1828/3298) minimald box_actor::tests::a_box_re_registered_inside_the_landing_window_keeps_its_grant
        PASS [   2.267s] (1829/3298) minimald box_actor::tests::a_contended_walk_never_replaces_a_present_verdict
────────────
     Summary [  69.006s] 1829/3298 tests run: 1828 passed, 1 failed, 29 skipped
        FAIL [   2.846s] (1826/3298) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
warning: 1469/3298 tests were not run due to test failure (run with --no-fail-fast to run all tests, or run with --max-fail)
error: test run failed

Outside the task's layers::

  • crates/minimal/src/cmd/box_spec.rs
  • crates/minimal/src/tests.rs
  • crates/minimald/src/box_manager.rs
  • crates/minimald/src/box_manager/tests.rs

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.

@minimal-foundry
minimal-foundry Bot marked this pull request as draft November 16, 2026 04:46
@minimal-foundry minimal-foundry Bot added the needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs. label Nov 16, 2026
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

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 needs-human from this pull request to let /revise <note> or the automatic rounds resume, or finish #3424 by hand.

@minimal-arch minimal-arch Bot left a comment
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@agent-137
Copy link
Copy Markdown
Member

Marking ready for review. CI is green at 00a857e8, the runtime's merge of main after #3441. The first run hit three known flakes: e2e-host-timeout_test.sh, minvmd concurrent_boots_never_draw_the_same_proxy_port, and hostname_allowlist_toolchain_completes (#3353). The re-run of the failed jobs passed. The files outside layers: are the same four as at f1f1a568.

@agent-137
agent-137 marked this pull request as ready for review November 16, 2026 05:43
@mitodrummer mitodrummer left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved.

@mitodrummer
mitodrummer added this pull request to the merge queue Nov 16, 2026
Merged via the queue into main with commit f7b6e36 Nov 16, 2026
46 of 50 checks passed
@mitodrummer
mitodrummer deleted the agent/3424-the-box-egress-proxy-refusals-name-the-minimal-t branch November 16, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-human An agent handed off; a human must act, then clear this label. Set by defer and handoffs.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T51 — The Box Egress Proxy refusals name the minimal.toml tables

2 participants

0