Repository navigation
cloud: the app server link connects through the Native route - #32472
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240
connect_info answers no gateway, VPC endpoint or public address, so cmux link over the relay finds no route to any Worker machine and every app-link Cloud start ended in "cmux link refused the dial: unreachable". A vm-api machine's Native network routes through the enrolled mesh tunnel, so Native first (with cmux link as its fallback when Native does not start) is the route that connects. CMUX_NEXT_CLOUD_NATIVE_LINK=0 turns it off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240
|
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)
Default changesThis pull request changes 1 default at
Signed off on this commit by Merge receipt: merged as Regenerate the snapshot with Shipped in:
|
|
Owned by an agent session · session |
|
Review (codex gpt-6.1-sol xhigh, router-review): BLOCK at 1de33d1 BLOCK at 1de33d1 Visual verdict: no images; Leo tries the build
Follow-ups:
|
The Native route's refusals reached the log as a bare status ("refused(400)"),
so a team whose route did not start could not say why. Log the refusal's
stable code and message (server text, no credential) at each step.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240
The Native route never started: the app read host.network.target as an op on /v1/read, and TeamDO answers that "unknown read host.network.target" (400), since #30399 moved the read to the platform's own GET /v1/host/network/target. The app now GETs that route, and cmux-api forwards it to the platform with the rest of NEXT Cloud's routes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240
This comment has been minimized.
This comment has been minimized.
#32472 review follow-up (gpt-6.1-sol at bcafa32). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240
Resolves #32525's step-named refusals with this branch's refusal logging and the platform target route. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Agent-Session: https://cmux.com/deeplink/agent?id=aid-548f18c0a6d1ebb48240
|
Review (codex gpt-6.1-sol xhigh, router-review): SHIP at 8f2cd27 Visual verdict: no images; Leo tries the build Reviewed the changed Swift native-target/launcher flow and platform-forward routing; no correctness or regression issues found. Follow-ups: none Fleet: NativeNetworkTargetTests, CloudNativeFirstLauncherTests, NativeDeviceEnrollmentTests pass at this head. |
|
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. |
NEXT Cloud's app server link never connected to a machine. With this PR it takes the Native device route by default, and that route can start now.
Why
Every app-link Cloud chat start made a machine, then stopped at "cloud-chats-N didn't connect. Retry once it's online." The capture's app log (HQ run 41477973186) shows why:
Two causes:
cmux linkover the relay can't reach any machine.cloud.machine.connect_infoanswersgateway,vpc_endpointandpublic_ipv6as null, sochoose_route(mesh_cloud.rs) returnsCloudRoute::Noneand every dial is refused asunreachable. A vm-api machine'snetworkroutes through the enrolled mesh tunnel (native_route.rsfor_vm), and only the Native link has that route. Native was opt-in (CMUX_NEXT_CLOUD_NATIVE_LINK=1); it is now the default, and=0turns it off. When Native does not start,cmux linkis still the fallback.host.network.target refused 400: validation.invalid: unknown read host.network.target(HQ run 41492846764; the log line comes from the diagnostics in this PR). Since backend: UserDO/TeamDO network identity and Native dial RPCs for the platform CloudDO #30399 that read is served by the platform's ownGET /v1/host/network/target(cmux-platformNativeNetwork.ts). The app still posted it to/v1/read, where TeamDO refuses it. The app now GETs the platform route, and cmux-api's forwarder sends that path to the platform along with NEXT Cloud's other routes.Native refusals also log their stable code and message now, not a bare status, so a route that fails to start says why.
Review at 1de33d1 (BLOCK): the Native default can't dial machines whose
connect_infohas nonetwork. That's true, butcmux linkcan't dial them either whileconnect_inforeturns no route. The development Worker'sconnect_infocomes from cmux-platform's CloudDO (Connect.ts), which does returnnetworkfor vm-api machines.Leo, on the env-var setup: "i dont wanna do this make it more ergonomic".
Testing
package-test-lane.sh suite Packages/macOS/CmuxNext NativeNetworkTargetTests,CloudNativeFirstLauncherTests,NativeDeviceEnrollmentTests: all 3 suites pass.NativeNetworkTargetTestsnow asserts the GET path, with and without a mesh. The test world refuses the old/v1/read, so the old client fails it.bunx vitest run test/platform-forward.test.ts: 10/10 pass, including the new forwarded route.Observed / Not run
builtin:cloud-start-chatcapture at the merge follows in a comment.Changelog
Agent session: agent session