feat(mac-mini): an easier agent machine, and disk reclaim that retries #630

Merged
kblack0610 merged 2 commits from feat/mac-mini-agent-machine into master 2026-11-06 22:17:11 +00:00
Owner

The mac-mini had 13 GiB free and needed a password and a PATH export for routine agent work. This makes it an easier agent machine and stops the disk from filling unnoticed.

macos-agent-tools now sets up passwordless sudo, turns Spotlight off and removes its index, stops the Homebrew Tailscale agent that looped on needing root, stops automatic macOS installs (critical and config-data updates stay on), and adds Homebrew to ~/.zshenv. The sudo entry is blanket, by the human's decision, so both runners' workflows get root on this Mac.

macos-disk-reclaim now wakes hourly and keeps its weekly pass with a stamp. A run that found CI busy used to lose the whole week, which is why the last one freed 0. It also removes Gradle version caches whose daemon has not run for 30 days, and the Unity guard now actually skips the Unity sections: it logged the skip and pruned anyway. DiskReclaimStale and DiskReclaimSkipped warn when a pass stops or stays skipped.

docs/mac-machines.md records that the 30-day screen prompt cannot be moved from code: macOS restored the plist values on the next capture.

Removed: the "no NOPASSWD" statement for the mini, and "now and then" for the prompt.

Verified on the mini: check, apply, then a re-run with changed=0. sudo -n true passes there and still fails on mac-studio. 77 GiB free. A fake Runner.Worker left no stamp, so the next hourly wake retries. run-tests.sh passes, and the rule tests pass under promtool in a container. The reboot test is still to come, after the Steam cut's Mac jobs.

Spotlight off now exists here and in macos-llm-node. This one uses mdutil -X because -E left 42 GB behind on the mini.

https://claude.ai/code/session_01BALUC6NN9dmzupYrubiuwG

The mac-mini had 13 GiB free and needed a password and a PATH export for routine agent work. This makes it an easier agent machine and stops the disk from filling unnoticed. macos-agent-tools now sets up passwordless sudo, turns Spotlight off and removes its index, stops the Homebrew Tailscale agent that looped on needing root, stops automatic macOS installs (critical and config-data updates stay on), and adds Homebrew to `~/.zshenv`. The sudo entry is blanket, by the human's decision, so both runners' workflows get root on this Mac. macos-disk-reclaim now wakes hourly and keeps its weekly pass with a stamp. A run that found CI busy used to lose the whole week, which is why the last one freed 0. It also removes Gradle version caches whose daemon has not run for 30 days, and the Unity guard now actually skips the Unity sections: it logged the skip and pruned anyway. DiskReclaimStale and DiskReclaimSkipped warn when a pass stops or stays skipped. `docs/mac-machines.md` records that the 30-day screen prompt cannot be moved from code: macOS restored the plist values on the next capture. Removed: the "no NOPASSWD" statement for the mini, and "now and then" for the prompt. Verified on the mini: check, apply, then a re-run with `changed=0`. `sudo -n true` passes there and still fails on mac-studio. 77 GiB free. A fake `Runner.Worker` left no stamp, so the next hourly wake retries. `run-tests.sh` passes, and the rule tests pass under promtool in a container. The reboot test is still to come, after the Steam cut's Mac jobs. Spotlight off now exists here and in macos-llm-node. This one uses `mdutil -X` because `-E` left 42 GB behind on the mini. https://claude.ai/code/session_01BALUC6NN9dmzupYrubiuwG
feat(mac-mini): an easier agent machine, and disk reclaim that retries
Some checks failed
checks / ci-disk-prune (pull_request) Successful in 5s
checks / zomboid-scripts (pull_request) Successful in 6s
checks / fleet-roster (pull_request) Successful in 8s
checks / kustomize-builds (pull_request) Successful in 5s
checks / prometheus-rules (pull_request) Failing after 46s
1d4b79184f
macos-agent-tools now gives the agent user passwordless sudo, turns Spotlight off and removes its index, stops the looping Homebrew Tailscale agent, stops automatic macOS installs, and puts Homebrew on a plain ssh command's PATH.

macos-disk-reclaim wakes hourly and keeps its weekly pass with a stamp, so a run that finds CI busy tries again next hour. It also removes unused Gradle version caches, and the Unity guard now really skips the Unity sections. Two warnings cover a pass that stops or stays skipped.

Claude-Session: https://claude.ai/code/session_01BALUC6NN9dmzupYrubiuwG
test(monitoring): sample the reclaim alert series every minute
All checks were successful
checks / ci-disk-prune (pull_request) Successful in 4s
checks / zomboid-scripts (pull_request) Successful in 5s
checks / fleet-roster (pull_request) Successful in 7s
checks / kustomize-builds (pull_request) Successful in 5s
checks / prometheus-rules (pull_request) Successful in 43s
a9a8cef722
An hourly series falls out of the 5m lookback between samples, so for: never completes under CI's promtool.

Claude-Session: https://claude.ai/code/session_01BALUC6NN9dmzupYrubiuwG
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
kblack0610/home-config!630
No description provided.