Repository navigation
CONDITIONS
Baseline. This re-reviews 8fe9469a against the PASS on 5e114c19 (this PR), on arch 7a86ec7b. I checked these facts. since.diff equals git diff 5e114c19 8fe9469a. pr.diff equals git diff 228e681d 8fe9469a, and 228e681d (#2861) is the base and the merge base. The compare is one merge of main, 8fe9469a, which brings #2861. It is not clean. git merge-tree of the two parents conflicts in crates/minvmd/src/box_registry.rs, and the resolution differs from the auto-merge in four places. The rest of the compare is #2861 as it is on main, and it is outside this ruling. Everything the merge does not touch keeps the PASS on 5e114c19.
The merge resolution.
reconcile_host_ip_boxes()collectsended, the boxes the guest no longer lists, and removes theirby_nameentries under the ids' lock. It takes the resident lock first, the same order as the register path. This matchesretire_host_ip_box(), and the id stays for the collision check. It conforms.- The
HostIpIds/HostIpNameconflict markers are resolved, and both parents' types are kept. It conforms. register_host_ip_box_as()now counts a box indormantas admitted. A box is indormantonly when the guest lists it as not running, that is, stopped or exited (§5.5 line 183). That box now holds its registration name for as long as the guest lists it, and a newhost_ipbox under that name getsNameAlreadyHeld.create.rsturns that refusal into the held-name exit 2. The design (architecture.md, Addressing, line 389) makes a name unique only among running boxes, and says that a new box may reuse a stopped box's name. The comment says the name is kept "for its resume". But a resume runs under the box's ownbox_id, and the only reader of the name entry is the mint at creation (mint_box_id_reply()incontrol.rs). Without this edit,resident.boxesis the set the guest reports running, so the #2861 check already meant "a running box holds the name". This edit is a deviation, and C1 removes it.- A new test pins item 3 (
NameAlreadyHeldfor a stopped box). C1 changes the test to pin line 389.
NET-085 keeps its status from the baseline. The gate's union is each live host_ip box's rules (§4.3 rule 2 line 84). A stopped box leaves the union (§5.5 line 183). A failed list read changes nothing (§4.3 rule 3 line 85). The guest's list only narrows the union (§4.3 trust analysis line 88). The merge leaves the union logic, the admit mark and the cohort rebuild unchanged.
Precedent. No prior ruling decides a name held by a stopped host_ip box. #2861's rulings bind its own name bound, and C1 restores #2861's check exactly. There is no departure.
Not checked. I did not build or run the tests (the instructions forbid a build). I did not verify that the merged tree compiles, or that C1's test passes under advance_clock.
Conditions
- C1:
crates/minvmd/src/box_registry.rsregister_host_ip_box_as(): computeadmittedasresident.boxes.contains_key(&session)only, as #2861 had it. Remove|| resident.dormant.contains_key(&session)and its comment "A box a reconcile set aside is stopped, not ended: it keeps its name for its resume (NET-085)." A box indormantis stopped or exited in the guest, and a new box may reuse its name. A resume runs under the box's ownbox_id, andmint_box_id_reply()incrates/minvmd/src/control.rsis the only reader of the name entry. In the merge's new testhost_ip_rules_retired_when_guest_no_longer_runs_box_withdraws_only_an_ended_name, replace theErr(AllocationError::NameAlreadyHeld { .. })assertion. Callregistry.advance_clock(HOST_IP_UNADMITTED_NAME_BOUND)after theStoppedreconcile. Then assert thatregistry.register_host_ip_box("held")returnsOkwith an id other thanid. Keep theendedname withdrawal inreconcile_host_ip_boxes(), and keep the assertion that the old id stays for the collision check.
Ruled at 8fe9469 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5; arch_rulings 932, job bfee3e3d-783e-46a4-b233-bd181c9dba32.