Repository navigation
Cloud legacy link: bound and log every start step, show the failing step with Retry - #33567
Conversation
…failed connect says the step and why The NEXT nightly's legacy Cloud link start went silent: no hub, no remote connect, no log line, and the Cloud chat start gave up after 3 minutes with "didn't connect". Each step of a legacy link start (attach-endpoint, the WireGuard hub, approve, remote connect) now runs under its own deadline with a notice-level began/done/failed line, and a failure keeps its step. A Cloud start's wait ends at once on a refusal and its toast says the step and reason with Retry; within the wait a legacy link's backoff is woken every 30 s; a manual connect retries a live legacy machine that has no connection. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…the step deadlines Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
…tarts Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
|
Owned by an agent session · session |
|
cmux status (one comment, edited in place; each line is updated by the job that owns it) Review App of this head (app.zip, kept 1 day)
Shipped in:
The feat-cmux-next push run https://github.com/manaflow-ai/cmux/actions/runs/41619934635 at 092736d failed: cmux-next fleet Release compile. |
…lure Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-3bab30503f0b9a7059e5
|
Review (codex, router-review): SHIP at df24848 Reviewer: codex gpt-6-astra high, fast tier. Follow-ups: 2. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at df24848
Follow-ups:
|
|
Review (codex, router-review): SHIP at 6d44327 Reviewer: codex gpt-6-astra high, fast tier. Follow-ups: 1. Each lands as an issue in this repo that links this receipt; the lane that opened the PR fixes it forward. SHIP at 6d44327 Reviewed deadline cancellation, retry state, failure propagation, and localization placeholders. No blocking findings; Swift tests could not run in this box.
Follow-ups:
|
…(arch app_lines +74 from #33567) (#33730) #33567 (e8fc118) added 74 CmuxNextApp lines, 13 of them in CloudMoveStrings (the failed link step's text) and the rest in the Cloud move, start and session code that shows it. The text belongs with the Cloud UI strings: CloudMoveStrings moves whole to CmuxNextCloudUI (a public struct, as CloudPortStrings), and its 29 keys move from the App's Cloud.xcstrings to CmuxNextCloudUI's Cloud.xcstrings, every locale unchanged. The seven App files and three App tests that use it import CmuxNextCloudUI. CmuxNextApp -104.
|
Swift logic follow-up (tip watcher swift-logic row, STATUS 13027 "SWIFT LOGIC CULPRITS"; lead order). This PR raised
plans/cmux-next/layer-ownership.md says Rust owns every state, list and rule and Swift is the platform shell. Please move the new logic of this PR in a follow-up: to Rust (the crate that owns the area; the owner lists in STATUS 12147-12165 name the target per area), or at least out of the app into its package. If a declaration above is platform code (AppKit, Core Animation, OS calls, strings, tokens, DEBUG tooling), reply here and the table gets a PLATFORM row with your reason instead. The swift-logic row is a report, not a gate: nothing blocks on this comment. |
Cloud start on the legacy link (what production builds use) could wait 3 minutes and then fail with "didn't connect" and no reason. In the report: "Nightly has no wg hub or cmux-tui remote connect process for any Cloud machine, and it logs no link error ... It took 182.8 s, which matches the 6×30 s connect wait."
Root cause. Every legacy link joins one shared tunnel-hub start (
POST /api/vm/tunnelenroll, then spawn the hub). That start had no overall bound. The enroll's token read sits outside the API client's own deadline, andwithDeadlinewaits for cancelled children. So if one start stalled, every link waiting on it stalled too, with nothing spawned and nothing logged. That matches the report: no hub and no remote connect for any machine, and no error.Fix
CloudLinkStart.swiftusesSandboxDeadline.race, which answers at the bound even when the work ignores cancellation. Logs (cloud.link, notice level) cover start, step began/done, pid spawned, link up, superseded, and failed at after N s: .legacyLinkFailure). A definitive one (signed out, plan required, 4xx, missing binary, hub error) ends the 180 s wait at once. A timeout or transport error triggers one redial (retryNow), and the wait goes on.attach()redials a live legacy machine that has no connection.The app-server link path and classic Cloud are untouched.
Risk. The main risk is in the legacy Cloud start: the deadlines could cut off a slow but healthy start. The bounds sit well above measured times (attach-endpoint about 0.6 s, enroll about 1.7 s, link up about 1 s on a production account).
Tests.
CloudLinkStartTestscover: the deadline firing on work that ignores cancellation; the step and reason surviving; the definitive classification; pass-through; and progress state. Compile check is green for the app and cmux-tui at the head.Read-back. A production-auth build on a fleet Mac signed in and brought up about 20 legacy links, each logged per step ("link up in 1.1 s"). One machine failed and the log names it: "failed at remote-connect after 20.3 s: remote connection did not become ready". A Cloud start created its machine and copied the folder over the legacy link.
Related: SSH host-key failure filed as #33204.
Agent session: agent session
🤖 Generated with Claude Code
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.Summary by cubic
Fixes the legacy Cloud link start stalling silently: one stalled shared tunnel-hub start blocked every link for minutes, then failed with "didn't connect" and no reason.
attach()redials a live legacy machine that has no connection.Written for commit 6d44327. Summary will update on new commits.