Repository navigation
fix(minimal): ask only a VM host daemon to re-hold a box name before an attach - #2225
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Provider-aware re-hold and call-site wiring crates/minimal/src/cmd/list.rs, crates/minimal/src/cmd/session.rs, crates/minimal/src/cmd/boxes/attach.rs, crates/minimal/src/cmd/boxes/vm_host.rs |
Attach, exec, and session-run paths pass the provider kind to the re-hold helper. The helper returns without requesting a name hold unless the provider is Minvmd. Tests verify that the Minimald path sends no hold request and update VM-host scenarios to pass Minvmd. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: mitodrummer
Merge Risk: 
Minimal · up to b46aa
-
The provider gate preserves VM name re-holds while avoiding native-daemon requests. No issue identified here needs resolution before merging.
Pre-merge checks: 
5
-
Full details: Description check
-
Explanation
The description explains the problem, rationale, implementation, linked issue, tests, and lab evidence. It omits the template headings and checklist items, but it provides the required information and is mostly complete.
Full details: Linked Issues check
-
Explanation
[
#2213] The issue requires that namedhost_ipattach and exec on the native provider stop sending the VM-host name-hold request to the native daemon, so command stderr stays the child's. The whole-PR diff (merge base e40e028 to head b46aa47) gatesrehold_held_name_before_attachin crates/minimal/src/cmd/boxes/vm_host.rs. The function now takeskind: paths::ProviderKindand returns before any request unlesskind == paths::ProviderKind::Minvmd. This matches the activation hold's provider check, which the issue names as the model. The issue lists the provider-kind gate as an acceptable fix. The session.rs diff showscmd_attach,cmd_exec, andcmd_session_runeach passdaemon_provider_kind(global)tobox_via_ssh, so the kind reaches the re-hold path for each affected command. The bare-command attach path in list.rs passes the kind as well, per the supplied summary. The issue's secondary suggestion to downgrade refusal logging to debug, once per process, is not required, because the native path no longer sends the refused request. The issue's suggested test (an exec on the native provider adds nothing to stderr) is covered in substance bya_native_attach_reholds_nothing, which asserts that the native daemon receives no hold request. The existing re-hold tests now passProviderKind::Minvmdand keep their coverage of the VM-host path. Limitation: the attach.rs blob could not be read at head, so the body ofbox_via_sshwas not read directly. Its forwarding of the kind rests on the session.rs call sites, the changedrehold_held_name_before_attachsignature, and the supplied summary. The incremental diff since the previous reviewed heads was also unavailable, so this verdict rests on the whole-PR state at head.
Full details: Out of Scope Changes check
-
Explanation
The whole-PR changes are: a provider-kind argument on
rehold_held_name_before_attachand its gate (vm_host.rs); the provider-kind parameter onbox_via_sshand its call sites (attach.rs, session.rs, list.rs, per the supplied summary and the session.rs diff); and the test changes in vm_host.rs. Each change serves the#2213fix. The test edits only add the new kind argument to existing calls and add one native-provider test. No unrelated behavior, refactoring, or documentation change was identified in the readable evidence. The attach.rs and incremental diffs could not be read, so the assessment relies on the supplied summary for those files.
-
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
A rabbit checks the provider's name,
For Minvmd, the hold stays in the game.
For native paths, no request goes through,
The tests check both provider views.
Then off the rabbit hops, ears bright and clear.
Comment @coderabbitai help to get the list of available commands.
|
Approved: no findings at Nothing to do. Clobber: none seen. |
There was a problem hiding this comment.
correctness
minimal-review — approved
Verdict APPROVE — No findings.
security
minimal-review — approved
Verdict APPROVE — No findings.
supply-chain
minimal-review — approved
Verdict APPROVE — No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
mitodrummer
left a comment
There was a problem hiding this comment.
The provider-kind gate is correct, and the new test does exercise it: with the kind dropped, a named host_ip record would send a hold. One merge-time break below.
cff8b3c to
2232619
Compare
There was a problem hiding this comment.
security
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 1 unresolved thread — mitodrummer crates/minimal/src/cmd/session.rs. No findings.
supply-chain
minimal-review — approved
Verdict APPROVE — No findings.
Panel: 2 of 3 personas ran (security, supply-chain); did not complete: correctness.
|
/arch-review |
2 similar comments
|
/arch-review |
|
/arch-review |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to §7.1 of the networking design. A native node's host_ip sockets already sit on host loopback, so the native daemon has no name hold to re-make. Only the VM host holds names. The re-hold now runs only for Minvmd, the same key as the activation's hold. All four session_via_ssh callers pass that kind. No conditions.
Ruled at 2232619 against gominimal/arch@3dab1097cda1 by claude-opus-5-5.
norrietaylor
left a comment
There was a problem hiding this comment.
The fix is right: rehold_held_name_before_attach now returns early unless the daemon is minvmd, the VM host. That matches what host_asks_box and the activation's hold already check, all four callers pass daemon_provider_kind(global), and a_native_attach_reholds_nothing fails without the early return.
Requesting changes for the rebase only. The branch conflicts with main in cmd/list.rs and cmd/session.rs. Since #2479 and the module split, session_via_ssh is box_via_ssh in crates/minimal/src/cmd/boxes/attach.rs, and rehold_held_name_before_attach lives in crates/minimal/src/cmd/boxes/vm_host.rs. Main still passes no provider kind there, so the change is still needed; re-apply it in those files rather than resolving hunk by hunk, then let every lane run again.
2232619 to
5e3b7ad
Compare
|
Re-applied onto main as one commit (5e3b7ad), as you asked, rather than resolved hunk by hunk: |
…an attach or an exec The native daemon's control socket answers only the answerer verbs, so asking it to re-hold a name was a refusal warned on every native attach and exec's stderr (#2213). The re-hold is for Minvmd alone, as the activation's hold is; every caller of box_via_ssh passes the daemon's provider kind. Re-applied onto main's split CLI files (#2479, #2480).
5e3b7ad to
b46aa47
Compare
Closes #2213.
What
Since #2149, every
min session attachandmin session execof a namedhost_ipsession on the native provider printed one warning to stderr:An exec's stderr was no longer the command's alone: a silent command came back with one line, a command writing 20 000 stderr lines came back with 20 001 (min-regress 794 D4, 797s).
Why
rehold_held_name_before_attachre-makes ahost_ipsession's name hold before any attach or exec, and sent the verb to whatever control socket sat beside the daemon's. On the native provider that is the native daemon's own control socket, which answers only the answerer verbs, so every call was a refusal, and the hold helper warns on a refusal. Nothing was held anyway: only a VM host daemon holds names, and the activation's hold already checks the provider kind.The change
The re-hold takes the provider kind, as the activation's hold does, and does nothing unless the provider is minvmd. The kind rides through
session_via_sshfrom each command's arguments (attach, exec, run, the bare attach). One commit.Test: the native daemon is asked for no hold (
a_native_attach_reholds_nothing); the existing re-hold tests run as the VM host.Evidence
Lab (min-regress, Cloud Hypervisor, local-minimald), this commit on main a3f2fa9 beside main itself, 2 rounds:
true→ 0 lines;echo e1 >&2→e1only)Lab job 00764, batch
2213fix-1, six distros × 2 rounds (a few cells skipped for lack of image space on the box, which is why the PR column has fewer cells); verdictREGRESSED (base passes, head fails): none.🤖 Generated with Claude Code
Summary by CodeRabbit