Repository navigation
fix: the macOS uninstall fallback commands remove the lo0 aliases and the empty directories, and the - #3591
Conversation
The printed root line after a piped uninstall on macOS now removes the 127.0.64.1-254 aliases on lo0, unless minvmd runs, and removes /etc/resolver and /Library/PrivilegedHelperTools when they are empty. The note says the DNS service keeps running until the commands run.
|
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. |
bryan-minimal
left a comment
There was a problem hiding this comment.
Read at 33ad4c6. The change does what its title says, and the test runs the printed line against a fake root, which is the right way to check a line a person will paste. Three notes, none blocking.
1. Where the new sentence sits (low). The output now reads:
With min gone, remove everything listed with:
The DNS service (launchd job dev.gominimal.zone) keeps running until these commands run.
sudo launchctl bootout ...
The line that ends in a colon promises the commands next, and the note comes between them. Put the note before "With min gone", or after the commands.
2. /Library/PrivilegedHelperTools (low). The finalize script makes this directory with mkdir -p beside /etc/resolver, so removing it when empty is a fair inverse. It is also a standard macOS location that other installers use. rmdir only removes it when nothing else is in it, so the risk is small, but the test that used to say "the system directory stays" was a deliberate statement. Worth a sentence in the PR on why it changed. /etc/resolver is the same case and less of a concern.
3. A running VM (question). With a VM running, the line has already booted out dev.gominimal.zone and removed the helper before it reaches the pgrep. So the aliases stay, as the note says, but box names in that VM have stopped resolving. That is probably right for an uninstall with min already gone. If it is intended, the note could say so: "Stop every VM" is the only hint today.
Checked and fine: the range is 127.0.64.1 to 254, which matches the loopback block in crates/boxes/src/core/loopback.rs; the loop never touches .0 or .255, and a test pins that; every step tolerates what is already gone, so "run this line again" holds; pgrep -qx and the bare ifconfig keep the line free of unquoted paths, as the remedy runner requires.
Not checked: a run on a real Mac. The PR says the test ran on Linux.
🤖 Generated with Claude Code
|
/arch-review |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms. Section 7.1 of the networking design covers how the resolver file and the loopback range get installed on macOS. It says nothing about how they get removed, so this is a pass by absence. The installer only prints the new root commands and stays root-free. The alias loop removes exactly the reserved range 127.0.64.1-254. It keeps the aliases while a VM runs.
Ruled at 33ad4c6 against gominimal/arch@327e1b57d16b by claude-opus-5-5.
norrietaylor
left a comment
There was a problem hiding this comment.
Gate passed at 33ad4c6: minimal-review APPROVE, arch-review APPROVED, lanes green, no open threads.
Follow-up
Fixes #3579
scripts/install.shscripts/install_test.shTask marker
Proof
After a piped uninstall on macOS, the printed root line boots out the minimal launchd jobs and removes the 127.0.64.1-254 aliases from lo0. If minvmd runs, it keeps the aliases and says why. It also removes /etc/resolver and /Library/PrivilegedHelperTools when they are empty. The note says that the DNS service (launchd job dev.gominimal.zone) keeps running until these commands run. The test runs the printed line against a fake root and checks each of these.
Notes from the agent: The remedy runner in install_test.sh refuses an unquoted path in a printed line. So the line uses bare 'ifconfig' and 'pgrep -qx minvmd' (BSD pgrep has -q), not /sbin/ifconfig or >/dev/null. The test asserted before that Library/PrivilegedHelperTools stays. The task asks for rmdir on it, so that assertion now checks that it goes when empty. On a real Mac, rmdir removes it only if no other helper is in it. When a VM runs, the line prints a note of its own: 'note: the loopback IPs boxes use stay on lo0 while a VM is running. Stop every VM, then run this line again.' The 'run this line again' instruction is valid because every step in the line tolerates what is already gone. shellcheck is clean on both files. The test ran on Linux only, with stubs. No real macOS host ran the line.
Tests
bash scripts/install_test.sh finalize_install_uninstallVerify
min task run agent-verifypassed ([tasks.verify]).