Registry Mirror
Skip to content

Conversation

@saphid

@saphid saphid commented Dec 2, 2026

Copy link
Copy Markdown
Contributor

Problem

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.
  • Before/after CLI transcript.
  • 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).

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XS 0-9 changed lines (additions + deletions). labels Dec 2, 2026
macroscopeapp[bot]
macroscopeapp Bot previously approved these changes Dec 2, 2026
@macroscopeapp

macroscopeapp Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Approved at c5baa35

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.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration

Commits

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.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Merge Risk: Minimal · previous review c5baa

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: Passed 4

Check name Status Explanation
Title check Passed 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 Passed 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 Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed 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
Recent review info

Run configuration

Commits

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.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Dec 2, 2026
juliusmarminge and others added 2 commits December 2, 2026 13:46
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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>
@macroscopeapp
macroscopeapp Bot dismissed their stale review December 2, 2026 13:47

Dismissing prior approval to re-evaluate c5baa35

@juliusmarminge

Copy link
Copy Markdown
Member

The automated pipeline stopped on this pull request and will not merge it:

someone else pushed to hunter/c-967c6db7f4 (head is now c5baa35); the pipeline does not build on commits it did not review

It stays open for a person to finish or close.

@juliusmarminge juliusmarminge added takeover:blocked Takeover blocked; reason in the PR body takeover:in-progress A takeover lead is working on this PR and removed takeover:in-progress A takeover lead is working on this PR takeover:blocked Takeover blocked; reason in the PR body labels Dec 2, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@juliusmarminge

Copy link
Copy Markdown
Member

Evidence

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.

Before After
8ccce44431 c1d4ba212c
Before: real CLI shows IPv6-only listener, IPv4 Serve target and HTTPS 502 After: real CLI shows IPv6-only listener, IPv6 Serve target and HTTPS 200
CLI recording · Raw command output CLI recording · Raw command output

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.

Probe driver · Capture driver · App startup commands

Not shown:

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

@juliusmarminge juliusmarminge added takeover:ready Takeover done; auto-lands when gates pass and removed takeover:in-progress A takeover lead is working on this PR labels Dec 2, 2026
@juliusmarminge
juliusmarminge merged commit 12a3d99 into pingdotgg:main Dec 2, 2026
48 checks passed
@juliusmarminge juliusmarminge removed the takeover:ready Takeover done; auto-lands when gates pass label Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS 0-9 changed lines (additions + deletions). vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants