Repository navigation
feat(setup): install native Gateway automatically through WinGet - #1547
Conversation
…isting The native Gateway setup opened https://apps.microsoft.com/..., which lands in the browser first. Launch ms-windows-store://pdp/?ProductId=9NV70LV3D6XC so the Store app opens directly, falling back to the web listing only when the Store protocol has no handler. Co-authored-by: Copilot App <[email protected]>
|
🦞👀 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. |
|
Codex review: needs real behavior proof before merge. Reviewed September 29, 2026, 5:58 PM ET / 21:58 UTC (Revision 6). ClawSweeper reviewWhat this changesNative Gateway setup now invokes WinGet to install a missing Microsoft Store package after review consent, then verifies registration before continuing onboarding. Merge readiness⛔ Blocked before merge - 6 items remain This PR remains useful: current main opens a Store listing, while the branch attempts automatic installation. Before merge, the native setup path needs an in-product recovery route when WinGet is unavailable and proof that a missing package installs and setup continues. Priority: P0 Review scores
Verification
How this fits togetherCompanion's native Gateway onboarding checks the signed-in user's Windows package registration. If the Gateway is missing, package acquisition runs before profile preparation and the shared Gateway setup wizard. flowchart LR
A[Native setup review] --> B[Package check]
B --> C{Gateway installed?}
C -->|Yes| F[Verify registration and aliases]
C -->|No| D[WinGet installation]
D --> F
F --> G[Prepare profile]
G --> H[Gateway setup wizard]
Decision needed
Why: The branch deliberately removes the prior handoff, but the discussion does not establish that blocking those existing setups is an accepted upgrade tradeoff. Before merge
Findings
Agent review detailsSecurityNone. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep automatic installation after consent, add a visible Store or App Installer recovery action for WinGet failures, and demonstrate a clean-host install through verified registration and wizard continuation. Do we have a high-confidence way to reproduce the issue? Not applicable to the feature request. Source inspection establishes the conditional WinGet failure path, but no live missing-WinGet or clean-install run was supplied. Is this the best way to solve the issue? Unclear. Automatic installation fits the expressed direction, but removing the prior in-product handoff leaves a recoverability gap when WinGet cannot run. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 244f684ef291. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (5 earlier review cycles)
|
|
are we intentionally choosing not to automatically install the gateway package? I assume we'd have a route to do that if we so desired... |
Describe fallback on a false launch result rather than only a missing protocol handler. Runtime behavior is unchanged. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 8e02684c-6deb-4702-9f2a-f25f5c6bfc7b
Replace the manual Store handoff with fixed-product noninteractive installation after review consent. Preserve package readiness checks, explicit errors, bounded cancellation, and awaited installer cleanup. Co-authored-by: Copilot App <[email protected]> Copilot-Session: 8e02684c-6deb-4702-9f2a-f25f5c6bfc7b
|
Manually verified the installation flow with the updated |
Summary
Native Gateway setup now installs a missing Gateway package through WinGet rather than opening a Microsoft Store page and waiting for the user to click Install. This supersedes the earlier direct-Store-page implementation in this same PR, following the requested product change.
The native review explicitly explains that selecting Set up gateway authorizes installation and accepts the package and Store source agreements. Provider sign-in remains interactive.
Implementation
NativeGatewayMsixInstaller.InstallAsyncuses the signed-in user's%LOCALAPPDATA%\Microsoft\WindowsApps\winget.exealias through the existingCommandRunner, without a shell or elevation:NativeGatewayPackageAcquisitionstill owns missing-package detection, one installation attempt and verified current-user registration/qualified aliases. Healthy existing Store or development packages skip installation; unhealthy or duplicate registrations remain explicit errors. WinGet success is not readiness.Required proof pools
windows-winui-interactive: native review consent and installation progress changed; current-code live consent UI inspected below.windows-clean-installer-upgrade: real missing-package acquisition through the Store is not yet verified on a clean host.windows-11-arm64: local native ARM64 build, isolated app launch and UI inspection passed; Store installation remains unverified.windows-wsl-gateway-e2e: required gateway setup/connect regression proof passed locally.windows-wsl-mxc: strict real Gateway to Windows node containment regression proof passed locally.Validation
Validated source committed as
a466f6d1on Windows ARM64.OPENCLAW_REPO_ROOTpointed at this worktree; tray tests used isolatedOPENCLAW_TRAY_DATA_DIR..\build.ps1dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restoreNativeGatewaySetupUxContractTests.\scripts\validate-mxc-e2e.ps1 -NoBuildAn earlier Shared run failed
Dispose_DuringInFlightHandler_DoesNotSurfaceObjectDisposedException; its focused rerun passed and the full build/Shared/Tray/SetupEngine validation was rerun successfully. No unrelated production code was changed.Rubber-duck review (
gpt-6-astra) identified cancellation wrappers potentially abandoning installer cleanup. Both wrappers were removed, deterministic gated-cleanup tests were added, and the focused reviewer recheck reported no actionable findings.python .\.agents\skills\autoreview\scripts\autoreview --mode commit --commit HEADrefused the final bundle as secret-like content before invoking its engine. No clean result from that helper is claimed.Real behavior proof
Current-code native review UI
Launched the current ARM64 build with
.\run-app-local.ps1 -NoBuild -Isolated -AllowNonMain -Wait, confirmed the process was responsive and belonged to this worktree, then used Windows UI Automation to navigate Security notice > Native Gateway > Capabilities > Permissions > Review. Stopped before invoking installation and closed the isolated proof app afterward.Copied live UI diagnostics from the changed review state:
This proves the current consent UI, not completed installation or installation-progress behavior. Old screenshots of the manual Store-page handoff were removed because that behavior is no longer the implementation.
WinGet discovery
The exact current-user WinGet alias reports
v1.30.150-preview; its help lists all requested installation flags. A non-installing query succeeded:Not verified / blocked
OpenClaw.Gatewayversion0.0.0.1; installing the Store package alongside it would create duplicate registrations. Existing installation was left untouched.