Repository navigation
feat(macos): enroll Mac nodes through OpenClaw ID invitations, with native hosting onboarding - #196759
Merged
Conversation
Contributor
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
Contributor
|
Codex review: stale review; fresh review needed. Summary Next step Review history (1 earlier review cycle)
|
jalehman
force-pushed
the
openclaw-e3b/macos-live-ocid
branch
from
November 10, 2026 21:19
f537d34 to
1ac9f29
Compare
jalehman
changed the base branch from
feat/macos-onboarding-openclaw-id
to
fix/ocid-apple-rebind-trust
November 10, 2026 21:20
This was referenced Nov 12, 2026
Canvas loads Gateway-hosted documents in WebKit, which cannot reach the Gateway through the OpenClaw ID tunnel, so canvas.present/navigate reported success for a document that never loaded. Native enrollment and native connections now omit the canvas capability and commands; direct routes are unchanged.
…native hosting choices First-run setup no longer hands fresh installs to Dashboard onboarding, so its only caller is gone and the macOS Periphery app scan reports it.
…c app consumes the API The macOS scan reports them as superfluous; the shared intersection needs both apps to report a declaration, and the Mac now uses it.
…declarations The shared intersection still reports declarations used only by the opt-in native iroh build, which the scans do not compile, and the trust verification namespace. The Gateway role error is module-internal.
Contributor
Author
|
Merged via squash.
|
This was referenced Nov 16, 2026
This was referenced Nov 18, 2026
This was referenced Nov 20, 2026
This was referenced Nov 27, 2026
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.
Includes #196555 and #196748
This PR deliberately carries two formerly separate drafts, with their exact patches (stable patch IDs match their final heads). They are reviewed and tested here as one unit, and the separate PRs are closed in favor of this one:
main.The final commit is this PR's own invitation → native OpenClaw ID wiring.
What Problem This Solves
A Mac can't join a Gateway as a node through an OpenClaw ID invitation, and first-run setup doesn't ask where the assistant should run.
User Impact
Native-enabled Mac builds can redeem a private node invitation, show the verification code for owner approval, and connect this Mac as a node over OpenClaw ID. A node grant does not grant browser, operator or chat access. Builds without the native binding refuse the flow with a visible message. Account-picker sign-in remains unavailable; owner-created invitations are the entry point.
Over an OpenClaw ID route the node does not offer Canvas,
desktop.streamornode-worker-portal-stream-v1: those need Gateway HTTP or streaming paths the tunnel doesn't carry yet. Direct Gateway connections are unchanged.First-run setup now asks where the assistant should run (from #196555), and unchanged Peekaboo refreshes no longer drop the node connection (from #196748).
Pre-release state: the node enrollment schema is unshipped and stays at version 1, edited in place. Older development stores must be recreated and the node re-enrolled; nothing is migrated or reset automatically.
Why This Change Was Made
The app reuses the existing enrollment, identity, SQLite trust, Swift/Rust iroh transport, private worker bridge and Mac node lifecycle owners rather than adding a second connection controller. Only the selected node target (hostname and enrollment ID) is persisted in profile metadata; W stays in its Keychain owner. Reconnects re-verify signed authority through the shared enrollment refresh; late completion after cancellation or stop is rejected; node-only completion is independent of any browser profile.
Builds on #194201 (foundation, landed
5fdbae53e443) and #196445 (re-bind following, landed5dd83baa10f3).Evidence
Head
39866e48060a, rebased directly ontomainafter #194201 (5fdbae53e443) and #196445 (5dd83baa10f3) landed. The six earlier commits are patch-identical to the previous head1ac9f290c27dby zero-context range-diff. Five commits are new in this pass:canvas.present/canvas.navigate. Gateway-hosted Canvas documents load in WebKit, which has no tunnel route (and the tunnel-proxied surface URL points atlocalhost), so the command reported success while the document never loaded. Native enrollment and native connections now omit the Canvas capability and commands; direct routes are unchanged. Regression: OpenClaw ID routes omit hosted canvas. Nothing else in the review was a verified P0–P2: credential separation, selection metadata, late-completion rejection, unpackaged refusal, stream suppression, and the folded onboarding and Peekaboo changes were clean.AppNavigationActions.openDashboardOnboardingAndWait(), whose only caller the folded onboarding removed. It is deleted (no other references).periphery:ignorecommands to its then-unconsumed node API. Now that the Mac consumes it, the macOS scan reported most of them as superfluous, so those are removed. Seven remain, for declarations used only by the opt-in native iroh build (OPENCLAW_IROH_NATIVE), which the Periphery scans don't compile, and for the trust verification namespace.WebSocketGatewayRoleErrorwas public without any cross-module use, so it's now internal.MacBook Pro, isolated (macOS 26.5.1, Xcode 26.6, Swift 6.3.3; note: the earlier Studio runs were macOS 27.2 / Swift 6.4.2). Fresh checkout of the exact source under a private HOME/TMP/state,
swift build --build-tests, tests undersandbox-execwith network, the real home directory, Keychain/preferences IPC,launchctlandopendenied. The installed app, Gateway, Keychain and profiles were not touched; no signing.OpenClawIDNodesuites: 39/39 passed./var/folderstemp directory (certificate renewal, bundled CUA locator), launchd/process-exec and Keychain-backed device identity (Gateway process manager, one connection-status test), and two suites that hang under the sandbox (one AI-setup scenario, one worker-cancellation case). The fullmacos-swiftCI job covers these once this PR is out of draft.CI: ordinary PR CI defers
macos-swift, so it was dispatched explicitly (run 43215038123) on08cb4a1c967e, which differs from this head only by the dead-code deletion, Periphery comments and the role error becoming internal.mlx,packagesandreleasepassed.testsran 982 passing tests with no failures, then was cancelled at its 75-minute limit whileDashboardExperienceTestsfirst run owns its dashboard handoff across controller replacement hung. That hang is inherited: the same test hangs identically in scheduled main CI (run 43218615783, main74b3a041aad4, cancelled at its 30-minute limit). The test andDashboardManagerare untouched by this PR. Broad PR CI and Periphery are linked in this head's checks.What the cancelled
macos-swift (tests)run did not execute: the run was parallel (width 3), so the hang cut it off across the whole bundle rather than after one suite. Of 321 suites, 98 completed, 216 started without finishing, and 7 never started (ApplicationRelocatorTests,AppStateIsolationTests,LocalSocketServerProgressTests,NativeExecPolicyOwnerTests,ProfileChatPreferencesTests,QuickChatCatalogPresentationTests,SimpleTaskSupportSchedulingTests). Most of this PR's areas are among the unfinished suites:MacNodeModeCoordinatorTests,MacNodeOpenClawIDBridge(WebSocket)Tests,MacNodeOpenClawIDTransportTests,OnboardingViewSmokeTests,OnboardingPageTests,OnboardingDashboardHandoffTests,PeekabooBridgeHostCoordinatorTestsandCanvasWindowSmokeTests. Those areas are covered instead by the isolated MacBook Pro run above (130 tests in 14 suites at4c31d47d0503, filtered to the OpenClaw ID bridge, selection, transport, coordinator, onboarding, Peekaboo and Canvas tests). Later commits did not touch those areas: they are the dead-function deletion, Periphery comments and the role-error visibility change. The inherited hang isDashboardExperienceTestsfirst run owns its dashboard handoff across controller replacement (existingDashboard=false, cancelled=false): it hangs on main at74b3a041(run 43218615783); main was last green at0518869e(run 43209070232). This PR's run is 43215038123.Observed flake: at intermediate head
26ab23743fbe,ios-screenshotsfailed once (run 43216665609).testReleaseChatScreenshottimed out after 8 seconds waiting for the "Mermaid diagram" button after a gutter tap (apps/ios/UITests/OpenClawSnapshotUITests.swift:151); the other three release screenshot tests passed. This PR changes noapps/ioscode. The job passed on the earlier head and on the landed head39866e48060awithout any rerun. No prior occurrence was found: main's last 30 CI runs skipios-screenshots, and the 6 PR runs that executed it among the last 80 PR CI runs all passed.Live evidence
Signed Personal Team build 2611000399 ran on a Mac Studio on 2026-11-11 against a real Gateway over OpenClaw ID. It contained this PR's earlier head
1ac9f290c27dwith #196445 and #194201 below it, plus fixes from #197421 (now in #197585) and the macOS packaging fix #197383 (landedf817a8b). Observed:Limits: the build predates the Canvas fix and includes changes outside this PR, so it supports this flow on a real device without qualifying this exact head. Not covered: re-bind on a real device, sleep/wake, network change, in-place app update, TCC prompts, Intel Macs.
Known gaps
macos-swiftCI.Daily-driver acceptance checklist
Unchecked items are unproved, not additional confirmed defects. Existing local/test evidence is qualified below; it cannot substitute for the requested production-path checks.
system.whichestablishes none of these. Frame-token lifecycle and process-wide observation cleanup/test isolation still need coverage.Deliberate feature limits: the native route suppresses
desktop.streamandnode-worker-portal-stream-v1. Account-picker sign-in remains unavailable; owner-created private invitations are the supported entry point. Builds without the native binding disable enrollment. Do not describe these as supported daily-driver feature parity or silently enable them to satisfy the checklist.Earlier evidence (recorded heads only)
Current re-pin qualification
At
1ac9f290c27d626b7b3d5c1c2e0a976c06cf7b97:realpathprobe reproduced EPERM; permitting metadata on that task-owned container alone cleared it. Operator-home, preferences, Keychain, desktop and non-Unix-network restrictions remain in place.OPENCLAW_IROH_NATIVE=1 BUILD_CONFIG=release BUILD_ARCHS=arm64 BUNDLE_ID=ai.openclaw.mac APP_BUILD=2611000391, private HOME/XDG/TMP/state, explicit ad-hoc signing. The complete productscripts/package-mac-app.shentry point exits 0, including its private Bun/native-module/runtime checks. The source-matched FFI artifact was reused because the complete crate tree is unchanged from the qualified parent.openclaw-macand the complete MLX helper. App and embedded runtime agree on exact source1ac9f290c27d626b7b3d5c1c2e0a976c06cf7b97, version2026.11.2, build2611000391, runtime build ID2026.11.2-1ac9f290c27d-2026-11-10T21-19-04.000Z.dittoarchive passes releases#50's unchanged data-only archive-confinement and app/runtime metadata checks. Ad-hoc input zip SHA-256:e4c025aaad67eba5133fbf4de5644fd4a4199c54cfb78093910a74abd353c0d2. This is local packaging qualification, not Foundation signing, notarization or installed-app acceptance.f7d7aec209dafc959c6f40c1565503e1f5e6f720. No app launch, installation, personal Keychain, staging, workflow dispatch or merge occurred. Signing workflow draft selects this exact integration head for the separate human approval decision.Actual local native sequence
Using task-owned local Discovery, Gateway, iroh relay, native Swift/UniFFI transport, Unix bridge, and the production node worker:
node.invoke system.whichsucceeded.system.whichinvocation succeeded after reconnect.Limits: identity retention used a private mode-0600 test seed file, not production Keychain/preferences. Discovery/relay/JWKS were local fixtures, not staging or a qualified account-login flow. A private fixture drove production coordinator/enrollment/transport/worker code; this was not an end-to-end GUI account-login test. No production pairing or command policy was bypassed. These results do not establish all negative operator/chat cases.
Focused regression and build evidence
Repaired integration proof
NodeWorkerBundleInstaller.ensure()fetched a fresh 1,136,739-byte valid synthetic worker archive throughMacNodeOpenClawIDBridge. The cold run observed HTTP 200. In a separate empty installation root, the fixture destroyed the real HTTP response only after a nonzero prefix had been written; the same production installer resumed with HTTP 206. Both runs passed production archive integrity, extraction and receipt validation; an independently recomputed installed-file manifest matched the expected bundle hash. The test passed in 2.721s. Installer, downloader and bridge were real; only the tunnel upstream and deliberate interruption were fixtures. This does not claim QUIC, staging, bundled-runtime invocation or production Keychain acceptance.380935b/fa8e9beSDK blobs failed Swift style checks (6 of 7 repaired Swift files needed formatting; strict lint reported 278 findings). Those blobs are superseded by the producer-owned formatting/decoder corrections in the final pins above. This restack does not introduce a separate formatting rewrite or claim an independently clean whole-stack lint result.Native UI evidence
These inspected, sanitized images are render fixtures, not live enrollment or account-login proof. The invitation's private value is deliberately absent.
Invitation entry and node-only completion fixtures
Changes walkthrough
Author scope/simplification: the smallest independently landable provider fix is split into #196748; UI and native SDK/bridge dependencies remain separately owned in #196555, #194201, and #196445. This assembled draft reuses those owners and the existing coordinator rather than adding a parallel connection manager. The repaired native store separates host trust from enrollment-specific restart inputs without adding a selection owner, cache, migration or fallback. The app remains the selection owner. Against the new #196445 base, the 38-file composition carries the onboarding prerequisites and app integration; the separately reviewed SDK and packaging repairs remain in the dependency stack.
MacNodeModeCoordinator.swift,MacNodeOpenClawIDTransport.swift,MacNodeOpenClawIDSelectionStore.swiftOnboardingNodeInvitationService.swift,OnboardingOpenClawID*.swiftOnboarding.swift,OnboardingView+Actions/Layout/Pages.swiftComputerControlProvider.swift,ComputerControlSettingsTests.swiftMacNodeOpenClawIDBridge*.swiftGatewayChannel.swift,GatewayNodeSession.swift,GatewayWebSocketTransport.swiftOpenClawIDNodeEnrollment*.swift,OpenClawIDNodeIdentity.swift,OpenClawIDCanonicalJSON.swiftOpenClawIDNodeNativeTransport/NativeTrustStore/Transport/Trust.swiftOpenClawIDNodeHTTPStream/Tunnel/TunnelCodec/WebSocketSession.swiftOpenClawIDNodeStateSchema.swift,personal-data.mdOpenClawKit/Package.swift,openclaw-iroh-ffi/Package.swift,apple-node-native.ymlOpenClawIPCTests,OpenClawKitTests, Swift FFI tests and enrollment fixtureapps/.i18n/native-source.json