Repository navigation
fix(cli): t3 pair --tailscale names the operator fix when Tailscale denies Serve - #37466
Conversation
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Linux Tailscale Serve permission failures now show the operator setup command instead of generic troubleshooting guidance. This only changes failure messaging; it does not execute the command or change permissions automatically. You can add or adjust custom eligibility rules. Learn more. |
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Other scenariosAll 64 scenario measurements match All 64 scenario measurements
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Nothing needed changing this round. The brief listed no items, and on 4ad3e51 all 8 required checks passed, Macroscope approved with no comments on lines, and CodeRabbit reported no actionable comments. The fix is unchanged: on Linux, when ensureTailscaleServe fails with stderrDiagnostic 'permission-denied', resolveTailscalePairingBase in apps/server/src/cli/pair.ts now returns TailscaleOperatorRequiredError, which tells the user to run
sudo tailscale set --operator=$USERonce and then run the command again. Before, it returned the generic 'run it by hand to see why' TailscaleServeFailedError.Fixes #37459
Reproduction on main
Commit 6b7027b (origin/main). Ran on a Linux VM whose Tailscale is running with MagicDNS and HTTPS certificates on, OperatorUser unset (
tailscale debug prefs-> null), as a normal user. 1)vp i. 2) From apps/server:T3CODE_DEV_SEED=0 node src/bin.ts serve --base-dir <scratch> --port 37459 --no-browser(listening on 127.0.0.1:37459). 3)node src/bin.ts pair --base-dir <scratch> --tailscale --tailscale-serve-port 8459exited 1 withERROR: TailscaleServeFailedError: tailscale serve failed for HTTPS port 8459. Run \tailscale serve --https=8459 --bg ` by hand to see why., a stack trace through pair.ts:445, and causeTailscaleCommandExitError: tailscale serve exited with code 1. Permissions and the operator were not mentioned. 4)tailscale serve --https=8459 --bg http://127.0.0.1:37459` by hand printedsending serve config: Access denied: serve config denied/Use 'sudo tailscale serve ...'/To not require root, use 'sudo tailscale set --operator=$USER' once.tailscale serve statusstayedNo serve config. Failing test:vp test run src/cli/pair.test.ts -t Tailscalefails 'explains the operator fix when Tailscale denies the Serve config' because the error is the generic TailscaleServeFailedError text.Evidence
Evidence: Run the real server on port 37459 with fresh isolated state, then run
pair --tailscale --tailscale-serve-port 8459as a normal Linux user with OperatorUser unset. Direct Tailscale invocation confirms permission denial on both commits. Both commands exit 1 and leave no Serve config.Images render captured CLI output with filesystem paths sanitized. Head now explains the operator fix; a stack trace remains.
Before transcript · After transcript · Reproduction driver · Transcript renderer
Not shown:
Tests
No new runs this round. CI on 4ad3e51: all 8 required checks passed (Test, Test Server 1-8, Lint, Build and Typecheck, Macroscope checks). Earlier, locally: vp test run src/cli/pair.test.ts (27/27 passed) and vp run check:changed (all pass).
Not in this change
Who did the work
Run by the t3code factory in T3 Code.