Repository navigation
fix(doctor): tailscale probe uses resolve_tailscale_bin (catch GUI install) - #159
Conversation
…S GUI install) Bare `command -v tailscale` false-negatives on every macOS install that came from the App Store or downloaded .dmg — Tailscale.app's binary lives at /Applications/Tailscale.app/Contents/MacOS/Tailscale, not on PATH. Caught live 2026-04-27 when airc doctor reported "tailscale not installed" on this Mac while airc was actively publishing a Tailscale IP (100.91.51.87) in the room gist envelope. resolve_tailscale_bin() already exists (called by host_address_set, tailscale_login_check_or_prompt, etc.) — handles the GUI bundle path AND windows tailscale.exe AND Linux PATH. Doctor probe just needs to use it instead of `command -v`. Live verify on this Mac: - pre-fix: `[info] tailscale (optional) -- not installed` - post-fix: `[ok] tailscale (optional) -- daemon up`
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Updates the doctor probe for Tailscale to correctly detect macOS GUI (.app) installs by reusing existing binary resolution logic, eliminating false “not installed” reports.
Changes:
- Switch
_doctor_probe_tailscalefromcommand -v tailscaletoresolve_tailscale_bin. - Invoke the resolved binary path for
statuschecks to support/Applications/Tailscale.app/....
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # Use resolve_tailscale_bin so we find macOS GUI-installed Tailscale.app | ||
| # (the binary lives at /Applications/Tailscale.app/Contents/MacOS/Tailscale, | ||
| # not on PATH by default). Bare `command -v tailscale` false-negatives | ||
| # on every Mac that installed via the App Store / dmg — caught live | ||
| # 2026-04-27 when Mac doctor said "tailscale not installed" while | ||
| # airc was actively publishing a Tailscale IP from the running app. |
There was a problem hiding this comment.
These comments are very time-specific and anecdotal (includes a specific date and incident narrative). Consider tightening to a concise, evergreen explanation of the behavior (GUI install path vs PATH) and dropping the incident/date to keep the script documentation maintainable.
| # Use resolve_tailscale_bin so we find macOS GUI-installed Tailscale.app | |
| # (the binary lives at /Applications/Tailscale.app/Contents/MacOS/Tailscale, | |
| # not on PATH by default). Bare `command -v tailscale` false-negatives | |
| # on every Mac that installed via the App Store / dmg — caught live | |
| # 2026-04-27 when Mac doctor said "tailscale not installed" while | |
| # airc was actively publishing a Tailscale IP from the running app. | |
| # Use resolve_tailscale_bin so we find macOS GUI-installed Tailscale.app. | |
| # On those installs, the binary may live inside | |
| # /Applications/Tailscale.app/Contents/MacOS/Tailscale and not be on PATH, | |
| # so bare `command -v tailscale` can report a false negative. |
| _ts_bin=$(resolve_tailscale_bin 2>/dev/null || true) | ||
| if [ -n "$_ts_bin" ]; then |
There was a problem hiding this comment.
Consider using an idiomatic command-substitution-in-condition pattern (e.g., if _ts_bin=$(resolve_tailscale_bin 2>/dev/null); then ...) instead of $(... || true) plus a string non-emptiness check. This avoids masking unexpected failures and reads more directly, while still being compatible with set -e environments.
| _ts_bin=$(resolve_tailscale_bin 2>/dev/null || true) | |
| if [ -n "$_ts_bin" ]; then | |
| if _ts_bin=$(resolve_tailscale_bin 2>/dev/null); then |
…nd-to-end (#177) fix(msys): export MSYS2_ARG_CONV_EXCL at airc startup — last layer of cross-machine fix (continuum's catch + verify) continuum-b69f's diagnosis 2026-04-27: even with PR #174 + #176's argparse `--flags`, MSYS Git Bash on Windows translates argv VALUES that look like Unix-rooted paths when bash invokes a Windows-native binary. So `--host-airc-home /Users/joelteply/.airc` arrived at python.exe as `--host-airc-home C:/Program Files/Git/Users/joelteply/.airc`, the joiner cached the corrupted path, the SSH command later sent it to a real Unix host that had no such file. Silent broadcast failure. ## Fix ```bash export MSYS2_ARG_CONV_EXCL="${MSYS2_ARG_CONV_EXCL:-/Users/;/home/;/root/}" ``` Set once at airc startup, exported, every airc_core invocation inherits the same translation policy. Targeted prefix list covers macOS / Linux / root home prefixes without breaking `/tmp/` or `/c/` paths (which DO need translation for `--config "$CONFIG"` where $CONFIG is on the local Windows filesystem). Honors a user override via the `${...:-...}` default-fallback. ## End-to-end verification continuum-b69f shipped a test broadcast from Windows after their local patch: > WORKING TEST: Windows-Mac airc msg via continuum-msyspatch with > targeted MSYS exclude. should land! Verified live in MY host's messages.jsonl on Mac: ``` {"from":"continuum-msyspatch","to":"all","ts":"2026-04-27T23:30:13Z", "msg":"WORKING TEST: Windows-Mac airc msg via continuum-msyspatch with targeted MSYS exclude. should land!","sig":"..."} ``` **Cross-machine Mac↔Windows airc end-to-end working.** This was the last bug in the chain that started at PR #153 (Microsoft Store python3 stub). ## Test posture (Mac, where the env var is a no-op) - tabs 19/19, identity 19/19, whois 5/5, part_persists 8/8, list 4/4, general_sidecar_default 12/12, kick 12/12, events 5/5, platform_adapters 11/11, whois_cross_scope 6/6 ## Today's full chain of cross-machine fixes #153 → #154 → #155 → #156 → #157 → #158 → #159 → #160 → #162 → #164 → #165 → #166 → ... → #176 → this. 27+ PRs to ship a working cross-machine airc on Windows. Every step revealed a new layer.
Bare `command -v tailscale` false-negatives on every macOS Tailscale.app install (App Store / .dmg). Binary lives at `/Applications/Tailscale.app/Contents/MacOS/Tailscale` — not on PATH by default.
`resolve_tailscale_bin()` already exists and handles the GUI bundle path. Doctor probe just needs to use it.
Pre-fix (this Mac, Tailscale.app installed + running):
```
[info] tailscale (optional) -- not installed; only needed for cross-LAN mesh
Install: brew install --cask tailscale
```
Post-fix:
```
[ok] tailscale (optional) -- daemon up
```