Repository navigation
fix(mfile,minimal): a box create sends the expanded spec with the client store rules, so a task's - #3676
Conversation
The entry expansion reads [tasks.<name>.secrets], so the load no longer warns about it (#3650).
The session and task create paths expand the entry with the client's secret-store rules and put the expanded [secrets] on the sent spec. The stored spec keeps [secrets] whole, so the client projection digest binds the grants and still equals the daemon's digest of the sent spec.
A task's [secrets] now reach the sent spec. Where no proxy serves boxes, the run refuses each brokered secret with exit 5 before the create, as the daemon refuses the same spec (#3650).
…te-sends-the-expanded-spec-with-the-cl # Conflicts: # crates/minimal/src/cmd/boxes/create.rs
The create now sends the expanded spec, so dev's GitHub grant DEV_TOKEN reaches the daemon. The daemon refuses that grant when no Box Egress Proxy serves the box. The test now hands the proxy's root certificate, as the activation does on a host with a proxy.
|
Important Review skippedBot user detected. Ask an organization administrator to verify that this bot has an active assigned CodeRabbit review seat. See the seat-assignment guide. After the seat is confirmed, request a review again.
|
…te-sends-the-expanded-spec-with-the-cl
The stored spec now types [secrets], so the daemon reads a spec that carries secrets and names an unnamed box after its entry (BOX-163). The two projection digest tests created several unnamed boxes from one entry, so the second create was refused for a held name. Each create that files a record now takes its own request name.
…te-sends-the-expanded-spec-with-the-cl # Conflicts: # crates/mfile/src/lib.rs
|
Round 1 of 10 on a failed check suite, pushed as Resolved conflicts in:
Verify Outside the task's
Converted to a draft: verify exited 125; outside the task's For a session entry with a store-reference secret, the create request carries a client projection digest equal to mfile::projection::spec_digest of the sent spec, and the daemon stores both digests side by side. A task with [tasks.ci.secrets.GH_TOKEN] source = broker loads with no unknown fields warning, and on an un-enrolled host with no proxy min task run ci exits 5 and creates no box. The minimald projection digest tests now pass with the typed [secrets] section. Notes from the agent: Revise round 1. The tests check failed in minimald: box_manager::tests::projection_digests_stored_side_by_side and projection_digest_mismatch_refuses_create. Cause: the earlier round added [secrets] to SpecDoc in crates/mfile/src/spec.rs (also outside the layers, needed so the stored spec keeps the secrets and the digests agree). The daemon can now read a spec that carries secrets, so creation_name names an unnamed box after its entry (BOX-163). Both tests created several unnamed boxes from one entry and relied on the old parse failure, so the second create got a held-name refusal. I confirmed this: both tests pass with main's spec.rs and fail with the branch's. The fix gives each create that files a record its own request name. This touches crates/minimald/src/box_manager/tests.rs, which is outside the layers. It is a test-only change. The product behaviour is correct. minimald-root-integration failed in apt (Unable to locate package protobuf-compiler), an infrastructure fault this branch cannot fix. ci-linux-native-success is the aggregator and fails because of the two jobs above. In this box three minimald env::tests fail or time out (task_entrypoint_carries_env_cwd_and_args, minenv_run_forwards_stdin_to_the_task, task_run_pipes_stdin_through_the_in_box_helper). task_entrypoint_carries_env_cwd_and_args fails with main's mfile too, so the box environment causes it. Under plain cargo test, tests::legacy_network_spellings_parse_with_hint fails because libtest captures e…[truncated] |
|
Reviewed: no findings; approval withheld, 1 thread unresolved at APPROVE withheld: 1 u 8000 nresolved thread — minimal-arch[bot] crates/minimal/src/task.rs:1718. 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. Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The create and the task run now send the expanded [secrets] with the store rules written in. The client digest binds them, as architecture.md line 129 and line 1291 require. One gap has no owner. min task run sends no proxy root certificate, so the daemon refuses every brokered task secret, also on a host with a proxy. Principle 8 (line 338) gives a task box the same secrets as a session box, so this refusal is interim. Make the change in C1: file the issue and name it in task.rs.
Ruled at dfd8ece against gominimal/arch@8b824707cde6 by claude-opus-5-5.
| expanded.as_ref().map(|expanded| &expanded.spec), | ||
| &args.other.vpn_network_names, | ||
| )?; | ||
| // BOX-081, #3650: the run sends no proxy root certificate. So where no |
There was a problem hiding this comment.
C1 · This run sends no root certificate, so the daemon refuses a brokered task secret on every host. A session box can use that secret. Principle 8 (architecture.md line 338) says capabilities do not follow the type. File an issue for the task path, name it here and in the doc at line 178, and mark this refusal as interim.
There was a problem hiding this comment.
Addressed in 319045afb33d: Named #3679 in the run_entry comment above refuse_unserved_broker_secrets(...) and in its doc, and marked the brokered task secret refusal as interim. No code path changed.
|
/revise Arch ruling PASS_WITH_CONDITIONS on dfd8ece (arch_rulings 1542). The
Keep the PR body's |
…te-sends-the-expanded-spec-with-the-cl
|
Round 2 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: verify timed out after 1800s. Review threads the coder judged:
For a session entry with a store-reference secret, the create request carries a client projection digest that equals mfile::projection::spec_digest of the sent spec, and the daemon stores both digests side by side. With [tasks.ci.secrets.GH_TOKEN] source = broker, min task run ci prints no unknown fields warning, and on an un-enrolled host with no proxy it exits 5 and no box is created. This round, the comment above refuse_unserved_broker_secrets(...) in run_entry and the doc of that function name #3679 and mark the brokered task secret refusal as interim. Notes from the agent: Revise round 2 applies C1 only. The change is comments and doc text in crates/minimal/src/task.rs, and no code path changes. The PR body edits (keep the Closes #3377 and Closes #3650 lines, add a ## Residuals heading with - #3679) belong to the runner, because the coder does not write the body. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
C1 is met. The doc of refuse_unserved_broker_secrets and the comment in run_entry now name #3679. Both mark the refusal of a brokered task secret as interim. The merge from main does not change any hunk of this PR. The ruling at dfd8ecef stands for the rest of the change. The task path is still different from the session path, and #3679 tracks that residual.
Ruled at 319045a against gominimal/arch@8b824707cde6 by claude-opus-5-5.
Follow-up
Fixes #3663
crates/mfile/src/lib.rscrates/minimal/src/cmd/boxes/create.rscrates/minimal/src/cmd/box_spec.rscrates/minimal/src/task.rscrates/minimal/src/tests.rsTask marker
Proof
For a session entry with a store-reference secret, the create request now carries the expanded [secrets], with the upstream and inject from the client's [secret-store-rules]. Its client projection digest equals mfile::projection::spec_digest of the sent spec, and it differs from the digest of the same spec without the rule. The daemon reads the sent spec back as a box spec with the secrets kept. With [tasks.ci.secrets.GH_TOKEN] source = "broker", loading minimal.toml prints no unknown fields warning, the task's spec carries the secret, and min task run ci on a host with no proxy exits 5 with the gatehouse_unenrolled_node refusal while the daemon lists no box.
Notes from the agent: Out of scope: crates/mfile/src/spec.rs. The daemon stores the sent spec JSON as given and reads it as mfile::spec::BoxSpec. SpecDoc uses deny_unknown_fields and had no secrets key, so a spec with [secrets] did not read back. That breaks the daemon's box name from the spec and the resume from the stored spec. The change keeps [secrets] whole in BoxSpec::kept_keys, the same as [nesting]. The client puts the expanded [secrets] there through the new put_expanded_spec.
Deviation: the digest is not computed from Expansion::projection. The daemon projects the v0 JSON that it receives, so the client still projects the sent spec (stamp_client_projection_digest). This keeps the two digests equal by construction, and the digest now binds the secrets. The task line asked for Expansion::projection. That projection reads the expanded table, not the v0 shape, and it is not guaranteed to equal the daemon's digest.
The proof says the daemon stores both digests side by side. The tests here pin only the client side. The daemon side is in minimald, which is not in the layers. The existing tests.rs::create_stores_client_digest_equal_to_daemon_digest still passes.
min task run sends no proxy root certificate. So the daemon refuses every brokered task secret. The client now refuses first with exi…[truncated]
Tests
cargo test -p mfile secrets_entry_key_is_not_reported_unknowncargo test -p minimal create_stores_a_client_digest_equal_to_the_daemon_digestcargo test -p minimal vpn_network_names_keep_the_client_digest_equal_to_the_daemon_digestcargo test -p minimal task_spec_carries_expanded_secretscargo test -p minimal task_run_broker_secret_unenrolled_exits_5Verify
min task run agent-verifyexited 100, so this PR is a draft.Base
The base branch moved while the coder worked and was merged in before the tests ran. These files changed on BOTH sides since the branch point — read them first, because a rewrite from a stale reading can undo a merge without a conflict:
crates/minimal/src/cmd/box_spec.rscrates/minimal/src/cmd/boxes/create.rscrates/minimal/src/tests.rsOut of scope
These files are outside the task's
layers:, so this PR is a draft:crates/mfile/src/spec.rsResiduals
min task runsends no proxy root certificate, so a brokered task secret is refused even with a proxy (arch_rulings 1542, C1).Closes #3377 (the original issue this task was triaged from).
Closes #3650 (folded into this task on the owner ruling of 2026-11-19).