Skip to content

Link: require an explicit relay instead of a local-backend default - #269

Merged
0thernet merged 1 commit into
mainfrom
claude/link-default-relay-20260928
Sep 28, 2026
Merged

0thernet merged 1 commit into
mainfrom
claude/link-default-relay-20260928

Conversation

@0thernet

@0thernet 0thernet commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Why

On the second launch-acceptance host, a plain xcb link stalled after the email prompt and then failed with relay request timed out. Without --relay or XCB_RELAY_URL, a first link used DEFAULT_DEPLOYMENT_URL = http://127.0.0.1:3210, the local development backend, not the owner's relay. Against the production relay, the same sign-in request round-trips in about 1s from the controller Mac (measured with a non-enrolled address, which the relay rejects silently without a counted attempt).

Changes

  • deployment_url has no fallback: flag → XCB_RELAY_URL → saved link, otherwise No relay configured; pass xcb link --relay … or set XCB_RELAY_URL, returned before any network call.
  • xcb link and xcb link --reauth print Requesting a sign-in code from <relay>.
  • RelayClient timeouts name the deployment: relay request timed out: <url> did not answer within 30s.
  • Docs (remote-operations.md, --relay help) and a CHANGELOG Unreleased entry.
  • Regression test a_first_link_without_a_relay_refuses_instead_of_guessing_a_local_backend.

Gates

cargo fmt --check, cargo clippy --workspace --all-targets --locked -D warnings, and cargo test --workspace --locked pass locally (33 test binaries).

🤖 Generated with Claude Code

A first `xcb link` with no --relay and no XCB_RELAY_URL silently targeted
http://127.0.0.1:3210, the local development backend. On a fresh machine
the owner's email went to whatever answered there, and the request stalled
until the 30-second client timeout reported only "relay request timed out".

- No relay configured now stops before any network call with a message
  naming --relay and XCB_RELAY_URL.
- `xcb link` and `xcb link --reauth` print the relay they ask for a code.
- Relay timeouts name the deployment that did not answer.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
xcb Ready Ready Preview Sep 28, 2026 6:20pm UTC

Request Review

// replace/delete the auth session the worker is still using during OTP.
let mut client = RelayClient::connect(intent.endpoint()).await?;
if options.code.is_none() {
eprintln!("Requesting a sign-in code from {}.", intent.endpoint());
@0thernet
0thernet merged commit 0516fca into main Sep 28, 2026
25 of 28 checks passed
@0thernet
0thernet deleted the claude/link-default-relay-20260928 branch September 28, 2026 18:27
@0thernet 0thernet mentioned this pull request Sep 28, 2026

This branch was successfully deployed

1 active deployment
Preview — 44c04958 Deployed Sep 28, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants