GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(client-runtime): persist Tailscale network flag on learned IPv6 and MagicDNS routes by saphid · Pull Request #44725 · pingdotgg/t3code

Conversation

@saphid

@saphid saphid commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Problem

A learned plain-HTTP Tailscale IPv6 (http://[fd7a:115c:a1e0::1]:3773/) or MagicDNS (http://box.tail1234.ts.net:3773/) route that borrows an HTTPS-paired token and lacks profile.network: "tailscale" never persists network: "tailscale" when the server reports kind: "tailnet", so usableRoutes permanently filters it out as sending the token in the clear (and clearing network: "tailscale" on such routes is likewise dropped). In mergeLearnedRoutes, the change-detection signature hashes connectionRouteKind(route)—which already returns "tailnet" for fd7a:115c:a1e0::/48 and *.ts.net via isTailnetHost regardless of profile.network—so signature(saved) === signature(next) evaluates to true and mergeLearnedRoutes returns null.

Deterministic repro on origin/main (d588352064a86bb051e93b676d1631a1c1c6f4de):
From packages/client-runtime, call mergeLearnedRoutes with an entry containing [learned('learned:environment-1:http://[fd7a:115c:a1e0::1]:3773@public', 'http://[fd7a:115c:a1e0::1]:3773/'), learned('learned:environment-1:http://box.tail1234.ts.net:3773@public', 'http://box.tail1234.ts.net:3773/'), PUBLIC, RELAY] (without network set on the learned profiles), activeRoute: PUBLIC, reported: [{ kind: 'tailnet', httpBaseUrl: 'http://[fd7a:115c:a1e0::1]:3773/' }, { kind: 'tailnet', httpBaseUrl: 'http://box.tail1234.ts.net:3773/' }], and allowInsecure: true, then evaluate usableRoutes:

  • Observed on origin/main: mergeLearnedRoutes returns null (dropping the network: "tailscale" update), and usableRoutes(entry) excludes both Tailscale routes (["public", "relay"]).
  • Expected: mergeLearnedRoutes returns the updated route list with profile.network === "tailscale" set on both routes, and usableRoutes(entryWithRoutes(entry, merged)) keeps them usable.

Change

Include profile.network ?? "" (for BearerConnectionProfile) in mergeLearnedRoutes's signature helper in packages/client-runtime/src/connection/routes.ts so setting or clearing profile.network on Tailscale IPv6 and MagicDNS routes is persisted rather than treated as a no-op. This shared packages/client-runtime module is used across Web, Desktop, and Mobile environment connection routing, with no contract, server, provider, or i18n changes needed.

Scope

Small fix for an obvious bug; no issue needed under CONTRIBUTING.md.

Verification

  • Base failure (unmodified origin/main d588352064a86bb051e93b676d1631a1c1c6f4de): vp test run packages/client-runtime/src/connection/routes.test.ts -t "persists Tailscale network flag updates on IPv6 and MagicDNS routes" failed with AssertionError: expected null not to be null at expect(updated).not.toBeNull().
  • Head passes (2/2 consecutive runs): vp test run packages/client-runtime/src/connection/routes.test.ts passed 25/25 tests on both consecutive runs (covering setting network: "tailscale" on learned IPv6 and MagicDNS routes, verifying usableRoutes keeps them, idempotency on repeat merge, and clearing network: "tailscale" when kind: "tailnet" is no longer reported).
  • vp run check:changed: Exited 0 (format pass, lint pass with 0 warnings/errors, knip 1/2 & 2/2 pass, typecheck across 7 packages pass, routes.test.ts 25/25 pass).
  • Before/after runtime transcript: https://gist.github.com/saphid/5200fdd0266f67ac35f35c3c3c54424a
  • Not shown: End-to-end live Tailscale network connection across a physical Tailscale IPv6/MagicDNS host and full repo-wide CI suite (owned by CI).

Authored by Gemini 4 Neon (Antigravity); reviewed by Kimi K3.1 Pro (Model Hub).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@saphid
fix(client-runtime): persist Tailscale network flag on learned IPv6 a…
1bbd70a
…nd MagicDNS routes
@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 Nov 28, 2026
@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Explain Change →

Important

Review skipped

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

Run configuration

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: a5041e7
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 91a70cf7-1d1b-4959-96e5-2e8c06ebce8f
Commits

Reviewing files that changed from the base of the PR and between 1bbd70a and fa79fa5.

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

mergeLearnedRoutes now detects changes to a route’s bearer profile network value. Tests cover setting and clearing the Tailscale network flag on learned IPv6 and MagicDNS routes, including repeated reports that produce no further update.

Changes: Learned route network updates

Layer / File(s) Summary
Compare and test learned route network values
packages/client-runtime/src/connection/routes.ts, packages/client-runtime/src/connection/routes.test.ts
The route comparison signature now includes the bearer profile network value. Tests check that learned IPv6 and MagicDNS routes gain the Tailscale network flag after a tailnet report, and that an IPv6 route loses it after a lan report. Repeating an unchanged report produces no update.

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

Change: Bug fix

Suggested reviewers: juliusmarminge

Merge Risk: Minimal · previous review 1bbd7

Learned Tailscale IPv6 and MagicDNS routes now persist updates to their network flag instead of dropping them as no-ops. The change is small and covered by targeted tests, and no merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the main change: persisting the Tailscale network flag on learned IPv6 and MagicDNS routes. The raw summary, objectives, and description all match this fix in mergeLearnedRoutes' chang…
Description check Passed The description follows the repository template. It covers Problem (a clear root cause and a deterministic repro on origin/main), Change (the signature edit and why it is scoped to the shared module),…
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 main change: persisting the Tailscale network flag on learned IPv6 and MagicDNS routes. The raw summary, objectives, and description all match this fix in mergeLearnedRoutes' change-detection signature. It follows the conventional commit form. It is long (87 characters), but it stays specific and on topic.

Full details: Description check

Explanation

The description follows the repository template. It covers Problem (a clear root cause and a deterministic repro on origin/main), Change (the signature edit and why it is scoped to the shared module), Scope (a small obvious bug, no issue needed, with a reason), and Verification (a targeted failing-then-passing test, a repeat run, check:changed results, and a stated list of what was not checked). It also includes the model attribution the template requests. The template's Scope section asks for a linked issue or maintainer request for bug fixes; the author gives a reason for omitting one, which the template accepts for small obvious fixes. Minor gap: the Verification section cites an external gist, which reviewers must open to confirm the before/after transcript.

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

  • Source mode: Auto
  • Repository: pingdotgg/t3code
  • Branch: main
  • File: .coderabbit.config.ts
  • Commit: 4db4b82
  • Layers: Repository TS config
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: c92084a1-3b13-4e45-9559-e723d99f7ce2
Commits

Reviewing files that changed from the base of the PR and between 4db4b82 and 1bbd70a.

Files selected for processing: 2

  • packages/client-runtime/src/connection/routes.test.ts
  • packages/client-runtime/src/connection/routes.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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added the takeover:in-progress A takeover lead is working on this PR label Nov 28, 2026
@juliusmarminge
Merge remote-tracking branch 'origin/main' into hunter/c-ec68995d7b
fa79fa5
@juliusmarminge

juliusmarminge commented Nov 28, 2026

Copy link
Copy Markdown
Member

Evidence

Pair through HTTPS, remove the learned IPv6 route's saved network flag, reload to receive real server discovery, stop HTTPS, then reload and wait 30 seconds. Both runs used fresh state, Chromium at 1280×800, and dark theme. The direct IPv6 server remained reachable.

Before After
a5041e797e fa79fa5435
Before: environment failed to reconnect After: connected via Tailscale
network remained absent; no IPv6 WebSocket opened network persisted as tailscale; IPv6 WebSocket opened
Before recording After recording

Scenario source. scenarios:prove exited 0: failed on base and passed on head.

Not shown:

  • MagicDNS plain-HTTP learned routes were not exercised; this real server advertised its explicitly bound Tailscale IPv6 address.
  • Clearing an existing tailscale flag after a server classification change was not exercised.
  • Desktop and mobile were not run; the proof covers the web client using shared client-runtime logic.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge added takeover:needs-julius Takeover done; route gate says Julius decides and removed takeover:in-progress A takeover lead is working on this PR labels Nov 28, 2026
imetn added a commit to imetn/t4code that referenced this pull request Nov 28, 2026
@imetn
chore(upstream): port 8 high-value green open upstream fixes (pingdot…
5137d73
…gg#44707, pingdotgg#44725, pingdotgg#44799, pingdotgg#44805, pingdotgg#44815, pingdotgg#44816, pingdotgg#44817, pingdotgg#44819)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XS 0-9 changed lines (additions + deletions). takeover:needs-julius Takeover done; route gate says Julius decides vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@saphid @juliusmarminge
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.