Skip to content

fix(pool): pool probe works for Mac remotes — zsh glob + mem fallback#11

Merged
dancinlife merged 1 commit into
mainfrom
feat/pool-probe-zsh-fix
May 17, 2026
Merged

fix(pool): pool probe works for Mac remotes — zsh glob + mem fallback#11
dancinlife merged 1 commit into
mainfrom
feat/pool-probe-zsh-fix

Conversation

@dancinlife
Copy link
Copy Markdown
Contributor

Registering mini (Apple Silicon Mac) surfaced 2 Linux-only assumptions in _probe_remote that crashed pool probe: (1) zsh aborts on the unmatched /sys/class/drm/card* GPU-probe glob — fixed with setopt nonomatch; (2) mem read only /proc/meminfo — added sysctl hw.memsize fallback. wilson test 23/23; pool probe now reports all 4 hosts incl mini (Darwin, 10c, 16384MB). Done via the worktree plugin.

…back

Registering `mini` (an Apple Silicon Mac) to the pool surfaced two
Linux-only assumptions in _probe_remote that crashed `pool probe`:

1. zsh unmatched-glob crash — the remote GPU probe runs
   `ls /sys/class/drm/card*/device/vendor`. A Mac remote's login shell
   is zsh, which aborts the command line on an unmatched glob ("no
   matches found"), killing the whole probe script and poisoning the
   cores/mem parse (`to_int: not an integer: "zsh:1: no matches…"`).
   Fix: prefix the remote script with `setopt nonomatch 2>/dev/null;` —
   zsh then passes an unmatched glob literally (`ls` → 2>/dev/null →
   empty); bash/sh have no `setopt` (error suppressed) and already pass
   unmatched globs literally, so it is harmless there.

2. mem reported 0 MB — memory detection only read /proc/meminfo (Linux).
   Fix: fall back to `sysctl -n hw.memsize` on Mac, mirroring the cores
   line's existing `nproc || sysctl hw.ncpu` dual path.

Verified: wilson build OK; wilson test 23/23; `pool probe` now reports
all 4 hosts — mac, ubu-1 (gpu=NVIDIA), ubu-2, and mini (Darwin 25.4.0
arm64, 10 cores, 16384 MB). Before: mini → zsh-glob crash / 0 MB.

Done via the `worktree` plugin (worktree start→pr→merge→finish in /tmp).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dancinlife dancinlife merged commit 4e1cc35 into main May 17, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant