Repository navigation
Run cmux iOS over authenticated Iroh transport - #7908
Merged
Merged
Conversation
added 3 commits
July 14, 2026 12:39
…omerge # Conflicts: # .github/swift-file-length-budget.tsv # cmux.xcodeproj/project.pbxproj # ios/Config/Shared.xcconfig # web/app/[locale]/(legal)/privacy-policy/page.tsx # web/app/env.ts # web/db/schema.ts # web/tests/client-config-env.test.ts
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
…omerge # Conflicts: # Packages/macOS/CmuxSidebarGit/Sources/CmuxSidebarGit/Model/WorkspaceGitSnapshotTaskContext.swift # Sources/BackgroundWorkspacePrimeCoordinator.swift # Sources/CmuxTopProcessEnumeration.swift # Sources/CmuxTopProcessSnapshotCache.swift # Sources/Mobile/MobileHostService.swift # Sources/Mobile/MobileTerminalByteTee.swift # cmux.xcodeproj/project.pbxproj # cmuxTests/MobileHostAuthorizationTests.swift
Bugbot is paused — on-demand spend limit reachedBugbot uses usage-based billing for this team and has hit its on-demand spend limit. A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue. |
austinywang
pushed a commit
that referenced
this pull request
Jul 15, 2026
Main's authenticated-Iroh transport work (#7908) made routeAllowsStackAuth fail-closed (loopback only), which broke the Mac-to-Mac viewer: it dials registry-advertised Tailscale routes and authorizes with the Stack token, so every request threw insecureManualRoute ('Couldn't Connect'). Add an explicit StackAuthChannelTrust set on the policy and thread it through MobileCoreRPCClient. iOS keeps the fail-closed default; only HiveRemoteMacSession opts into loopbackAndTailscaleTunnel — the tunnel is WireGuard-encrypted and the routes come from the signed-in account's own device registry, and a non-tailnet host smuggled under the tailscale route kind still never receives the token (policy test). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This was referenced Aug 25, 2026
austinywang
added a commit
that referenced
this pull request
Sep 1, 2026
Main's authenticated-Iroh transport work (#7908) made routeAllowsStackAuth fail-closed (loopback only), which broke the Mac-to-Mac viewer: it dials registry-advertised Tailscale routes and authorizes with the Stack token, so every request threw insecureManualRoute ('Couldn't Connect'). Add an explicit StackAuthChannelTrust set on the policy and thread it through MobileCoreRPCClient. iOS keeps the fail-closed default; only HiveRemoteMacSession opts into loopbackAndTailscaleTunnel — the tunnel is WireGuard-encrypted and the routes come from the signed-in account's own device registry, and a non-tailnet host smuggled under the tailscale route kind still never receives the token (policy test). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
teamleaderleo
added a commit
that referenced
this pull request
Sep 25, 2026
Pairing sends `workspace.list` and then an authenticated `mobile.host.status` that binds the route to the Mac process before anything is persisted (#7908, #8299). Twenty cmuxFeatureTests still scripted only the workspace list. Their scripted transports spent the list frame on the status request, or their routers answered it with "Unexpected method", so every pairing ended in `connectionClosed` and the assertions ran against the preview workspaces. `remoteCreateTerminalDoesNotStealSelectionAfterWorkspaceSwitch` never reached `terminal.create`, so its `waitForTerminalCreateRequest()` parked forever and the full simulator suite hung until the job was killed (exit 143, run 36114121829). These tests were hidden while the iOS test target did not compile (fixed in #14421). The passing neighbours, such as `uuidAttachTicketListsAllWorkspacesFirstWithAttachToken`, already script the status frame; this brings the rest in line. The version warning test now checks that the warning sends nothing new instead of pinning the total request count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo
added a commit
that referenced
this pull request
Sep 25, 2026
Pairing sends `workspace.list` and then an authenticated `mobile.host.status` that binds the route to the Mac process before anything is persisted (#7908, #8299). Twenty cmuxFeatureTests still scripted only the workspace list. Their scripted transports spent the list frame on the status request, or their routers answered it with "Unexpected method", so every pairing ended in `connectionClosed` and the assertions ran against the preview workspaces. `remoteCreateTerminalDoesNotStealSelectionAfterWorkspaceSwitch` never reached `terminal.create`, so its `waitForTerminalCreateRequest()` parked forever and the full simulator suite hung until the job was killed (exit 143, run 36114121829). These tests were hidden while the iOS test target did not compile (fixed in #14421). The passing neighbours, such as `uuidAttachTicketListsAllWorkspacesFirstWithAttachToken`, already script the status frame; this brings the rest in line. The version warning test now checks that the warning sends nothing new instead of pinning the total request count. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
teamleaderleo
added a commit
that referenced
this pull request
Sep 25, 2026
) Pairing sends `workspace.list` and then an authenticated `mobile.host.status` that binds the route to the Mac process before anything is persisted (#7908, #8299). Twenty cmuxFeatureTests still scripted only the workspace list. Their scripted transports spent the list frame on the status request, or their routers answered it with "Unexpected method", so every pairing ended in `connectionClosed` and the assertions ran against the preview workspaces. `remoteCreateTerminalDoesNotStealSelectionAfterWorkspaceSwitch` never reached `terminal.create`, so its `waitForTerminalCreateRequest()` parked forever and the full simulator suite hung until the job was killed (exit 143, run 36114121829). These tests were hidden while the iOS test target did not compile (fixed in #14421). The passing neighbours, such as `uuidAttachTicketListsAllWorkspacesFirstWithAttachToken`, already script the status frame; this brings the rest in line. The version warning test now checks that the warning sends nothing new instead of pinning the total request count. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Verification
swift test --package-path Packages/Shared/CmuxIrohTransport --scratch-path /tmp/cmux-iroh-final-553f(249 tests, 33 suites)irh2build and isolated Simulatorcmux-irh2-codex-151853IROH_IOS_ROUNDTRIP_1551Stack
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Note
High Risk
Large new authenticated transport surface (admission, grants, broker credentials, multistream QUIC) plus auth/session-transition behavior; mistakes affect remote attach security and sign-in/sign-out races.
Overview
This PR makes authenticated Iroh the primary iOS↔Mac attach path, introduced via a new
CmuxIrohTransportpackage (QUIC control stream, acknowledged NAT admission, broker grants/offline pairing, managed relays, multistream terminal/event/artifact lanes, and Mac-side admission quotas).CMUXMobileCoregains request-aware byte transports (CmxByteTransportRequest), acloudRendezvousdisclosure boundary (relay URLs only off-device), opaque hex network profile IDs, tighter path-hint rules (no IPv4 link-local / native private hints),CmxTailscaleStatusPeerResolverfor storing numeric peers from localtailscale status,CmxCredentialedHTTPSession(no redirect credential leakage), and boundedMobileSyncFrameCodec/MobileHostRPCWorkQuotadecoding.CLI
cmux remotes adddocs now describe resolving*.ts.netagainst the authenticated local peer map and persisting the peer’s numeric address. Auth changes serialize browser sign-out (HostBrowserSignOutCoordinator), exposesignOutRevision, and treat token reads during active sign-in/sign-out as retryable instead of clearing session state. CI addsCmuxIrohTransportSwift tests and an Intel macOS 14 compat matrix row with targeted package tests.Reviewed by Cursor Bugbot for commit b310583. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by cubic
Default iOS↔Mac attach now runs over authenticated Iroh via
CmuxIrohTransport, using a versioned multistream QUIC wire with an admission/NAT barrier and bounded peer streams. The iOS runtime owns endpoint/app‑instance identity, registers with signed challenges, rotates relay creds, caches verified offline policy, and defers activation until the signed‑in runtime is ready.New Features
CmxByteTransportRequest;CmxIrohByteTransportadapts admitted control lanes and exposesCmxIndependentEventByteStream;MobileSyncFrameCodecadds a decoded‑frame count limit;MobileHostRPCWorkQuotabounds host work;CmxCredentialedHTTPSessionblocks credentialed redirects;CmxTailscaleStatusPeerResolverpersists numeric peers; relay hints require native public‑internet scope; IPv4 link‑local rejected.HostBrowserSignOutCoordinatorserializes sign‑out and exposessignOutRevision; token reads during session transitions are retryable; CI runsCmuxIrohTransporttests and adds an Intel macOS 14 row.Migration
cmux remotes addaccepts numeric Tailscale IPv4/IPv6 or*.ts.net; MagicDNS resolves via the authenticated local peer map and stores the peer’s numeric address; plain LAN IPs, other hostnames, and loopback are rejected.CmxIrohNetworkProfileKeyrequires a canonical lowercase‑hex 32‑byte digest.Written for commit b9bdb27. Summary will update on new commits.