Repository navigation
T57 — Stop the client relaying a box id into a VM box's create - #2764
mitodrummer merged 3 commits into
Conversation
The VM host daemon mints a box's id at registration, and the in-VM daemon takes it from there alone (BOX-002). The CLI and the dashboard now keep the registered id on the client, for the row's withdrawal and the grant mint, and the create request carries none. The CLI logs the id it kept before each create.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: no findings at Nothing to do. 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 · the full ruling
BOX-002 conforms to architecture.md line 499. The create request from min and from min dash carries no box id. The client keeps the minted id on the registration for the withdrawal and the grant mint. The in-VM daemon takes the id from minvmd only. This is not a design condition: your Verify run fails every_create_session_asserts_the_daemon_build. Add cmd/boxes/vm_host.rs::activation_relays_no_box_id = asserts nothing to the inventory in crates/minimal/src/tests.rs, or CI will stay red.
Ruled at d5659ec against gominimal/arch@42d214dc8ac8 by claude-opus-5-5.
The create-site inventory guard counts every CreateSessionRequest constructor. The new activation_relays_no_box_id test builds one that it never sends, so the inventory now names it as asserting nothing.
…lient-relaying-a-box-id-into-a-vm-box
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This re-review covers two commits after the PASS on d5659ecb. One commit adds the new unit test to the create-site inventory. The entry follows the pattern for unit-test requests that are never sent, and every product create site still asserts. The other commit is a clean merge of main. The create path still sends no box id, as architecture.md line 499 requires. BOX-002 conforms.
Ruled at 194571f against gominimal/arch@42d214dc8ac8 by claude-opus-5-5.
|
Round 1 of 10 on a failed check suite, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. A VM box's create request from min carries no box id, and the box still carries the VM host's minted id. activation_relays_no_box_id shows this, and the minimal crate suite is green again. Notes from the agent: Revise round 1. The failed tests check was tests::every_create_session_asserts_the_daemon_build in crates/minimal/src/tests.rs. That guard lists every CreateSessionRequest::new( site in the crate. The new test activation_relays_no_box_id in vm_host.rs adds one such site, so the list no longer matched. The fix adds that site to the list as 'asserts nothing', because the test never sends the request. crates/minimal/src/tests.rs is outside the task's layers. I touched it because the guard requires every new site to be listed, and a change of the test to avoid the needle only hides the site from the guard. ci-linux-native-success is the lane aggregator, and it failed only because the tests job failed. |
|
/revise CI |
|
Round 2 of 10 on a /revise note: the coder changed nothing. Round 2 changed nothing on purpose. The tree already has the fix the note asks for. Commit 4cdebd5 adds "cmd/boxes/vm_host.rs::activation_relays_no_box_id = asserts nothing" to the expected list in crates/minimal/src/tests.rs, in its sorted place after the list.rs entry and before dash/rpc.rs::activate. It also adds a two-line comment above that entry, like the comments above the other entries. At head 194571f, after the merge of origin/main, I ran both tests in one nextest invocation and both passed. The CI failure that the note quotes probably came from a run on a head before 4cdebd5. |
There was a problem hiding this comment.
Reviewed at 194571f. No create path in min sets config.box_id any more (activate_box through carry_registration, the dashboard, and the autogen retry); the registered id stays with the client for grant minting, the BEP-007 deliveries and the row withdrawal. The one guard-list entry in tests.rs follows the convention for test sites.
T57 — Stop the client relaying a box id into a VM box's create
slice: S3
kind: task
covers: BOX-002
size: S
est: 110 code, 90 tests
executor: agent
difficulty: known ground
model: strongest
diagnostics: min's create log names the registered id it kept locally
observability: client create span carries the registered id, the request carries none
layers:
- client:
- crates/minimal/src/cmd/boxes/create.rs: keep the registered id local, stop writing request.config.box_id
- crates/minimal/src/dash/rpc.rs: dashboard create stops setting config.box_id
- crates/minimal/src/cmd/boxes/vm_host.rs: helpers and tests
test: cargo nextest run -p minimal activation_relays_no_box_id
produces: none
consumes: none
proof: A VM box's create request from min carries no box id, and the box still carries the VM host's minted id.
depends on:
- blocked by #2397
Proof
When min or min dash creates a VM box, the create request sends no box id. The client keeps the id that the VM host daemon minted on its registration, and uses it to withdraw the row and to mint grants. The box keeps the id that the VM host minted. activation_relays_no_box_id shows a registration with a minted id, then a create config with no id and the handed addresses.
Notes from the agent: A new helper, carry_registration in vm_host.rs, puts the handed addresses and task addresses on the create config, and sets box_id to None. min session activate uses it at the first registration and at the autogen re-registration. mint_into_request now takes the registered id as an argument. Before, it read the id from request.config.box_id. dash/rpc.rs cannot reach the helper, because cmd/mod.rs mounts the box_verbs module privately, and that file is outside the layers. So create_registering sets config.box_id = None directly. Its existing test tui_own_ip_create_registers_and_hands_addresses now also asserts that the create carries no box id. Diagnostics and observability: each create attempt logs tracing::info! with registered_box_id inside the CreateSession activation_step span. I did not run that dash test, or any test except the test line. cargo clippy -p minimal --all-targets reported no warnings.
Tests
cargo nextest run -p minimal activation_relays_no_box_idVerify
min task run agent-verifyexited 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.Closes #2758
Undrafted by the maintainer: the one edit outside the layers, an entry in crates/minimal/src/tests.rs's
every_create_session_asserts_the_daemon_buildlist, is accepted.