Skip to content

fix: bound Relay desktop setup handshakes - #10260

Merged
Jinwoo-H merged 1 commit into
mainfrom
OrcaWin/relay-desktop-setup-deadlines
Jul 24, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
OrcaWin/relay-desktop-setup-deadlines

Conversation

@Jinwoo-H

Copy link
Copy Markdown
Contributor

Summary

  • abort Relay token-exchange and assignment requests after 15 seconds so transient blackholes enter the bounded recovery loop from fix: recover Relay broker startup after transient failures #10147
  • expire control upgrade/host-proof setup after 15 seconds
  • settle an in-progress control connect immediately when coordinator ownership closes

Why

Field reports show Relay can work, later fall back to a LAN-only QR, and recover only after fully quitting Orca for a short period. Production auth, director, cells, TLS, assignment success, and existing controls remained healthy. That pattern is consistent with a process-local pending request/control promise blocking recovery until process exit destroys it.

The change affects setup attempts only. It does not close established controls or splices, mutate pairing/assignment/credential state, or change LAN/Tailscale behavior.

Follow-up to #10147, which is already merged.

Validation

  • Node 24.18: 58/58 desktop Relay tests
  • Node 24.18: pnpm typecheck
  • focused oxlint and oxfmt checks
  • max-lines ratchet
  • git diff --check

@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 1a88cbfd-9fd6-41b6-9ee5-1526dece6e77

📥 Commits

Reviewing files that changed from the base of the PR and between 14c99f5 and aebffe6.

📒 Files selected for processing (4)
  • src/main/runtime/relay/relay-control-client.test.ts
  • src/main/runtime/relay/relay-control-client.ts
  • src/main/runtime/relay/relay-http-client.test.ts
  • src/main/runtime/relay/relay-http-client.ts

📝 Walkthrough

Walkthrough

Relay control connections now support configurable deadlines, reject stalled handshakes with relay_control_connect_timeout, and reject pending connections closed during establishment with relay_control_closed. Relay HTTP assignment and authorization requests now use configurable abort deadlines with a 15-second default. Tests cover WebSocket timeout and closure behavior, abort-signal wiring, and timeout recovery for blackholed HTTP requests.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning Summary, Why, and Validation are present, but the required Screenshots, Testing, AI Review Report, Security Audit, and Notes sections are missing. Add the missing template sections, especially the testing checklist, AI review report with cross-platform coverage, security audit, screenshots or 'No visual change', and notes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: bounding Relay desktop setup handshakes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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