Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): explain a disabled tailnet Serve instead of timing out #10958

MergedSethmr(GitHub profile, opens in a new tab)merged 6 commits intomain fromrefs/pull/10958/headmerged by juliusmarminge View on GitHub

Problem

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

    2. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    3. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at 5d6cc14

      Macroscope'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).
    4. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review in Change Stack →

      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.ts
      • apps/server/src/cli/pair.test.ts
      • apps/server/src/cli/pair.ts
      • packages/tailscale/src/tailscale.test.ts
      • packages/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.ts
      The status parser reads Self.CapMap and exposes httpsServeEnabled as true, false, or null. Tests cover capability parsing and status results.
      Guard pairing configuration
      apps/server/src/cli/pair.ts, apps/server/src/cli/pair.test.ts
      The pairing flow returns TailscaleServeNotEnabledError when 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: Passed 4
      Check nameStatusExplanation
      Linked Issues checkPassedCheck skipped because no linked issues were found for this pull request.
      Out of Scope Changes checkPassedCheck skipped because no linked issues were found for this pull request.
      Title checkPassedThe 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 checkPassedThe 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.

      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create a new PR
      Comment `@coderabbitai help` to get the list of available commands.
    5. juliusmarminge added labelsmacroscope-review

    6. Note

      Written by claude-opus-5-5 on behalf of Maria

      Hi! 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.

    7. maria-rcks closed this

    8. Note

      Written by claude-opus-5-5 on behalf of Maria

      Reopening, this was closed by mistake. Sorry for the noise!

    9. maria-rcks reopened this

    10. juliusmarminge assignedjuliusmarminge

    11. 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.

    12. juliusmarminge merged this639ac5e

    13. juliusmarminge closed this

Sign in to join this conversation.