fix(server): explain a disabled tailnet Serve instead of timing out #10958
main fromrefs/pull/10958/head·merged by juliusmarminge View on GitHubProblem#
When HTTPS certificates are disabled for a tailnet, pairing through Tailscale can wait for Serve to finish and then report an unexplained timeout.
Change#
Use the capability map already returned by tailscale status to detect an explicitly disabled HTTPS capability before starting Serve. The diagnostic points to the Tailscale admin DNS settings. Missing or unrecognized capability data preserves the existing attempt instead of blocking pairing.
Scope and approval#
This is a maintainer-requested takeover of the existing, focused pairing bug fix. Scope is limited to the pair --tailscale diagnostic, the shared status fact it reads, and regression coverage. The normal server startup path is unchanged.
Based on the original fix by @Sethmr.
Verification#
33 focused CLI/parser tests pass, including a CLI regression that checks the diagnostic and proves no Serve command is spawned. The desktop endpoint test also passes (10 cases), and server, Tailscale, and desktop typechecks pass; scoped lint and formatting pass. The failure paths were confirmed with temporary production-code probes, then restored. A live tailnet with HTTPS disabled was not exercised in this takeover.
Taken over with Claude Opus 5.5 (tests and review), Claude Fable 5.1 (implementation), and GPT-6.1 Sol (review) through T3 Code; coordinated with Codex.
- 1
github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:M
Approvability#
Verdict: Approved at
5d6cc14Macroscope's review found this PR approvable — This is a small, well-scoped Tailscale pairing fix that replaces an opaque timeout with a targeted diagnostic only when HTTPS Serve is explicitly disabled. Existing behavior remains unchanged when capability data is missing, and regression tests cover the new decision and its side effects.
You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
-
⚙️ Run configuration
-
- Configuration used: Path: .coderabbit.config.ts
- Review profile: CHILL
- Plan: Advanced
- Run ID:
86abe02a-f696-4c45-aa11-6fed3714b8d6
📥 Commits
-
Reviewing files that changed from the base of the PR and between 106ba704a87ba3c4f8b052a22bc02c9371fcc469 and 5d6cc14ba85a3573daeb9816fb5c929b39e64444.
📒 Files selected for processing: 5
-
apps/desktop/src/backend/tailscaleEndpointProvider.test.tsapps/server/src/cli/pair.test.tsapps/server/src/cli/pair.tspackages/tailscale/src/tailscale.test.tspackages/tailscale/src/tailscale.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
-
📝 Walkthrough
-
The Tailscale status parser now exposes whether HTTPS Serve is enabled, disabled, or unknown. Pairing returns a tagged error when HTTPS Serve is explicitly disabled.
Changes: Tailscale Serve pairing flow
Layer / File(s) Summary Parse HTTPS Serve capability state
packages/tailscale/src/tailscale.ts,packages/tailscale/src/tailscale.test.ts,apps/desktop/src/backend/tailscaleEndpointProvider.test.tsThe status parser reads Self.CapMapand exposeshttpsServeEnabledastrue,false, ornull. Tests cover capability parsing and status results.Guard pairing configuration
apps/server/src/cli/pair.ts,apps/server/src/cli/pair.test.tsThe pairing flow returns TailscaleServeNotEnabledErrorwhen HTTPS Serve is disabled, before checking or configuring the Serve mapping. The CLI test verifies the guidance and that no Serve command runs.Priority: ⬇️ Low
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Suggested reviewers:
juliusmarminge,t3dotgg
Merge Risk: ⚪ Minimal · up to
5d6cc-
Pairing now provides HTTPS setup guidance instead of attempting Serve when the capability is reported absent. No actionable merge-blocking issue remains.
Security architecture risk: 🔵 Low · up to
5d6cc-
The change adds an early rejection without expanding network exposure or weakening pairing authentication. Remaining uncertainty concerns whether capability metadata reliably distinguishes disabled HTTPS from an unreported capability in real Tailscale configurations.
Retained concerns No architecture-level concerns identified.
Security review details
-
Security Blast Radius
- inferred — The added predicate can stop a locally invoked Tailscale pairing attempt but does not introduce a remote entrypoint, additional command authority, or a new exposure destination. Continuing attempts use the same selected Serve port and local target as before.
Trust Boundaries and Controls
- observed — The capability hint is not substituted for environment identity or credential authorization. Existing mappings still undergo environmentId checks, non-T3 responders are rejected, and pairing links are still created through EnvironmentAuth after resolver success.
Resilience and Maintainability Implications
- observed — Unrecognized capability-map shapes retain the existing attempt path rather than selecting weaker transport or skipping authentication. Status failures remain errors, and an explicit false result terminates before shared Serve state changes.
-
Pre-merge checks:
4-
Check name Status Explanation Linked Issues check Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Check skipped because no linked issues were found for this pull request. Title check The title clearly and concisely describes the main change: explaining disabled Tailscale Serve instead of waiting for a timeout. It also follows the conventional commit format. Description check The description includes all required sections: Problem, Change, Scope and approval, and Verification. It explains the behavior change, scope, tests, limitations, and agent usage. The approval context… Full details: Description check
-
Explanation
The description includes all required sections: Problem, Change, Scope and approval, and Verification. It explains the behavior change, scope, tests, limitations, and agent usage. The approval context is described, although no direct approval comment is linked.
-
Comment `@coderabbitai help` to get the list of available commands.✨ Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
-
juliusmarminge added labelsmacroscope-review
Note
Written by
claude-opus-5-5on behalf of MariaHi! We are cleaning up open PRs, and this one appears to have been created with an older model (
opus 5). If this change is really important, we recommend rebuilding the PR with a newer model if possible.maria-rcks closed this
Note
Written by
claude-opus-5-5on behalf of MariaReopening, this was closed by mistake. Sorry for the noise!
maria-rcks reopened this
juliusmarminge assignedjuliusmarminge
Taking over this one. I’ll reduce the tests to the useful coverage, update the implementation against current main, and verify it before publishing the changes.
github-actions[bot](GitHub profile, opens in a new tab) removed labelssize:M
github-actions[bot](GitHub profile, opens in a new tab) added labelssize:S
macroscopeapp[bot](GitHub profile, opens in a new tab) approved these changes
juliusmarminge merged this639ac5e
juliusmarminge closed this
Sign in to join this conversation.
Bugbot is paused — on-demand spend limit reached
Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.
A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.