8000 T109 — Name the cause and the next step in the grant and proxy refusals by minimal-foundry[bot] · Pull Request #2794 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

T109 — Name the cause and the next step in the grant and proxy refusals - #2794

Merged
norrietaylor merged 11 commits into
mainfrom
agent/2783-name-the-cause-and-the-next-step-in-the-grant-an
Oct 31, 2026
Merged

norrietaylor merged 11 commits into
mainfrom
agent/2783-name-the-cause-and-the-next-step-in-the-grant-an

Conversation

@minimal-foundry
Copy link
Copy Markdown
Contributor

T109 — Name the cause and the next step in the grant and proxy refusals

slice: S15
kind: task
covers: BEP-003
size: M
est: 180 code, 300 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: each refusal below states its cause and one next step in the words the person types, pinned by the tests in its layer
observability: the existing info line of each refused creation keeps its rule, fields and code; each proxy refusal keeps its audit marker
layers:
- create:
- crates/minimal/src/cmd/boxes/create.rs: when no proxy serves boxes, the check tells apart a bep that is not installed (the proxy binary that bep::store::proxy_binary_path resolves does not exist) from an installed proxy that does not answer, and passes the cause to the refusal
- crates/boxes/src/core/bep.rs: the exit-5 refusal no longer says only "Remove the grant". With no bep installed it reads "Cannot create the box: it declares the GitHub grant , and bep, the Box Egress Proxy, is not installed at , so no proxy serves boxes on this machine. To create the box without the grant, remove from the [secrets] table in minimal.toml." With bep installed and not answering, it says the proxy at is installed and does not answer, names the log file the host daemon writes for it, and keeps the same sentence about removing the grant
- crates/minimal/src/tests.rs: a_grant_box_with_no_proxy_is_refused_as_an_unenrolled_node pins both texts and exit 5
test: cargo nextest run -p minimal a_grant_box_with_no_proxy_is_refused_as_an_unenrolled_node
test: cargo nextest run -p boxes creation_without_sign_in_fails_with_defined_error
- json:
- crates/minimal/src/main.rs: machine_mode_answer gives a refused activation's defined error as the -o json code (github_sign_in_required, gatehouse_unenrolled_node), not unspecified, with the refusal's next step as the hint: "run min auth login, then create the box again" for the sign-in
test: cargo nextest run -p minimal machine_mode_names_the_grant_refusal_code
- proxy:
- crates/bep/src/forward.rs: refusal_body splits the one text "it did not accept the sealed credential in the request" by cause. github_sign_in_required reads "The Box Egress Proxy refused the request to , because the GitHub sign-in on the host has ended. On the host, run min auth login, then send the request again." expired, revoked, undecryptable and unbounded_member say the box's sealed credential no longer works on this host, and that re-creating the box gives it a new one. no_live_box and cross_box say the sealed credential belongs to another box. off_port, outside_bound_set and outside_current_set say is not a host this credential is sent to. store_handle_invalid says no rule in [secret-store-rules] on the host admits this stored secret for
test: cargo nextest run -p bep each_refusal_names_its_cause_and_next_step
produces: none
consumes: none
proof: A grant box refused for a missing proxy, a refusal read as -o json, and a request the proxy refuses each tell the person the cause and one next step they can take.
depends on:
- blocked by #2264
- blocked by #2542

Proof

A grant box refused for a missing proxy now says whether bep is not installed at its path or is installed and does not answer. In the second case it also names the proxy's log. Both cases end with the step to remove the grant from [secrets] in minimal.toml. Under -o json the refusal reads as github_sign_in_required or gatehouse_unenrolled_node, with the next step as the hint. A request the proxy refuses now names its cause: an ended GitHub sign-in (run min auth login), a sealed credential that no longer works (create the box again), one that belongs to another box, a host the credential is not sent to, or no [secret-store-rules] rule.

Notes from the agent: The proxy's log path is computed in create.rs as bep.log in the minvmd host dir (minimal_client::resolve_host_dir(--minimal-dir, true)). It mirrors the private BEP_LOG_FILE const in crates/minvmd/src/cmd/run.rs, because minvmd is outside the layers. The proxy program path comes from bep::store::proxy_binary_on_path, the same rule min secret uses. When no path resolves (no minvmd on PATH), the text says bep is not installed and names no path. The not-answering text reads: "bep, the Box Egress Proxy, is installed at , but it does not answer, so no proxy serves boxes on this machine. The proxy's log is at ." The refusal from grant_box_facts (no box id or no stance) gets a new ProxyAbsence::NotServed cause. It keeps the general 'no Box Egress Proxy serves boxes' clause and the new sentence about removing the grant. The gatehouse_unenrolled_node -o json hint is "to create the box without the grant, remove from the [secrets] table in minimal.toml". The task gave no exact hint for it. The off_port/outside_*_set and store_handle_invalid texts state only the cause, because the code cannot prove a remedy. The existing debug lines and audit markers are unchanged. Extra runs: cargo nextest run -p bep (235 passed), and the -p boxes bep and -p minimal grant/`machine_m…[truncated]

Tests

line exit tail
cargo nextest run -p minimal a_grant_box_with_no_proxy_is_refused_as_an_unenrolled_node 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-9023... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p boxes creation_without_sign_in_fails_with_defined_error 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-5de7... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimal machine_mode_names_the_grant_refusal_code 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-70d0... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p bep each_refusal_names_its_cause_and_next_step 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-4d37... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/workbench/crates/client-config) Compiling bep v0.0.1 (/workbench/crates/bep) Finished 'test

Verify

min task run agent-verify exited 100 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

        closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "ca043ed430b834b6",
                "span_id": "d1dd1c4c655ebc29",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "ca043ed430b834b6",
                "span_id": "67de45fdaf9a5293",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "ca043ed430b834b6",
                "span_id": "63596666e12df672",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "ca043ed430b834b6",
                "span_id": "5fda7e7344a4e3f4",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "ca043ed430b834b6",
                "queued_behind": "0",
                "span_id": "6cde3460e7b51235",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "ca043ed430b834b6",
                "queued_behind": "0",
                "span_id": "b4512bbdd5b6508f",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "b4512bbdd5b6508f",
                "span_id": "263ac6e1a425dbf6",
                "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 [  37.318s] 1669 tests run: 1668 passed, 1 failed, 2 skipped
        FAIL [   2.860s] (1669/1669) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Closes #2783

The exit-5 refusal now tells a missing bep program from an installed
proxy that does not answer, and names the proxy's log. A refused
activation reads under -o json as its defined error, with the next
step as the hint.
Each refusal body now says why the proxy refused the request, and the
next step where one exists, in place of one general text.
@coderabbitai
coderabbitai Bot commented Oct 31, 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: 92791f48-32cb-4714-8355-78b22c899759

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
minimal-foundry Bot commented Oct 31, 2026 •
Copy link
Copy Markdown
Contributor Author

Approved: every review thread resolved at ac2067ad1d05.

@norrietaylor resolved the last thread, which releases the approval this review had withheld.

Nothing to do.

@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 — advisory review

Verdict COMMENT — 2 findings, 2 inline.

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

Comment thread crates/bep/src/forward.rs Resolved
Comment thread crates/minimal/src/cmd/boxes/create.rs Resolved
@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 · 2 conditions · the full ruling

The create-time and -o json refusals conform to Gatehouse §6.2, and both defined errors keep their codes. Two proxy refusal texts give a wrong cause. no_live_box means the source is not a live box, but the text says the credential belongs to another box (§6.10 line 823). Make the change in C1. store_handle_invalid also covers bad signatures, expiry and the GitHub sign-in registration, but the text names only [secret-store-rules] (§6.10 line 842). Make the change in C2.

Ruled at 2b2345b against gominimal/arch@8640f85e193d by claude-opus-5-5.

Comment thread crates/bep/src/forward.rs Resolved
Comment thread crates/bep/src/forward.rs Resolved
Comment thread crates/bep/src/forward.rs Resolved
Comment thread crates/bep/src/forward.rs Resolved
A request from no live box does not carry another box's credential,
so the refusal now says it did not come from a running box.
A relative path in MINVMD_BEP_BIN read as a bep that is not installed.
The refusal now names the variable and asks for an absolute path.
The unenrolled-node refusal's fmt passed clippy's line limit once the
relative-path cause was added.
@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 — advisory review

Verdict COMMENT — 2 findings, 2 inline.

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

Comment thread crates/bep/src/forward.rs Resolved
Comment thread crates/bep/src/forward.rs Resolved
@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 compare fixes the no_live_box text and the relative MINVMD_BEP_BIN cause, and BEP-003 conforms. One item from the last ruling is still open. The store_handle_invalid refusal says only that no [secret-store-rules] rule admits the secret. Gatehouse §6.10 lines 839 and 842 give that marker several causes, and for a sign-in reference the registration is the GitHub module. Make the change in C1.

Ruled at 385bae2 against gominimal/arch@8640f85e193d by claude-opus-5-5.

Comment thread crates/bep/src/forward.rs Resolved
@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 1 of 10 on the runtime's review findings, pushed as 385bae21a2a5.

line exit tail
cargo nextest run -p minimal a_grant_box_with_no_proxy_is_refused_as_an_unenrolled_node 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-4c92... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling args v0.0.1 (/workbench/crates/args) Compiling client-config v0.0.1 (/wo
cargo nextest run -p boxes creation_without_sign_in_fails_with_defined_error 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-1b33... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimal machine_mode_names_the_grant_refusal_code 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-8c73... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p bep each_refusal_names_its_cause_and_next_step 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-e353... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/workbench/crates/client-config) Compiling bep v0.0.1 (/workbench/crates/bep) Finished 'test

Verify min task run agent-verify exited 100 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

        closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "09bb0fe643e54ec2",
                "span_id": "c94a160140e4794d",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "09bb0fe643e54ec2",
                "span_id": "f7c1798f270aa940",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "09bb0fe643e54ec2",
                "span_id": "5a5618da06c88931",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "09bb0fe643e54ec2",
                "span_id": "0762dd06ef78ec5a",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "09bb0fe643e54ec2",
                "queued_behind": "0",
                "span_id": "2eb4970fd44acea8",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "09bb0fe643e54ec2",
                "queued_behind": "0",
                "span_id": "ce4e48a9b72c2fd9",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "ce4e48a9b72c2fd9",
                "span_id": "e1840ae06a2c59cb",
                "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 [  39.257s] 1669 tests run: 1668 passed, 1 failed, 2 skipped
        FAIL [   2.852s] (1669/1669) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Review threads the coder judged:

  • 👍 valid — crates/bep/src/forward.rs:1153: Gave no_live_box its own refusal text: the request did not come from a running box on this host, so send it from inside the box that was given the credential. cross_box keeps the another-box text. The test pins both.
  • 👍 valid — PRRT_kwDOPdfcxM6yOpOO: proxy_absence now takes the lookup Result. RelativeEnv maps to a new ProxyAbsence::RelativePath, which names MINVMD_BEP_BIN and its value and asks for an absolute path. NoMinvmd stays not installed. The test pins the new text and exit 5. (not posted on the thread: not an open thread on the pull request)

A grant box refused because no proxy serves it now says why: bep is not installed at a path, bep is installed and does not answer (with its log path), or MINVMD_BEP_BIN holds a relative path. Each message gives a next step. With -o json the refusal carries its defined code and a next-step hint. Each sealed-credential refusal from the proxy names its own cause, and a request from no running box no longer reads as another box's credential.

Notes from the agent: Revise round 1. The task text says no_live_box and cross_box both say the credential belongs to another box. That is false for no_live_box (BEP-020: the source resolves to no live box), so no_live_box now has its own text: "...because the request did not come from a running box on this host. Send the request from inside the running box that was given this sealed credential." This deviates from the task wording on purpose. A relative MINVMD_BEP_BIN now gives a new ProxyAbsence::RelativePath cause, and proxy_absence takes the lookup Result in place of an Option. The ProxyAbsence text moved into its own Display impl so the BepRefusal fmt stays under clippy's too_many_lines limit. just clippy-strict was not run.

@norrietaylor norrietaylor 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.

Reviewed at 385bae2 against T109's plan block.

What holds:

  • Exit codes are unchanged; exit 5 is pinned for each cause.
  • -o json maps the refusals to github_sign_in_required and gatehouse_unenrolled_node.
  • no_live_box has its own text, and the plan deviation is correct per redeem.rs:448.
  • A relative MINVMD_BEP_BIN path gets its own cause.
  • min auth login and MINVMD_BEP_BIN are real.

Three defects, all in user-facing text:

  1. crates/bep/src/forward.rs:1147-1150, pinned at :2912-2918: store_handle_invalid names one cause, and the check covers six. redeem.rs:467-469 refuses with this marker whenever handle.check() fails. handle.rs:373-387 lists the causes: Signature, ContextMismatch, Expired, NoRule, OutsideRule and InjectMismatch. If a handle has expired, or the key that signed it was replaced, the person is told no rule admits the secret, and goes looking for a rule problem that does not exist. This is minimal-arch's open C1 on this head (Gatehouse §6.10 line 842). The text must say what can happen, as AGENTS.md "User-facing text" requires.
  2. crates/boxes/src/core/bep.rs:520 and :608 (-o json hint): the next step names the wrong table. "Remove GH_TOKEN from the [secrets] table in minimal.toml" sends the person to a table that does not exist there. The grants are read from [session.secrets] (crates/mfile/src/lib.rs:524, read by project_bep_and_grants, create.rs:216). The only [secrets] table is in the client's config.toml. The refusals at create.rs:165/178/186 already say [session.secrets] in minimal.toml, so one thing now has two names on the same path. The tests at crates/minimal/src/tests.rs:4866/4886/4913/4943 and main.rs:768 pin the wrong name.
  3. crates/minimal/src/cmd/boxes/create.rs:546-550, printed via crates/boxes/src/core/bep.rs:411: the log path is stated without being checked. proxy_log_path returns <minvmd host dir>/bep.log whether or not the file exists. On a host whose minvmd has never started bep, the first grant box prints "The proxy's log is at " for a file that was never written. The same happens on a Linux host using the native backend, which never starts bep.

@norrietaylor
Copy link
Copy Markdown
Member

/revise

Three user-facing text fixes from review at 385bae2. Keep exit codes and audit markers unchanged.

  1. crates/bep/src/forward.rs Flow::refusal_body, the Check::StoreHandleInvalid branch (about lines 1147-1150). This is minimal-arch's open C1.
    • The marker covers every handle::Invalid kind (redeem.rs:467-469, handle.rs:373-387): a bad signature, a context that does not match, an expired handle, no rule, a value outside the rule, and an injection that does not match the registration.
    • Replace the single cause "no rule in [secret-store-rules] … admits this stored secret" with text that names what can cause it and gives no remedy, because no single step fixes every cause.
    • Update the assertion in each_refusal_names_its_cause_and_next_step (about lines 2912-2918) to the new text.
  2. crates/boxes/src/core/bep.rs:520 and the -o json hint at about :608. Change "the [secrets] table in minimal.toml" to "[session.secrets] in minimal.toml". That is the table the grants are read from (crates/mfile/src/lib.rs:524) and the name create.rs:165/178/186 already uses. Update the tests that pin the old text: crates/minimal/src/tests.rs about lines 4866, 4886, 4913 and 4943, and crates/minimal/src/main.rs about line 768.
  3. crates/minimal/src/cmd/boxes/create.rs proxy_log_path (about lines 546-550), as printed through crates/boxes/src/core/bep.rs:411. Name the proxy's log path only when that file exists. Otherwise drop the log sentence and keep "does not answer". Add a test case for a missing log file.

Run just test-one each_refusal_names_its_cause_and_next_step -p bep, the boxes refusal tests, and the minimal tests you touched.

The store handle refusal now lists each cause its marker covers and no
single remedy. off_port says the credential is sent to that host only
on other ports. The grant refusal names [session.secrets].
The not-answering refusal drops the log sentence when bep.log is absent.
The grant refusal and its -o json hint name [session.secrets].
@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

This head resolves the open items from the CONDITIONS on 385bae21. The store_handle_invalid text now names each check that Gatehouse §6.10 line 842 lists, and it gives no single remedy. The grant refusal and its -o json hint name [session.secrets], which is the real table. The proxy log is named only when the file exists. The defined errors github_sign_in_required and gatehouse_unenrolled_node follow §6.2 line 580, and the audit markers do not change. BEP-003 conforms, and there are no conditions.

Ruled at ac2067a against gominimal/arch@8640f85e193d by claude-opus-5-5.

@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: 8 unresolved threads — minimal-foundry[bot] crates/bep/src/forward.rs:1158, minimal-arch[bot] crates/bep/src/forward.rs, minimal-arch[bot] crates/bep/src/forward.rs:1150, minimal-arch[bot] crates/bep/src/forward.rs, minimal-arch[bot] crates/bep/src/forward.rs:2925, …. No findings.

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

@minimal-foundry
Copy link
Copy Markdown
Contributor Author

Round 3 of 10 on a /revise note, pushed as ac2067ad1d05.

line exit tail
cargo nextest run -p minimal a_grant_box_with_no_proxy_is_refused_as_an_unenrolled_node 0 Applying loadouts: default Running task runtime-implement-test-0 in session task-runtime-implement-test-0-cd59... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling client-config v0.0.1 (/wo
cargo nextest run -p boxes creation_without_sign_in_fails_with_defined_error 0 Applying loadouts: default Running task runtime-implement-test-1 in session task-runtime-implement-test-1-e14a... Compiling args v0.0.1 (/workbench/crates/args) Compiling ot v0.0.1 (/workbench/crates/ot) Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/wo
cargo nextest run -p minimal machine_mode_names_the_grant_refusal_code 0 Applying loadouts: default Running task runtime-implement-test-2 in session task-runtime-implement-test-2-4270... Compiling stdlib v0.0.22 (/workbench/crates/stdlib) Compiling version v0.8.0 (/workbench/crates/version) Compiling decode v0.0.1 (/workbench/crates/decode) Compiling mlog v0.
cargo nextest run -p bep each_refusal_names_its_cause_and_next_step 0 Applying loadouts: default Running task runtime-implement-test-3 in session task-runtime-implement-test-3-8d8b... Compiling paths v0.0.1 (/workbench/crates/paths) Compiling client-config v0.0.1 (/workbench/crates/client-config) Compiling bep v0.0.1 (/workbench/crates/bep) Finished 'test

Verify min task run agent-verify exited 100 under rustc 1.99.0, which the repository does not pin (1.99.1 in rust-toolchain.toml); the PR is not a draft on that alone — CI, which honours the pin, is the gate.

        closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "843480dffdd69d15",
                "span_id": "0d46356878079303",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetNetSwitch",
                "parent_span_id": "843480dffdd69d15",
                "span_id": "6061e0659e088a58",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetDenyAllOptOut",
                "parent_span_id": "843480dffdd69d15",
                "span_id": "708e7fc7ae1e7607",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "GetPaths",
                "parent_span_id": "843480dffdd69d15",
                "span_id": "01eae059f8ce2265",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "GetRecord",
                "parent_span_id": "843480dffdd69d15",
                "queued_behind": "0",
                "span_id": "4391f36f7c676ae2",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "sessions.manager.message",
            fields: {
                "kind": "DeleteSession",
                "parent_span_id": "843480dffdd69d15",
                "queued_behind": "0",
                "span_id": "85e7b330785e0446",
                "trace_id": "0af7651916cd43dd8448eb211c803111",
            },
            parent: None,
            closed: true,
        },
        LoggedSpan {
            name: "session.message",
            fields: {
                "kind": "Destroy",
                "parent_span_id": "85e7b330785e0446",
                "span_id": "ebb96181ab283048",
                "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 [  36.898s] 1671 tests run: 1670 passed, 1 failed, 2 skipped
        FAIL [   2.769s] (1671/1671) minimal::otel_cli exec_run_attach_and_task_run_share_the_commands_trace
error: test run failed

Review threads the coder judged:

  • 👎 invalid — crates/bep/src/forward.rs: Already so on this branch: no_live_box has its own text (the request did not come from a running box on this host), and only cross_box says the credential belongs to another box.
  • 👍 valid — crates/bep/src/forward.rs:1150: store_handle_invalid now lists a failed signature, another box or host, a passed expiry, nothing on the host that admits it, other hosts, or a different header form, and gives no remedy. It no longer names [secret-store-rules].
  • 👎 invalid — crates/bep/src/forward.rs: Already so on this branch: the test pins no_live_box by itself and cross_box by itself. The loop covers only outside_bound_set and outside_current_set now, because off_port has its own assertion.
  • 👍 valid — crates/bep/src/forward.rs:2925: each_refusal_names_its_cause_and_next_step now pins the new store_handle_invalid text.
  • 👍 valid — crates/bep/src/forward.rs:1155: The store_handle_invalid text now says what can cause it (signature, context, expiry, no rule, outside rule, header form) and names no single cause.
  • 👍 valid — crates/bep/src/forward.rs: off_port has its own text: this sealed credential is sent to only on other ports, not on port . The test pins it by itself.
  • 👍 valid — crates/bep/src/forward.rs: The text now covers every handle::Invalid kind and does not name [secret-store-rules], so it holds for a sign-in reference too. The test assertion matches it.

A grant box refused for a missing proxy tells the person to remove the grant from [session.secrets] in minimal.toml. It names the proxy log only when that file exists. The -o json hint gives the same step. A proxy refusal names its cause: store_handle_invalid lists every cause its marker covers and gives no remedy, and off_port says the credential goes to that host only on other ports.

Notes from the agent: Round 3. Directive items 1-3 are done. The exit codes and audit markers did not change. The off_port refusal now has its own text, for thread PRRT_kwDOPdfcxM6yOvo5. The task grouped off_port with outside_bound_set and outside_current_set, but that text was false for off_port. The note asked for just test-one ... -p bep. I ran the equivalent test: lines as written. cargo clippy -p bep -p boxes -p minimal --all-targets is clean. I did not run just clippy-strict.

@norrietaylor norrietaylor 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.

Re-reviewed at ac2067a. All three are fixed and pinned.

  • store_handle_invalid now names every handle::Invalid cause (signature, another box or host, expiry, nothing admits it, other hosts, a different header form) and gives no remedy (7fb2c70). off_port now says the credential is sent to the host only on other ports.
  • The next step says [session.secrets] in minimal.toml everywhere, including the -o json hint, and the tests follow.
  • The proxy's log is named only when the file exists (dccac57). The test covers both cases: no log file, and a log file written.

The other changed files come from the merge of main (#2793 and #2789).

@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 — every review thread is resolved; @norrietaylor closed the last one. The review of ac2067ad1d05 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.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 31, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 31, 2026
Merged via the queue into main with commit 268a394 Oct 31, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the agent/2783-name-the-cause-and-the-next-step-in-the-grant-an branch October 31, 2026 08:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

T109 — Name the cause and the next step in the grant and proxy refusals

1 participant

0