Skip to content

fix: the macOS uninstall fallback commands remove the lo0 aliases and the empty directories, and the - #3591

Merged
norrietaylor merged 1 commit into
mainfrom
agent/3579-the-macos-uninstall-fallback-commands-remove-the
Nov 18, 2026
Merged

norrietaylor merged 1 commit into
mainfrom
agent/3579-the-macos-uninstall-fallback-commands-remove-the

Conversation

@minimal-foundry

Copy link
Copy Markdown
Contributor

Follow-up

Fixes #3579

Task marker
### D3571 — The macOS uninstall fallback commands remove the lo0 aliases and the empty directories, and the note says the DNS service runs until they run
  kind: task
  size: S
  est: 15 code, 30 tests
  executor: agent
  origin: bug
  epic: 1437
  layers:
    - installer:
      - scripts/install.sh: In the darwin _ns_undo, add the lo0 alias loop for 127.0.64.1-254 (skip while minvmd runs) and rmdir /etc/resolver and /Library/PrivilegedHelperTools. The non-tty note says dev.gominimal.zone keeps running until the commands run.
      - scripts/install_test.sh: Add ifconfig and pgrep remedy stubs. In case_finalize_install_uninstall, check the alias removal calls, the removal of the empty directories and the running-service text in the note.
      test: bash scripts/install_test.sh finalize_install_uninstall
  proof: After a piped uninstall on macOS, the printed commands leave no 127.0.64.x alias on lo0, no /etc/resolver directory and no minimal launchd job. The note says that the DNS service runs until the commands run.

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

line exit tail
bash scripts/install_test.sh finalize_install_uninstall 0 this host carries, and only those ok - uninstall with an unrecorded classifier tree exits 0 ok - an unrecorded classifier tree is not advised for removal ok - every printed remedy ran (0 line(s)) ok - an unrecorded classifier tree stays ok - the tree's remedy fails while the tree is held

Verify

min task run agent-verify passed ([tasks.verify]).

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.
@coderabbitai

coderabbitai Bot commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 80e7151c-9767-4e59-868e-ba0df4f6900a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@minimal-foundry

minimal-foundry Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor Author

Approved: no findings at 33ad4c6b3293.

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.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — approved

Verdict APPROVE — No findings.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Nov 18, 2026

@bryan-minimal bryan-minimal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@norrietaylor

Copy link
Copy Markdown
Member

/arch-review

@minimal-arch minimal-arch Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 norrietaylor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gate passed at 33ad4c6: minimal-review APPROVE, arch-review APPROVED, lanes green, no open threads.

@norrietaylor
norrietaylor added this pull request to the merge queue Nov 18, 2026
Merged via the queue into main with commit 1f91f3a Nov 18, 2026
42 checks passed
@norrietaylor
norrietaylor deleted the agent/3579-the-macos-uninstall-fallback-commands-remove-the branch November 18, 2026 23:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

D3571 — The macOS uninstall fallback commands remove the lo0 aliases and the empty directories, and the note says the DNS service runs until they run

2 participants