Repository navigation
feat(setup): guide native Gateway installation and onboarding - #1447
Conversation
|
🦞👀 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 25, 2026, 8:02 PM ET / September 26, 2026, 00:02 UTC (Revision 23). ClawSweeper reviewWhat this changesAdds guided Microsoft Store Gateway installation and onboarding to Windows Companion, with a dedicated profile, native runtime supervision, localized setup screens, tests, and documentation. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readiness⛔ Blocked before merge - 14 items remain Keep open. Current main and the latest release lack guided native Gateway onboarding. The pinned package implementation uses an isolated session, but this PR supervises the package launcher as though it owns the Gateway process. Existing wizard answers can also stop setup. The merged restart fix in #1515 covers only a separate part of the branch. Priority: P1 Review scores
Verification
How this fits togetherWindows Companion's setup wizard takes the user's Gateway and capability choices, checks the installed package, and opens Gateway onboarding. Successful setup publishes a Gateway record that the connection manager later uses to start and connect. flowchart LR
A[Setup choices] --> B[Package verification]
B --> C[Dedicated profile]
C --> D[Native Gateway runtime]
D --> E[Shared Gateway wizard]
E --> F[Gateway registry]
F --> G[Connection manager]
Decision needed
Why: The package's pinned execution contract and this PR's launcher-job ownership model disagree at the credential and shutdown boundaries; choosing a supported contract and its user-facing isolation claim requires owner agreement. Before merge
Findings
Agent review detailsSecurityNeeds attention: The native credential boundary and isolation claim need review against the package's actual session owner. Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Integrate the package's supported session and profile lifecycle end to end, preserve existing headless configuration by default, and describe isolation only after final-path proof. Do we have a high-confidence way to reproduce the issue? Yes, at source level: the pinned package dispatches the Gateway into an isolated session while Companion verifies a launcher job or same-user descendant, and a conflicting explicit wizard answer reaches a setup failure. A current-head Windows run was not performed in this read-only review. Is this the best way to solve the issue? No. The guided setup goal is useful, but the native path needs the package's actual session contract and an upgrade-safe policy for existing wizard answers. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5a59535216ee. LabelsLabel changes:
Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (22 earlier review cycles; latest 8 shown)
|
|
This looks great! |
Show native, WSL, and existing gateways together. Preserve explicit WSL choices across capability checks, update localized gateway labels and accessibility text, and document the current runtime limitations. Co-authored-by: Copilot App <[email protected]> Copilot-Session: c4966eb3-4283-43c3-8945-203924da51a7
Co-authored-by: Copilot App <[email protected]> Copilot-Session: c4966eb3-4283-43c3-8945-203924da51a7
Authorize HTTP credential handoff with fresh native ownership inspection, preserve port-conflict errors, recover occupied draft ports without replacing credentials, and surface aggregate setup failures. Co-authored-by: Copilot App <[email protected]> Copilot-Session: c4966eb3-4283-43c3-8945-203924da51a7
Await stdout and stderr EOF signals without a blocking WaitForExit worker. Preserve bounded inherited-pipe handling and cover concurrent stream capture. Co-authored-by: Copilot App <[email protected]> Copilot-Session: c4966eb3-4283-43c3-8945-203924da51a7
Add opt-in VSTest hang detection without memory dumps and cap the Tray UI step at fifteen minutes. Preserve failure reporting and the existing test inventory. Co-authored-by: Copilot App <[email protected]> Copilot-Session: c4966eb3-4283-43c3-8945-203924da51a7
Retry the exact serving-owner refusal once after verifying managed ownership. Preserve normal Gateway CLI security gates and add regression coverage. Bring in main fixture teardown isolation for safe E2E proof and document deferred native-package blockers. Co-authored-by: Copilot App <[email protected]> Copilot-Session: c4966eb3-4283-43c3-8945-203924da51a7
a6190ba to
b8e10c7
Compare
Keep the Recommended badge visible and use WinUI disabled brushes for the native option. Move capability guidance into a separate support card with an enabled Windows Update action. Validation: full build; Shared 4169 passed, 1 skipped; Tray 3098 passed; docs 51 checked. Unavailable mock UI visually verified. Focused rubber-duck review found no blockers. Structured autoreview failed at the Codex engine without a usable result; enabled-state runtime proof was not collected. Co-authored-by: Copilot App <[email protected]> Copilot-Session: c4966eb3-4283-43c3-8945-203924da51a7
Keep shortened onboarding policy explicit. Accept matching answers, fail conflicts without echoing values, and test actual recovery artifacts for actionable entries and sensitive placeholders. Preserve PM-approved native Gateway copy. Validation: build passed; Shared 4169 passed/1 skipped; Tray 3098 passed; SetupEngine 1373 passed/1 skipped; strict WSL MXC 17 passed/no skips; docs passed. Initial Shared disposal failure passed focused and full reruns. Structured autoreview blocked by bundle-size limit; focused review had no blockers. Co-authored-by: Copilot App <[email protected]> Copilot-Session: c4966eb3-4283-43c3-8945-203924da51a7
Reuse the existing JSON-object reader and guard the gateway section before suspending reload. Cover eight malformed shapes without writes, runtime calls, or publication. Validation: full build; Shared 4169 passed/1 skipped; Tray 3098 passed; SetupEngine 1381 passed/1 skipped; strict WSL MXC 17/17. Opus verified its diagnostic finding resolved. Structured autoreview blocked by secret-like bundle content; guard not bypassed. Co-authored-by: Copilot App <[email protected]> Copilot-Session: c4966eb3-4283-43c3-8945-203924da51a7
Updated review verdictNo CRITICAL/HIGH introduced defects found by the independent Opus 4.8 and GPT-5.3 Codex reviews. This is a static-review verdict, not a claim that every native-package acceptance gate is complete. Both models reviewed PR head Both models agree (HIGH consensus)
Single-model observations (LOW consensus)
Product decisions preserved
Validation and remaining evidenceCurrent-head local full build passed. Shared: 4,169 passed / 1 skipped; Tray: 3,098 passed; SetupEngine: 1,381 passed / 1 skipped; strict WSL/MXC: 17 passed / no skips. The eight focused malformed-config cases passed. The latest observed status of Build and Test run 36202967297 is completed / success. An earlier observed job result on this head failed Clean signed Store-package install/upgrade through wizard completion and connection-manager handoff remains unverified. WSL/MXC proof is not native package lifecycle or containment proof. Enabled-state visual restoration still lacks runtime evidence. Structured |
@natalie-aguinaldo Oops I missed this. Will address the nit in a subsequent PR with the onboarding refresh. |
Fresh adversarial review verdict (2026-09-28)No confirmed CRITICAL/HIGH/MEDIUM introduced defects after independent review and cross-reference. Three LOW observations remain optional follow-ups, not demonstrated functional failures. This is a static-review result, not a declaration that the native-package proof gates are satisfied or a merge approval. Exact scope: head Both models agree: HIGH consensus
Only one model flagged: LOW consensus
Confidence above estimates implementation confidence for a possible fix, not defect probability. No review-driven edits were made in this pass. Disputed findings investigated and withdrawnCodex initially raised two lifecycle concerns. After tracing actual production ownership state, it withdrew both:
The previous malformed-config diagnostic finding is fixed at this reviewed head, using the existing JSON-object reader and a descriptive gateway-section guard, with eight regression cases asserting no writes/runtime calls/publication on invalid configuration. Decisions and evidence boundaries
|






What Problem This Solves
Companion needs a guided onboarding path connecting the Windows Gateway MSIX to its existing setup wizard without separate install, availability-check, and wizard-launch clicks.
User Impact
The Welcome page always shows native Gateway first, WSL second, and existing-gateway connection third. Native is recommended when supported; WSL remains visible and selectable during the capability check and for every result. Explicit WSL or existing-gateway selections survive late probe completion and Back navigation.
The latest UI follow-up (
666db5a0) uses the requested copy:Runtime limitation: this is the requested draft product copy, not newly implemented containment. The native Gateway still runs as the signed-in Windows user; this PR does not provision an isolated MXC session. The architecture docs retain that distinction.
Users choose Windows capabilities and permissions, then Companion automatically prepares the package/profile and opens the shared Gateway wizard with progress indicators and completion checkmarks. Missing-package setup opens the OpenClaw Gateway Microsoft Store listing. No local MSIX path or environment-variable configuration is required. Store installation and provider sign-in remain interactive.
Why This Change Was Made
Private workstation paths were removed from code, tests and docs. Earlier unpublished history was consolidated into a sanitized commit before publication; subsequent updates are separate commits. No local-directory links, runtime profiles, credentials or MSIX payloads are included.
Native package and runtime handoffs
MSIX discovery and installation. Companion checks current-user package name, publisher, health and package-qualified execution aliases, never a generic PATH command. Only a missing package opens the fixed Microsoft Store HTTPS listing, once per attempt. The listing may open in a browser; opening it is not installation success. Companion waits up to five minutes for verified registration, then continues automatically. Cancellation stops the wait, not Store installation; timeout remains retryable.
The trusted Store identity is
OpenClawFoundation.OpenClawGateway/CN=4BA40A7A-B719-4C40-BF91-84AF4F1136FC, verified against the packaging manifest. Existing development packages retain their original exact name/publisher pair. New setup fails explicitly if both identities are installed; existing runtime profiles resolve their exact saved family, so coexistence does not silently migrate or break their package selection.Dedicated profiles and process ownership. Each Gateway gets separate configuration, credentials, identity and workspace without replacing the default profile. Companion owns the packaged launcher; the launcher owns Node's separate job. Listener verification checks direct job membership or a live, same-user descendant chain anchored to the retained, expected-package launcher, plus consistent loopback TCP snapshots. Credentials are withheld until ownership is verified. The shared wizard uses authenticated Gateway RPC, not a new cross-package handoff protocol. After configuration/health checks and registry publication, the connection manager takes over startup/reconnect and stops the owned runtime on disconnect, switch or shutdown, preserving profile data.
flowchart TD D{"Gateway package registered?"} -->|No| I["Microsoft Store listing: package selection and consent"] D -->|Yes| V["Verify trusted identity, package health and qualified aliases"] I -->|Registration observed| V V --> P["Prepare dedicated Gateway profile"] P --> L["Companion-owned packaged launcher"] L --> N["Package-owned Node Gateway"] N --> O["Verify loopback listener ownership"] O --> W["Authenticated shared Gateway wizard"] W --> H["Restore reload; validate config and health"] H --> R["Stop setup runtime; publish Gateway record"] R --> M["Connection manager: start, reconnect, stop"]Evidence
The final UI source (
666db5a0) passed the full build, 7,015 required Shared/Tray tests (33 skips), and documentation validation. The WSL-selection behavior also passed SetupEngine tests and all 17 strict Gateway MXC E2E tests before the final text/accessibility-only update. See the source scopes below; these are not all fresh full-head suite results.The rebuilt isolated app was launched for the developer's manual UI audit, followed by approval to push. No new screenshot or recording is claimed. Earlier native UI proof showed completed support/package/profile rows followed by automatic entry into the shared Gateway wizard. Clean Store installation and current-head native interactive completion/normal-owner handoff remain unverified, so this PR is a draft.
Change Type
Scope
winnodeRequired proof pools
windows-11-arm64: native package/runtime behavior and ARM64 build.windows-winui-interactive: recommendation, permissions, progress and shared-wizard UX.windows-clean-installer-upgrade: missing-package acquisition; clean Store install and full signed install/upgrade matrix outstanding.windows-wsl-gateway-e2e: shared onboarding and connection/pairing regression coverage.windows-wsl-mxc: real Gateway-to-Windows-node containment proof, without skips.Validation
Tests used the worktree repository root and isolated tray data.
666db5a0preserves the final validated UI source tree without further edits..\build.ps1 -DevBuild -Configuration Release666db5a0dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore666db5a0dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore666db5a0dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restoredotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore9acdb557; runtime unchanged since.\scripts\validate-mxc-e2e.ps1 -NoBuild -Configuration Release -RuntimeIdentifier win-arm64 -ResultsDirectory .\TestResults\WslVisibleMxcE2E.\scripts\validate-docs.ps1666db5a0Earlier Store validation had one unrelated Shared MCP-disposal timing failure, then passed in isolation and in the full required rerun. The latest UI build/Shared/Tray runs passed without that failure. No unrelated test code was changed.
Rubber-duck review of the original integration identified missing per-handshake ownership authorization and restart racing native finalization; both were fixed and verified. Store-follow-up review identified coexistence breaking saved-profile resolution; runtime resolution now selects the exact saved family, with regression guards. HTTPS listing handoff and the retryable five-minute deadline are intentional. Packaging builds x64 and ARM64, so the obsolete local ARM64-only gate was removed; actual Store delivery still needs live proof.
Final UI rubber-duck review found no blocking selection/readiness regressions. Nonblocking resource-failure accessibility fallback and live-region timing suggestions remain deferred; unused alternatives strings and broader WSL-description localization were not folded into this narrow update.
python .agents\skills\autoreview\scripts\autoreview --mode localwas attempted again before publication but refused its 4,147,550-byte context-expanded diff (180,000-byte limit). No clean structured review is claimed.Real Behavior Proof
666db5a0for final build, Shared/Tray and docs. The strict MXC run covers the WSL-selection update before the final copy/accessibility-only edits. Earlier native UI capture predates Store acquisition and final handoff guards; it is not Store proof.OpenClaw Setup (Dev)process was responsive. The developer requested publication after the manual-audit cycle. Unit/source contracts cover native/WSL/existing ordering, always-visible WSL, late-probe selection preservation, exact new labels, accessibility names and six-locale coverage.Security Impact
Compatibility and Migration
OPENCLAW_GATEWAY_MSIX_PATHinput is removed. Missing-package acquisition uses the fixed Store listing instead.Review Conversations