You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
t3 pair --tailscale points Serve at IPv4 loopback when the recorded dev web URL uses [::1]. An IPv6-only listener refuses that connection, so the tailnet pairing URL cannot reach the dev web app.
Deterministic repro on origin/main (5c4a3d5ffec9746171d7f0595d39aaf2f843b726): Run vp test run apps/server/src/cli/pair.test.ts -t 'publishes an IPv6-only dev web origin through Tailscale Serve when pairing' with the regression test applied to base. The test starts separate HTTP listeners on 127.0.0.1 (backend) and ::1 (dev web), both on OS-assigned ports. It uses the runtime-state writer to record the equivalent of t3 serve --base-dir <temp-dir> --dev-url 'http://[::1]:<dev-port>' --no-browser, then runs t3 pair --base-dir <temp-dir> --tailscale. Pairing discovers the record through the live backend, selects the dev target, checks the existing Serve route, and passes the target to tailscale serve --bg --https=443. The test captures that command at the subprocess boundary and dials its URL over real loopback HTTP.
Observed: Serve receives http://127.0.0.1:<dev-port>; the dial fails with ECONNREFUSED.
Expected: Serve receives http://[::1]:<dev-port>; the dial returns the dev listener's environment descriptor.
Change
Preserve [::1] from the dev URL so the route check uses ::1 and Serve receives a bracketed IPv6 HTTP target. Existing IPv4, localhost, and non-dev behavior is unchanged. This only changes the CLI's Serve target selection; no client or provider changes are needed.
Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
Focused CLI regression: base failed with ECONNREFUSED on the emitted IPv4 target; the patch passed after dialing the exact IPv6 target and checking the CLI's pairing URL.
vp run check:changed exited 0, including 36 tests across two files.
Not shown: authenticated Tailscale Serve configuration, remote tailnet requests, or browser pairing. The subprocess and MagicDNS HTTPS response are stubbed; the local listeners and HTTP dials are real.
Authored by GPT-6.2 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).
Macroscope's review found this PR approvable — Tailscale pairing now preserves IPv6 loopback when targeting an IPv6-only development listener. Existing port-ownership checks remain unchanged, with no broader network exposure introduced.
Notes:
All code in this push has already been reviewed. Approvability was decided on eligibility alone.
No code changes detected at c1d4ba2. Prior analysis still applies.
You can add or adjust custom eligibility rules. Learn more.
Reviewing files that changed from the base of the PR and between c5baa35 and c1d4ba2.
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The pairing target logic now treats [::1] as an implicit local host. A test checks the resolved target for an IPv6 development URL.
Changes: Tailscale pairing
Layer / File(s)
Summary
IPv6 pairing target and test apps/server/src/cli/pair.ts, apps/server/src/cli/pair.test.ts
[::1] now follows the implicit-local-host path and returns only localPort. The test checks the IPv6 URL and expects port 5733 with [::1] as the explicit local host.
This fixes t3 pair --tailscale for IPv6 loopback dev URLs. The IPv4, localhost and non-dev paths are unchanged. No merge-blocking risk remains after review.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the change: Tailscale pairing (t3 pair --tailscale) is pointed at an IPv6-only dev web listener. The diff changes resolveTailscaleLocalTarget in apps/server/src/cli/pair.ts so `[…
Description check
The description follows the template. It has Problem, Change, Scope, and Verification sections. The problem is stated with expected and observed behavior and a reproduction path. The change explains t…
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.
Full details: Title check
Explanation
The title names the change: Tailscale pairing (t3 pair --tailscale) is pointed at an IPv6-only dev web listener. The diff changes resolveTailscaleLocalTarget in apps/server/src/cli/pair.ts so [::1] is kept as a local target, and the test table covers http://[::1]:5733/. The title is specific and matches the primary change. It uses the conventional commit form and is 66 characters, within a reasonable length.
Full details: Description check
Explanation
The description follows the template. It has Problem, Change, Scope, and Verification sections. The problem is stated with expected and observed behavior and a reproduction path. The change explains the fix and its limits. Scope says this is a small bug fix and why no issue is needed. Verification lists a focused regression, a check run, a before/after transcript, and what was not shown. The description is detailed and mostly complete. Two points are weaker: the Scope section does not link a maintainer request (none is stated), and the Verification section gives counts without a direct statement of the passing assertion output. These are minor.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between e4d11db and c5baa35.
Files selected for processing: 1
apps/server/src/cli/pair.test.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.
Replace the subprocess-stubbed integration test with one case in the existing resolveTailscaleLocalTarget table; it fails on main the same way.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Start the real development web app on IPv6 loopback only, with its backend proxy configured. Start t3 serve --base-dir <fresh-data> --dev-url 'http://[::1]:18543' --no-browser, then run t3 pair --base-dir <fresh-data> --tailscale and request its emitted HTTPS pairing URL. Both runs used fresh state and the same ports and probe script.
Environment: Linux, real authenticated Tailscale 1.104.5 and Serve, real Node server plus Vite, isolated fresh databases; terminal captures at 1024×722 in the same light theme. The captures are unedited. Private pairing URLs are withheld by the driver; actual ss, Serve handler JSON and curl results are visible. The head URL also reached the real welcome screen in shared Chromium preview.
A separately identified second tailnet device was not used. HTTPS transport was exercised through the real Tailscale Serve endpoint from this VM and the shared preview browser; the browser's host location was not independently established.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
size:XS0-9 changed lines (additions + deletions).vouch:trustedAuthor is trusted by repo permissions or the VOUCHED list.
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
t3 pair --tailscalepoints Serve at IPv4 loopback when the recorded dev web URL uses[::1]. An IPv6-only listener refuses that connection, so the tailnet pairing URL cannot reach the dev web app.Deterministic repro on
origin/main(5c4a3d5ffec9746171d7f0595d39aaf2f843b726): Runvp test run apps/server/src/cli/pair.test.ts -t 'publishes an IPv6-only dev web origin through Tailscale Serve when pairing'with the regression test applied to base. The test starts separate HTTP listeners on127.0.0.1(backend) and::1(dev web), both on OS-assigned ports. It uses the runtime-state writer to record the equivalent oft3 serve --base-dir <temp-dir> --dev-url 'http://[::1]:<dev-port>' --no-browser, then runst3 pair --base-dir <temp-dir> --tailscale. Pairing discovers the record through the live backend, selects the dev target, checks the existing Serve route, and passes the target totailscale serve --bg --https=443. The test captures that command at the subprocess boundary and dials its URL over real loopback HTTP.http://127.0.0.1:<dev-port>; the dial fails withECONNREFUSED.http://[::1]:<dev-port>; the dial returns the dev listener's environment descriptor.Change
Preserve
[::1]from the dev URL so the route check uses::1and Serve receives a bracketed IPv6 HTTP target. Existing IPv4,localhost, and non-dev behavior is unchanged. This only changes the CLI's Serve target selection; no client or provider changes are needed.Scope
Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.
Verification
ECONNREFUSEDon the emitted IPv4 target; the patch passed after dialing the exact IPv6 target and checking the CLI's pairing URL.vp run check:changedexited 0, including 36 tests across two files.Authored by GPT-6.2 Sol (Codex); reviewed by Gemini 4 Neon (Antigravity).