8000 fix(minimal): stop relaying a box id into a VM box's create · gominimal/minimal@d5659ec · GitHub
[go: up one dir, main page]

Skip to content

fix(minimal): stop relaying a box id into a VM box's create

Minimal Arch / arch-review succeeded Oct 30, 2026 in 0s

PASS

Governs: architecture.md line 499 (The box record and its states, under min box). It says a party outside the box's host VM mints the box_id, and the client never supplies it. Un-enrolled, that party is minvmd for a VM guest. The task's spec line BOX-002 (docs/specs/29-spec-box-local-first line 60) says the VM host daemon mints the id and passes it to the in-VM daemon. The checkout has no arch-map.md, and no findings.json or since.diff was staged. pr.diff equals git diff 21506b7f d5659ecb.

Ruling: BOX-002 conforms. After this change, activate_box, its autogen re-registration and the dashboard's create_registering all send config.box_id = None. The client keeps the minted id on the registration (RegisteredWithVmHost::box_id and BoxRow::registration). It reads the id from there for withdraw_box_row, grant_box_facts and mint_into_request, which now takes registered_id as an argument. The in-VM daemon takes the id from minvmd only (crates/minimald/src/box_manager.rs, config.box_id.take() and then mint_box_id keyed by the switch address, from T13 #2759). The client still sends box_addresses, so that lookup still finds the row. No other site in crates/minimal writes config.box_id. Placement: the helper is carry_registration in cmd/boxes/vm_host.rs, a file in the task's client layer. The dashboard duplicates its three assignments because box_verbs is private. That is a code-quality matter, not a placement deviation.

Precedent: this follows the rulings on #2759. They applied the same line 499 to the guest side, and this PR finishes the client side.

Outside the design, but blocking: the author's own Verify run fails tests::every_create_session_asserts_the_daemon_build (crates/minimal/src/tests.rs). The new test activation_relays_no_box_id builds a CreateSessionRequest::new that the create-site inventory does not list. Add "cmd/boxes/vm_host.rs::activation_relays_no_box_id = asserts nothing" to the inventory, with a "unit test's request, never sent" comment. CI will be red until then. The design says nothing about that inventory, so this ruling carries no condition for it.

Observability: the task asks for the registered id on the client create span. The change emits a tracing::info! event with registered_box_id inside the CreateSession activation-step span, not a span field. The PR body states this exactly, and the design does not name the field.

Not checked: the end-to-end proof that a VM box created by min carries minvmd's id. That needs a VM run. The T13 VM-lane test covers the guest side.

Ruled at d5659ec against gominimal/arch@42d214dc8ac8 by claude-opus-5-5; arch_rulings 613, job 23e61712-60ff-4ac0-8a11-3ebdb0760c00.

0