Skip to content

fix(doctor): tailscale probe uses resolve_tailscale_bin (catch GUI install) - #159

Merged
joelteply merged 1 commit into
canaryfrom
fix/tailscale-probe-gui-bundle
Apr 27, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/tailscale-probe-gui-bundle

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

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
```

…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`
Copilot AI review requested due to automatic review settings April 27, 2026 20:06
@joelteply
joelteply merged commit e26913d into canary Apr 27, 2026
1 of 2 checks passed
@joelteply
joelteply deleted the fix/tailscale-probe-gui-bundle branch April 27, 2026 20:06

Copilot AI 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.

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_tailscale from command -v tailscale to resolve_tailscale_bin.
  • Invoke the resolved binary path for status checks to support /Applications/Tailscale.app/....

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread airc
Comment on lines +5617 to +5622
# 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.

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
# 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.

Copilot uses AI. Check for mistakes.
Comment thread airc
Comment on lines +5624 to +5625
_ts_bin=$(resolve_tailscale_bin 2>/dev/null || true)
if [ -n "$_ts_bin" ]; then

Copilot AI Apr 27, 2026

Copy link

Choose a reason for hiding this comment

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

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.

Suggested change
_ts_bin=$(resolve_tailscale_bin 2>/dev/null || true)
if [ -n "$_ts_bin" ]; then
if _ts_bin=$(resolve_tailscale_bin 2>/dev/null); then

Copilot uses AI. Check for mistakes.
joelteply added a commit that referenced this pull request Apr 27, 2026
…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.
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.

2 participants