Repository navigation
fix(web): interrupted SSH pairing retries reuse unfinished setup - #19666
Conversation
On a slow host an SSH connection attempt can time out while the desktop is still setting up the environment. The desktop runs one setup per target at a time and cannot cancel it, so each retry queued another setup behind the lock, and each one minted a pairing credential. The next attempt now awaits the abandoned setup and spends its credential instead. Fixes pingdotgg#18229 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is a contained SSH retry bug fix that coalesces abandoned setup operations in the web connection layer, with targeted coverage for timeout, disconnect, and completion cases. It does not alter contracts, defaults, deployment behavior, or static-analysis settings. You can add or adjust custom eligibility rules. Learn more. |
|
Warning Review limit reachedOnly developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing. Next included review available in 10 minutes. View limit details
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to
|
…sh-retry-adopts-setup # Conflicts: # apps/web/src/connection/platform.test.ts # apps/web/src/connection/platform.ts
|
Taking over this one as maintainer for batch ssh-relay-remote-08. I’ll keep the focused SSH retry fix on this PR, rebuild and verify it against current main, and preserve your commits and credit. |
|
Takeover update: the rebuilt head is c7ec0d2572. One full-diff review round with Claude Opus 5.5 and Codex GPT-6-Sol found no blockers. The description now limits the claim to interrupted credential-issuing setup; saved-bearer setup and the broader startup work are outside this change. The focused SSH suite passes all 21 tests. Current-head build/typecheck, lint, package tests and all server shards passed. The first CI attempt failed in existing |
…gdotgg#19666) Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Julius Marminge <julius0216@outlook.com> (cherry picked from commit eca0e05)
Interrupted SSH pairing attempts keep running in desktop IPC. On a slow host, retrying used to queue another setup and leave the first pairing credential unused. A retry now waits for the interrupted attempt’s unfinished setup and exchanges its credential once. Settlement and explicit disconnect remove the retained work.
Rebuilt from the original contribution by @im-kvijay in #19666, preserving the author’s commits and merging main. The takeover replaces permanent disconnect counters with state that exists only while setup is unfinished, and removes exported internal helpers. Saved-token reconnection continues to request no pairing credential; broader startup optimizations are outside this change.
Verification on head c7ec0d2572:
platform.test.ts: original PR 22 tests → 21 tests, with the added coverage reduced from four cases to three behavioral tests. They cover repeated interruption and credential exchange, settlement in success/failure, and disconnect invalidation through the platform gateway.Not verified: an actual slow SSH host, the Electron desktop process or packaged AppImage, macOS, Windows, iOS or Android. The browser probe controls IPC and is not a claim of end-to-end SSH verification. One independent full-diff review round (Claude and Sol) found no blockers. A narrow remaining case is interleaving onboarding and removal for the same host with unresolved versus resolved targets: a retry may adopt setup that the removal then tears down, requiring one further retry. Current-head CI passed after one rerun of the two unrelated browser failures. The earlier cancelled fingerprint run was superseded by a successful run.
Implementation: Codex gpt-6.1-sol (high), tests: Codex gpt-6-astra (high); harness: T3 Code with Codex. Independent review: Claude claude-opus-5-5 and Codex gpt-6-sol through T3 delegation.