Skip to content

feat(setup): guide native Gateway installation and onboarding - #1447

Merged
bkudiess merged 11 commits into
mainfrom
karkarl-native-mxc-gateway-setup
Sep 28, 2026
Merged

bkudiess merged 11 commits into
mainfrom
karkarl-native-mxc-gateway-setup

Conversation

@karkarl

@karkarl karkarl commented Sep 18, 2026 •

Copy link
Copy Markdown
Collaborator

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:

  • Native title: Install a local native gateway
  • Native description: Install a local, session-contained OpenClaw gateway
  • WSL title: Install a local WSL gateway

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

  • Reuse the capabilities/permissions UI and upstream Gateway wizard.
  • Keep WSL directly available alongside native, without an expander or native-capability visibility gate.
  • Let Microsoft Store own package selection, signing, consent and deployment. Companion waits for verified registration and package-qualified aliases with bounded cancellation/retry.
  • Preserve lifecycle ownership: the setup session owns temporary runtime validation; the existing connection manager takes over after gated publication. Listener ownership is checked at credential handoff, and finalization cannot race an onboarding restart.
  • Save capability choices without overwriting unrelated settings. Completion does not falsely claim a running Gateway or paired Windows node.
  • Update six locales, accessibility names, regression coverage and the architecture ledger.

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"]
Loading

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

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required 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. 666db5a0 preserves the final validated UI source tree without further edits.

Command Result Source scope
.\build.ps1 -DevBuild -Configuration Release Passed, all projects 666db5a0
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore 4,013 passed; 33 skipped 666db5a0
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore 3,002 passed 666db5a0
dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore 1,342 passed; 1 skipped WSL-selection update, before final copy/accessibility edits
dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore 883 passed; 1 skipped Prior Store update 9acdb557; runtime unchanged since
.\scripts\validate-mxc-e2e.ps1 -NoBuild -Configuration Release -RuntimeIdentifier win-arm64 -ResultsDirectory .\TestResults\WslVisibleMxcE2E 17 passed; no skips WSL-selection update, before final copy/accessibility edits
.\scripts\validate-docs.ps1 Passed; 49 Markdown files 666db5a0

Earlier 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 local was 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

  • Environment tested: Windows ARM64, isolated test data, real WSL Gateway/MXC fixtures. Historical native UI proof used development Gateway MSIX 0.0.0.1.
  • PR head or commit tested: 666db5a0 for 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.
  • Exact steps or command run: strict MXC command above. Final Release dev build was launched with a fresh isolated profile for manual onboarding review. Earlier native onboarding reviewed capabilities/permissions, completed local App Installer installation, and automatically entered the shared wizard after profile/runtime preparation.
  • Evidence copied from the WSL-selection strict run, with local paths omitted:
Test Run Successful.
Total tests: 17
     Passed: 17
Gateway MXC proof passed: MirroredWslSafeGatewayPort_IsListeningAndRecorded
Gateway MXC proof passed: RealGateway_SystemRun_ExecutesThroughWindowsNodeMxcSandbox
Gateway MXC proof passed: RealGateway_SystemRun_BlocksWritesToTrayDataDirectoryInMxcSandbox
MXC validation completed successfully.
  • Observed result: real Gateway-to-Windows-node MXC execution and denied writes passed. Final isolated 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.
  • Screenshot or artifact links verified? N/A. No new screenshot was captured; local-directory links and raw runtime artifacts are intentionally omitted.
  • Not verified / blocked: no current-head visible Store UI or clean Store install-to-wizard proof was collected; installation requires interactive Store consent. Current-head native interactive completion and final connection-manager handoff, full signed install/upgrade matrix, and actual MXC session provisioning remain outstanding. The requested session-contained description is not containment proof. No new MCP commands are introduced; fresh manual MCP discovery/invocation proof was not collected.

Security Impact

  • New permissions or capabilities? No new node commands; explicit selection of existing capability permissions.
  • Secrets or tokens handling changed? Yes: dedicated native profiles and exact-device pairing. Tokens are not passed in command arguments; credential handoff requires listener ownership verification.
  • New or changed network calls? Yes: loopback Gateway/wizard RPC and the fixed public Microsoft Store listing. Companion does not directly download MSIX payloads.
  • Command or tool execution surface changed? Yes: package-qualified launchers and setup/config/health commands; no generic PATH/npm fallback.
  • Data access scope changed? Yes: dedicated Companion-managed native profiles, without replacing the default profile or existing WSL gateways.
  • Risk and mitigation: native execution uses the signed-in user's rights by design. Store signing/consent, exact package identity pairs, exact pairing, staged publication, loopback binding, ownership checks and cancellation cleanup remain required. The latest wording does not change those boundaries.

Compatibility and Migration

  • Backward compatible? Existing WSL/remote profiles and connection ownership are preserved. Installed development Gateway profiles remain pinned to their original family, including when the Store package coexists. WSL setup retains its fresh readiness gate and destructive-replacement confirmation.
  • Config or environment changes? The temporary OPENCLAW_GATEWAY_MSIX_PATH input is removed. Missing-package acquisition uses the fixed Store listing instead.
  • Migration needed? No automatic profile migration or package-family rewrite.
  • Required action: complete installation from the Store listing when the package is absent. Healthy installed packages bypass acquisition. New setup with both trusted identities installed requires resolving that ambiguity explicitly.

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@karkarl

karkarl commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator Author

Progress screenshots:

Image Image Image

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. merge-risk: 🚨 auth-provider 🚨 Merging this PR could break OAuth, tokens, provider routing, model choice, or credentials. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 18, 2026
@clawsweeper

clawsweeper Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

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 review

What this changes

Adds guided Microsoft Store Gateway installation and onboarding to Windows Companion, with a dedicated profile, native runtime supervision, localized setup screens, tests, and documentation.

Regression provenance

Possible 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
Reviewed head: e6ddcb05d1b0d2aca87225a3ec5038f36d29513a
Owner decision: Required. See Decision needed.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The patch contains substantial coverage, but its central native lifecycle conflicts with the pinned package contract and its real Store handoff remains unproven.
Proof confidence 🦪 silver shellfish (2/6) Needs stronger real behavior proof before merge: Authority-chain proof required: the historical screenshots show an earlier development-package install and connected tray, while the reported 17-test trace exercises WSL MXC. Neither proves this head's Store package uses the intended profile, accepts its own session listener, rejects a foreign or stale listener before credential I/O, and stops the session on handoff or shutdown. The added gateways.json marker also lacks verified existing-state upgrade behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Patch quality 🧂 unranked krab (1/6) Security review found an item that needs attention.

Verification

Check Result Evidence
Real behavior Needs proof Needs stronger real behavior proof before merge: Authority-chain proof required: the historical screenshots show an earlier development-package install and connected tray, while the reported 17-test trace exercises WSL MXC. Neither proves this head's Store package uses the intended profile, accepts its own session listener, rejects a foreign or stale listener before credential I/O, and stops the session on handoff or shutdown. The added gateways.json marker also lacks verified existing-state upgrade behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
Evidence reviewed 15 items Native launch: The introduced process host starts the package-qualified alias with gateway run and assigns the launcher to a Windows job.
Package execution contract: The package implementation cited by the PR starts a recorded isolated session and sends the OpenClaw command through its session executor; this is an affirmative dependency contract for the proposed package launch.
Session side effect: The package executor dispatches the Gateway command to the recorded sandbox rather than starting it as a child of Companion's launcher job.
Findings 3 actionable findings [P1] Use the package session as the native Gateway owner
[P1] Preserve existing explicit wizard answers
[P1] Remove the unproven containment claim
Security Needs attention Native listener authorization uses the wrong owner: The package dispatches the Gateway into an isolated session, but Companion authorizes a launcher-job member or same-user descendant. The legitimate and nearest foreign or stale listener must be decided through the session owner before credential I/O.
Onboarding asserts containment without final-path proof: The Welcome copy claims MXC containment even though the PR's own native lifecycle description does not establish Companion control of the package session.

How this fits together

Windows 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]
Loading

Decision needed

Question Recommendation
Should native onboarding use the packaging project's isolated-session lifecycle before Companion recommends and connects to the Store Gateway? Integrate the package session: Use a supported package session, profile, ownership, and stop contract, then prove allowed and rejected credential handoffs on the current head.

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

  • Add real behavior proof - Needs stronger real behavior proof before merge: Authority-chain proof required: the historical screenshots show an earlier development-package install and connected tray, while the reported 17-test trace exercises WSL MXC. Neither proves this head's Store package uses the intended profile, accepts its own session listener, rejects a foreign or stale listener before credential I/O, and stops the session on handoff or shutdown. The added gateways.json marker also lacks verified existing-state upgrade behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.
  • Use the package session as the native Gateway owner (P1) - The pinned Store-package implementation runs openclaw.exe commands inside its recorded MXC session, while this launcher job owns only the alias process. Its session child does not inherit Companion's dedicated profile variables, and the job/descendant check cannot establish that child's listener or stop its session. Integrate a supported package session and profile contract before native setup and credential handoff.
  • Preserve existing explicit wizard answers (P1) - A saved WizardAnswers choice such as a non-skip search provider now fails setup when it conflicts with Companion's new policy. Existing headless users receive a runtime failure and must edit configuration. Keep the previous explicit-answer behavior by default or provide an approved, tested upgrade path.
  • Remove the unproven containment claim (P1) - The Welcome card promises an MXC-contained Gateway, while this branch documents its Companion-owned native path as non-isolated and has no current-head Store-session handoff proof. Make the user-facing description match the behavior that is actually established before recommending it.
  • Resolve security concern: Native listener authorization uses the wrong owner - The package dispatches the Gateway into an isolated session, but Companion authorizes a launcher-job member or same-user descendant. The legitimate and nearest foreign or stale listener must be decided through the session owner before credential I/O.
  • Resolve security concern: Onboarding asserts containment without final-path proof - The Welcome copy claims MXC containment even though the PR's own native lifecycle description does not establish Companion control of the package session.
  • Resolve merge risk (P1) - The Store package's session, profile, listener, and shutdown ownership are not established through Companion's proposed lifecycle; current-head allowed, foreign, and stale-listener outcomes before credential I/O remain unproven.
  • Resolve merge risk (P1) - Existing users with explicit answers for newly managed wizard steps can have setup fail and be required to edit their configuration; the upgrade policy needs a deliberate compatibility decision.
  • Resolve merge risk (P1) - The new persisted native Gateway marker and draft recovery lack a verified existing-state upgrade run, and the historical development-package screenshots do not show a clean Store install through final connection handoff.
  • Complete next step (P2) - Resolve the session-owner, wizard compatibility, and containment-copy findings; obtain the security-boundary decision and provide current-head Store, final-effect, and existing-state upgrade proof. Redact addresses, credentials, and private endpoints from shared evidence; updating the PR body should trigger re-review, or a maintainer can request @clawsweeper re-review.
  • Improve patch quality - Align setup, profile selection, listener verification, and shutdown with the package session owner.
  • Improve patch quality - Add final-effect proof for the intended session listener and the nearest foreign or stale listener before credential I/O.
  • Improve patch quality - Verify existing Gateway records and explicit wizard answers through an upgrade, then capture a redacted current-head Store-to-connection run.
  • Resolve maintainer decision - Resolve the maintainer decision shown above before merge.

Findings

  • [P1] Use the package session as the native Gateway owner — src/OpenClaw.Connection/NativeGateway/WindowsNativeGatewayProcessHost.cs:46-50
  • [P1] Preserve existing explicit wizard answers — src/OpenClaw.SetupEngine/SetupWizardRunner.cs:803-811
  • [P1] Remove the unproven containment claim — src/OpenClaw.SetupEngine.UI/Pages/WelcomePage.xaml:84
  • [medium] Native listener authorization uses the wrong owner — src/OpenClaw.Connection/NativeGateway/WindowsNativeGatewayProcessHost.cs:130
  • [medium] Onboarding asserts containment without final-path proof — src/OpenClaw.SetupEngine.UI/Pages/WelcomePage.xaml:84
Agent review details

Security

Needs attention: The native credential boundary and isolation claim need review against the package's actual session owner.

Review metrics

Metric Value Why it matters
Changed files 85 files The feature crosses setup UI, connection ownership, persisted records, tests, documentation, and CI.
Source and test lines src +3365/-177; tests +3471/-19 The production growth serves the stated native onboarding feature, but its cross-package runtime path still needs direct proof.

Merge-risk options

Maintainer options:

  1. Align native lifecycle before merge (recommended)
    Connect setup, profile selection, listener authorization, and shutdown to the package's supported session owner and validate the final credential side effect.
  2. Pause the native landing
    Keep this branch open for owner-led integration until the package contract and existing-user upgrade behavior have current-head proof.

Technical review

Best 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:

  • [P1] Use the package session as the native Gateway owner — src/OpenClaw.Connection/NativeGateway/WindowsNativeGatewayProcessHost.cs:46-50
    The pinned Store-package implementation runs openclaw.exe commands inside its recorded MXC session, while this launcher job owns only the alias process. Its session child does not inherit Companion's dedicated profile variables, and the job/descendant check cannot establish that child's listener or stop its session. Integrate a supported package session and profile contract before native setup and credential handoff.
    Confidence: 0.9
  • [P1] Preserve existing explicit wizard answers — src/OpenClaw.SetupEngine/SetupWizardRunner.cs:803-811
    A saved WizardAnswers choice such as a non-skip search provider now fails setup when it conflicts with Companion's new policy. Existing headless users receive a runtime failure and must edit configuration. Keep the previous explicit-answer behavior by default or provide an approved, tested upgrade path.
    Confidence: 0.96
  • [P1] Remove the unproven containment claim — src/OpenClaw.SetupEngine.UI/Pages/WelcomePage.xaml:84
    The Welcome card promises an MXC-contained Gateway, while this branch documents its Companion-owned native path as non-isolated and has no current-head Store-session handoff proof. Make the user-facing description match the behavior that is actually established before recommending it.
    Confidence: 0.95

Overall correctness: patch is incorrect
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against 5a59535216ee.

Labels

Label changes:

  • remove proof: 📸 screenshot: Current real behavior proof evidence kind is none.

Label justifications:

  • P1: The native setup path is likely blocked against the pinned package contract and existing headless configurations can stop during upgrade.
  • merge-risk: 🚨 compatibility: New wizard policy rejects some previously explicit answers and the PR adds persisted native Gateway metadata.
  • merge-risk: 🚨 security-boundary: Native credentials depend on listener ownership, but the proposed check follows the launcher job while the package runs the Gateway in a session.
  • merge-risk: 🚨 availability: The owner mismatch can prevent a legitimate native listener from passing setup and leaves session shutdown unverified.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🦪 silver shellfish and patch quality is 🧂 unranked krab.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask. Needs stronger real behavior proof before merge: Authority-chain proof required: the historical screenshots show an earlier development-package install and connected tray, while the reported 17-test trace exercises WSL MXC. Neither proves this head's Store package uses the intended profile, accepts its own session listener, rejects a foreign or stale listener before credential I/O, and stops the session on handoff or shutdown. The added gateways.json marker also lacks verified existing-state upgrade behavior. After adding proof, update the PR body; ClawSweeper should re-review automatically. If it does not, the PR author or someone with repository write access can comment @clawsweeper re-review.

Evidence

Security concerns:

  • [medium] Native listener authorization uses the wrong owner — src/OpenClaw.Connection/NativeGateway/WindowsNativeGatewayProcessHost.cs:130
    The package dispatches the Gateway into an isolated session, but Companion authorizes a launcher-job member or same-user descendant. The legitimate and nearest foreign or stale listener must be decided through the session owner before credential I/O.
    Confidence: 0.88
  • [medium] Onboarding asserts containment without final-path proof — src/OpenClaw.SetupEngine.UI/Pages/WelcomePage.xaml:84
    The Welcome copy claims MXC containment even though the PR's own native lifecycle description does not establish Companion control of the package session.
    Confidence: 0.94

What I checked:

Likely related people:

  • Scott Hanselman: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • Barbara Kudiess: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)
  • karkarl: Suggested for follow-up; no historical authorship or introduction is verified. (role: unverified routing candidate; confidence: low)

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

History

Review history (22 earlier review cycles; latest 8 shown)
  • reviewed 2026-09-24T16:45:27.670Z sha 138354c :: needs real behavior proof before merge. :: [P1] Route the dedicated profile into the Store session | [P1] Verify the listener through the Store session owner | [P1] Apply explicit wizard answers before onboarding defaults | [P2] Retain auto-answered steps in the recovery template | [P1] Remove the unproven MXC containment claim
  • reviewed 2026-09-24T18:08:15.919Z sha e02ad85 :: needs real behavior proof before merge. :: [P1] Carry the dedicated profile into the package session | [P1] Verify the listener through the package session owner | [P1] Stop the Gateway through its session owner | [P1] Apply explicit wizard answers before onboarding defaults | [P2] Retain auto-answered prompts in the recovery template | [P1] Remove the unsupported MXC containment claim
  • reviewed 2026-09-24T18:27:11.222Z sha e02ad85 :: needs real behavior proof before merge. :: [P1] Carry the dedicated profile into the package session | [P1] Authorize the listener through its package session owner | [P1] Stop the Gateway through its session owner | [P1] Apply explicit wizard answers before onboarding defaults | [P2] Retain auto-answered prompts in the recovery template | [P1] Make the containment description match the installed runtime
  • reviewed 2026-09-24T19:12:53.741Z sha e02ad85 :: needs real behavior proof before merge. :: [P1] Carry the dedicated profile into the package session | [P1] Authorize the listener through its package session owner | [P1] Stop the Gateway through its session owner | [P1] Apply explicit wizard answers before onboarding defaults | [P2] Retain auto-answered prompts in the recovery template | [P1] Make the containment description match the installed runtime
  • reviewed 2026-09-24T20:36:20.492Z sha a6190ba :: needs real behavior proof before merge. :: [P1] Carry the profile into the packaged session | [P1] Authorize the listener through its session owner | [P1] Stop the Gateway through its session owner | [P1] Apply explicit wizard answers before defaults | [P2] Retain auto-answered prompts in the recovery template | [P1] Match the containment description to the runtime
  • reviewed 2026-09-25T17:59:11.138Z sha b8e10c7 :: needs real behavior proof before merge. :: [P1] Pass the dedicated profile into the package session | [P1] Authorize the listener through its package session owner | [P1] Stop the Gateway through its session owner | [P1] Apply explicit wizard answers before defaults | [P2] Retain auto-answered prompts in the recovery template | [P1] Match the containment description to proven runtime behavior
  • reviewed 2026-09-25T18:42:56.010Z sha 79d2534 :: needs real behavior proof before merge. :: [P1] Apply explicit wizard answers before onboarding defaults | [P2] Retain auto-answered steps in recovery templates | [P1] Remove the unsupported containment claim
  • reviewed 2026-09-25T23:33:36.716Z sha 4c385e5 :: needs real behavior proof before merge. :: [P1] Align native setup with the package's session owner | [P1] Preserve existing explicit wizard answers | [P1] Remove the unsupported MXC containment claim

@clawsweeper clawsweeper Bot added merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Sep 18, 2026
@natalie-aguinaldo

Copy link
Copy Markdown
Contributor

Progress screenshots:

Image Image Image

very small nit - what about swapping the order to "Verify or Install Gateway package" instead of install or verify? rationale is it'd check if a gateway package is already installed, verify it, otherwise, install it

@natalie-aguinaldo

Copy link
Copy Markdown
Contributor

This looks great!

@karkarl karkarl added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 23, 2026
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 23, 2026
@karkarl karkarl removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Sep 23, 2026
@clawsweeper clawsweeper Bot added the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 23, 2026
@karkarl karkarl added status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. and removed status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. labels Sep 23, 2026
@clawsweeper clawsweeper Bot added P0 Emergency: data loss, security bypass, crash loop, or unusable core runtime. and removed P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. labels Sep 23, 2026
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
@karkarl
karkarl force-pushed the karkarl-native-mxc-gateway-setup branch from a6190ba to b8e10c7 Compare September 25, 2026 17:52
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
@clawsweeper clawsweeper Bot removed the proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. label Sep 26, 2026
@karkarl

karkarl commented Sep 26, 2026

Copy link
Copy Markdown
Collaborator Author

Updated review verdict

No 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 4c385e57e31efaaa008edaf4c6e932ee1b05ca28 against base 7d92747e193caa08833ea07f3cd08d365268f3de. The accepted LOW finding was fixed in current head e6ddcb05d1b0d2aca87225a3ec5038f36d29513a, and Opus separately verified that narrow fix.

Both models agree (HIGH consensus)

Finding Opus Codex Fix confidence
No shared actionable code defect None None N/A
Clean signed native-package lifecycle and enabled-state UI proof remain outstanding Proof gap Proof gap N/A

Single-model observations (LOW consensus)

Finding Opus Codex Assessment / fix confidence
Opaque malformed-config errors in native reload preparation LOW Not flagged Fixed in e6ddcb05; 95%. Eight cases verify descriptive errors without config/backup writes, runtime calls, or publication.
Bundled answers could conflict after future upstream prompt changes LOW Not flagged 70%; no current defect established. Channel is currently an unmanaged multiselect; other retained answers match policy.
Runtime-gate contention temporarily denies credential handoff LOW Not flagged Intentional fail-closed behavior with retry guidance. No fix recommended.

Product decisions preserved

  • The shortened wizard is intentional. Managed answers accept matching protocol values and fail explicit conflicts; omitted screens are not restored. Unmanaged prompts retain existing handling.
  • Recovery templates contain actionable unmanaged prompts, not policy overrides. On-disk tests cover later failures, sensitive placeholders, and conflict-removal guidance.
  • PM-approved native Gateway copy is retained by explicit maintainer decision. Existing docs still disclose the signed-in-user runtime; this review does not establish native MXC containment.

Validation and remaining evidence

Current-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 ChatNavigationReadinessTests.WaitForOperatorHandshakeAsync_ReturnsTrue_WhenStateEventFires (false instead of true; 776 ms duration against a 500 ms timeout). Its production helper and test are unchanged by this PR; all 11 targeted readiness tests passed locally. Scheduling sensitivity is a supported hypothesis, not a proven host-level root cause. No handshake-test fix is included here.

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 autoreview --mode local remained blocked by bundle safety guards (size, and secret-like expanded content on the narrow follow-up); those guards were not bypassed. The two static reviews do not turn these evidence gaps into passed gates.

@karkarl

karkarl commented Sep 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

Verify or Install Gateway package

@natalie-aguinaldo Oops I missed this. Will address the nit in a subsequent PR with the onboarding refresh.

@karkarl

karkarl commented Sep 28, 2026

Copy link
Copy Markdown
Collaborator Author

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 e6ddcb05d1b0d2aca87225a3ec5038f36d29513a, merge base 7d92747e193caa08833ea07f3cd08d365268f3de; full 85-file diff (8,172 additions / 203 deletions). Independent reviewers: Claude Opus 4.8 + GPT-5.3 Codex, with identical review instructions. Opus 4.6 was unavailable. Review depth concentrated on production native supervision, ownership/credential handoff, setup/session lifecycle, wizard policy and recovery; this was not exhaustive runtime verification of every UI/localization surface.

Both models agree: HIGH consensus

Issue Opus Codex Fix confidence
No shared actionable code defect None None after verification N/A
Signed native Store-package lifecycle and current-head enabled-state UI proof remain incomplete Proof gap Proof gap N/A

Only one model flagged: LOW consensus

Issue Opus Codex Fix confidence / disposition
Busy native runtime temporarily denies synchronous credential handoff (NativeGatewayRuntime.Inspect) LOW Not flagged N/A: deliberate fail-closed behavior; preserve it. Optional UX investigation only.
Startup aborts on typed ListenerSnapshotChanged instead of polling again (NativeGatewayRuntime.cs:115-130,237-239) LOW Not flagged 70%: optional bounded robustness improvement; no reproduced failure. Any change must apply only to the typed snapshot-change outcome, never generic unknown, foreign, unowned or non-loopback listeners.
Published config retains the valid per-gateway wizard-console.log destination (NativeGatewaySetupSession.cs:266,282-284) LOW Not flagged 90% for optional log naming/restoration work. The redirect supports the setup console; persistence has no demonstrated functional impact.

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 withdrawn

Codex initially raised two lifecycle concerns. After tracing actual production ownership state, it withdrew both:

  • A second stop overriding success after publication: the pre-publication stop clears the runtime-owned process under its gate. Once that stop succeeds, the final stop has no owned process to dispose. No concrete production failure path was established.
  • Reload restoration skipped when disposal fails: stop-before-config-write is a safety invariant. If shutdown fails, forcing a config write may be unsafe; the durable reload backup remains for later recovery. This is an intentional safety tradeoff, not a confirmed defect.

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

  • The shortened wizard remains intentional. Managed answers accept missing/matching values and explicitly reject conflicts; unmanaged prompts preserve existing behavior. Recovery templates contain actionable prompts, not policy overrides.
  • PM-approved native Gateway copy remains unchanged by explicit decision. Runtime documentation still discloses signed-in-user host-child execution; native MXC containment is not established by this review.
  • Signed Store install/upgrade, package alias/process topology, native pairing round-trip, completion and connection-manager handoff still need current-head end-to-end proof. Current modern clawctl MXC packaging and this host-child runtime are distinct contracts. WSL MXC results do not prove native-package containment or lifecycle compatibility.
  • No new build/runtime tests were run for this static pass. Previously collected local evidence at e6ddcb05: full build passed; Shared 4,169 passed / 1 skipped; Tray 3,098 passed; SetupEngine 1,381 passed / 1 skipped; strict WSL/MXC 17/17, no skips. This is real prior execution evidence, not fresh Sep 28 proof.
  • Hosted Build and Test and CodeQL currently report success for this head. Earlier observed timing-sensitive Connection-test failure is not erased by the later successful status; no timing-test fix is part of this review.
  • Structured autoreview previously failed its bundle safety guards and was not bypassed. This fresh dual-model review is separate from that unavailable structured-review result.

@bkudiess
bkudiess merged commit dba8121 into main Sep 28, 2026
41 of 43 checks passed
@bkudiess
bkudiess deleted the karkarl-native-mxc-gateway-setup branch September 28, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk: 🚨 availability 🚨 Merging this PR could cause crashes, hangs, restart loops, stalls, or process outages. merge-risk: 🚨 compatibility 🚨 Merging this PR could break existing users, config, migrations, defaults, or upgrades. merge-risk: 🚨 security-boundary 🚨 Merging this PR could weaken sandboxing, authorization, credentials, or sensitive data. P1 Urgent regression or broken agent/channel workflow affecting real users now. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants