Repository navigation
fix(onboarding): finish setup before showing AI as ready - #1626
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. What this changesThis PR finishes setup, restarts Companion, and verifies the selected Gateway and model before admitting Ready and destination choices. Example: Complete onboarding with llamacpp/qwen3.6-35b-a3b-mtp-ud-q4-k-s.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness⛔ Blocked before merge - 5 items remain Keep open: this maintainer-backed PR addresses premature Ready behavior still present on main, and the previously reported completion-ownership ledger correction remains unresolved. Priority: P1 Before merge
Findings
Tests
Agent review detailsHow this fits togetherSetupEngine turns reviewed setup choices and authenticated model verification into a bounded restart receipt; Companion consumes it through the connection manager and presents verified native destinations. flowchart TD
A[Reviewed AI selection] --> B[Setup completion preparation]
B --> C[Finalize and restart]
C --> D[Bounded preparation receipt]
D --> E[Connection and model verification]
E --> F[Ready chooser]
F --> G[Native destination]
Technical reviewBest possible solution: Finish setup once, then admit Ready and navigation through the existing connection and Local AI owners using current authority and compatible restart receipts. Do we have a high-confidence way to reproduce the issue? Current-main source shows Ready mounted before choice-triggered finalization and restart verification, consistent with the reported Store readiness contradiction; no target code was executed. Is this the best way to solve the issue? Separating once-only setup finalization from destination-only Ready is appropriate, and the patch keeps connection ownership, model recovery, and verification in their existing production owners. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against bef07da01911. Merge-risk optionsMaintainer options:
Provenance checked
TestingProof path: in-process harness. SecurityNeeds attention: No reachable authorization bypass was established, but the persisted preparation authority still needs final-effect rejection evidence. EvidenceSecurity concerns:
What I checked:
Likely related people:
LabelsLabel changes:
Label justifications:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (11 earlier review cycles; latest 8 shown)
Reviewed October 22, 2026, 1:10 PM ET / 17:10 UTC (Revision 12). |
|
Validation update for the ClawSweeper review, with fixes pushed in 4b764e76. Fixed loading alignment and stable progress width, a late-admitted cleanup race, brittle source assertions, Ready rendering and popup scroll timing tests, and process-wide exception contamination in the MCP disposal tests. Added 11 current-reader receipt compatibility cases. These do not replace packaged upgrade proof. The exact source files now committed passed the full Debug ARM64 build, Shared (4,225 passed / 34 skipped), Tray (3,931 passed), Connection (1,564 passed / 1 skipped), SetupEngine (2,358 passed / 1 skipped), focused WinUI (103 passed), popup stress (80 passed), cleanup stress (20 passed), and real WSL/MXC (18 passed, no skips). The disposable WSL fixture was removed. Test artifacts were retained locally, not uploaded. Independent Claude Opus 5.5 and GPT-6 Astra reviews confirmed the scoped follow-up fixes with no remaining actionable findings. The separate Codex CLI autoreview attempt was blocked by HTTP 401; no successful CLI review is claimed. Still open: production-chain rejection of revoked/replaced identity or session authority before recovery/navigation effects, including retry; final native Ready/destination visible proof; and signed-package fresh-install/upgrade/downgrade receipt compatibility. The earlier native manual run was interrupted by the forced-onboarding test override and is not claimed as final-head Ready proof. The PR remains a draft. This update addresses validation and records the remaining proof requirements; it does not claim those requirements are resolved. |
4b764e7 to
9c6b030
Compare
|
Addressed the review against rebased head
The exact owned proof slot was torn down successfully and unregistered. The pre-existing Gateway registration remains. The normal Gateway's VHDX timestamp changed during the local test run, so the body retains that concurrent-state caveat rather than claiming whole-machine isolation. CI still has a file-sharing failure in |
|
@bkudiess, upstream PR #171397 (fix: keep chat usable after removing an unavailable tool server) merged on October 15, fixing the reproduced cleanup failure linked from issue #1717. This readiness PR is still draft and its required CI gate passes. Could you confirm the next steps for the remaining native Ready/navigation, authority-rejection, and signed-package transition proof so we can move the Windows side forward? The original setup/restart report remains open. |
Carry the onboarding readiness, setup presentation, retry, and handoff changes onto the current Gateway recovery base. Co-authored-by: Barbara Kudiess <[email protected]> Co-authored-by: Scott Hanselman <[email protected]>
Keep the existing setup, connection, and UI regression cases aligned with the integrated readiness flow. Co-authored-by: Barbara Kudiess <[email protected]> Co-authored-by: Scott Hanselman <[email protected]>
Keep fixture sockets and approval events alive through snapshot and shutdown races exercised by onboarding tests. Co-authored-by: Barbara Kudiess <[email protected]>
Keep the MCP fixture assertion scoped to the exception under test.
93a7bc5 to
9c3503a
Compare
|
Rebased onto main (stacked on #1789) at 9c3503a. The PR description now links current-head RTXspark2 Connected Chat proof, labels the reply and Ready gate as pending, and reports the full validation results. @clawsweeper re-review |
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Co-authored-by: Copilot App <[email protected]>
Preserve preparation handoff deadline fixes while integrating current main. Co-authored-by: Copilot App <[email protected]>
Combine configurable native startup deadlines with issuance-bound preparation receipts and WSL Local AI recovery. Preserve startup diagnostics and fail-closed readiness controls. Co-authored-by: Copilot App <[email protected]>
Invalidate Ready on live configuration changes, avoid no-op WSL restarts, prevent duplicate committed restart publication, retain safe phase guidance and Close recovery, and reject completed unavailable managed startup promptly. Co-authored-by: Copilot App <[email protected]>
Use the exact configuration-change event without treating chat usage metadata as expired readiness. Refresh the runtime snapshot after startup task inspection. Preserve confirmed WSL restart reconciliation across Companion restarts instead of relying on an in-memory optimization, with regression coverage and documented rationale. Co-authored-by: Copilot App <[email protected]>
What Problem This Solves
Fixes: onboarding shows AI as ready before setup, restart, and verification of the selected Gateway and model have finished.
User Impact
User impact: Ready appears only after verified completion, configuration changes withdraw stale readiness, and failures retain safe localized guidance and an actionable Close button.
WSL Local AI retains confirmed Gateway restarts during route withdrawal, even when saved configuration is empty. This can interrupt/reconnect the Companion connection. The default preparation deadline is 27 minutes, covering two bounded WSL restarts and recovery; it is a maximum allowance, not an expected duration.
Current-head visible Ready/Close proof, real WSL setup/recovery, and strict MXC containment now pass. Merge sign-off is still blocked on successful real native pairing/model/completion proof and the managed NVIDIA Local AI path. This ARM64 Adreno host cannot provide the latter. The PR is currently ready rather than draft; that UI state is not a claim that these proof gates have closed.
Why This Change Was Made
Completion is owned by the setup window, drains the previous page, finishes setup once, and publishes a bounded restart receipt. The new process verifies the same Gateway, identity, session, and selected model before admitting the native choices. A launched restart cannot be launched again through Retry. Uncertain writes fail closed without automatic replay.
Merged main
e5122db3c9433f6281025f4149420183f94c71f1inc80d862f, preserving main's native startup diagnostics and configurable startup allowance. Current pushed head:67a30565d8b59694f0cb6105f2ccd396d1e558d9.Evidence
67a30565; the tested synthetic merge with main isd0e2ed2f27bc8258bfbffdce790cd1468dfbeeda. Release-only conditional jobs were skipped as expected, not reported as executed proof.config.changedfrom unrelated chat usage metadata before receipt consumption and after Ready is admitted. These are actual client/WinUI tests with synthetic Gateway data, not real WSL inference.Hanselman findings, dispositions, and fix confidence
The original full review used head
c80d862fagainst maine5122db3. Both models reviewed the fix delta at60af7868, then the final delta60af7868..67a30565.Actual models:
claude-opus-5.5(default context, high reasoning) andgpt-6-astra(long_context, high reasoning). Both completed each revision. Final verdict from each: no new material source issue. The evidence below supports each disposition; reviewer agreement is not runtime proof.Both models flagged: HIGH consensus
Only one model flagged: LOW consensus
Change Type
Scope
winnodeRequired proof pools
windows-11-arm64: native build and WinUI readiness/recovery behavior. Local ARM64 results below cover only their named assertions.windows-winui-interactive: current-head Light/Dark Ready and actual failed-cleanup Close visible proof passed 3/3. Earlier foreground failures are retained, not counted as successful captures.windows-wsl-gateway-e2e: real setup, pairing, recovery, and invocation passed 26/26 on Gateway 2026.10.6. This does not establish the still-missing managed Local AI Ready/inference path.windows-wsl-dgx-blackwell: real managed model recovery and inference on suitable NVIDIA hardware. Not available on this Qualcomm/Adreno desktop.windows-wsl-mxc: the strict runner passed 18/18 without-AllowSkip, including the required listener, sandbox execution, and protected-data write-rejection proofs.windows-clean-installer-upgradewas over-selected in the earlier body. This diff does not change the installer, updater, package layout, prerequisite detection, repair, or uninstall. Independent proof-policy review confirmed signed installation/upgrade is not a required pool for this diff. Legacy completion-receipt compatibility remains covered by tests; no signed upgrade is claimed.Validation
Local closeout uses the task worktree,
OPENCLAW_REPO_ROOT, isolated tray data, and no integration/GPU opt-in. Conflicting inherited local-data roots and the native-startup override are unset for default/migration coverage.For the proof commands below,
$proofRootis the private session artifact directory. The visual runner additionally pins the head and verifies source/binary freeze manifests. The real WSL runner setsOPENCLAW_RUN_E2E=1,OPENCLAW_RUN_OLLAMA_E2E=1, andOPENCLAW_E2E_GATEWAY_VERSION=2026.10.6, with separate fixture-owned data..\build.ps1dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type nonedotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type noneBuildPrerequisiteTests.CheckOnly_UsesTheAppLocalRuntimeResolver.dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type nonedotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type noneConnectAndReconnect_EmitCompletedOperatorSpans; that failure is retained.dotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 --no-restore --filter '(FullyQualifiedName~AiReadyPageRenderingTests|FullyQualifiedName~OnboardingAiPageTests|FullyQualifiedName~NativeSharedFlowTests|FullyQualifiedName~SetupWindowMinimumSizeTests)&Category!=NativeOnboardingProof' --logger 'trx;LogFileName=onboarding.trx' --results-directory '<isolated-results>' --blame-hang --blame-hang-timeout 120s --blame-hang-dump-type nonedotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -r win-arm64 --no-build --no-restore --filter 'FullyQualifiedName~VerifiedChooser_ShowsNativeChoicesWithoutIssuingOrFinalizing|FullyQualifiedName~FailedReturnFromFinishingStillOffersCloseWithoutRetryingSetup' --logger 'trx;LogFileName=visual.trx' --results-directory "$proofRoot\visual" --blame-hang --blame-hang-timeout 120s --blame-hang-dump-type nonedotnet test .\tests\OpenClaw.E2ETests\OpenClaw.E2ETests.csproj -r win-arm64 --no-restore --filter 'FullyQualifiedName~OpenClaw.E2ETests.Setup.SetupAndConnectTests' --logger 'trx;LogFileName=setup-connect.trx' --results-directory "$proofRoot\gateway" --blame-hang --blame-hang-timeout 30m --blame-hang-dump-type none.\scripts\validate-mxc-e2e.ps1 -NoBuild -RuntimeIdentifier win-arm64-AllowSkip; all three required named proofs passed..\scripts\validate-docs.ps1git -c core.whitespace=cr-at-eol diff --checkThe ordinary parallel Shared and Tray suites are not reported as passes. The repeated full Connection suite passed. One isolated run of each earlier failing timing/span case also passed without source changes or weaker limits:
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --filter FullyQualifiedName~OpenClaw.Shared.Tests.MarkdownParserFuzzTests.Build_ManyListItems_ScalingCurve --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type none: 1 passed, 0 failed/skipped.dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore --filter FullyQualifiedName~OpenClaw.Connection.Tests.GatewayConnectionManagerTests.ConnectAndReconnect_EmitCompletedOperatorSpans --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type none: 1 passed, 0 failed/skipped, 560 ms.These focused results show timing sensitivity but do not establish deterministic causality or erase the full-suite failures. The four prerequisite fixtures launch a child PowerShell with an AMD64 environment override, but its actual output still reports ARM64 and skips the expected x64 resolver check. The prerequisite test and
build.ps1are unchanged from the main comparison base; the real host's prerequisite check and final build pass. No prerequisite installation or unrelated test fix was attempted.A controlled run of the entire Shared suite using the documented xUnit setting
-- xUnit.ParallelizeTestCollections=falsepassed: 4,649 passed, zero failed, 25 ordinary skips. The scaling assertion and its 500 ms limit were unchanged; the measured 30k case was 241 ms. This is serialized-collection evidence, not a replacement for the failed ordinary parallel run.One full ordinary-parallel Shared run on the untouched comparison base
e5122db3independently reproduced the same scaling failure at 798 ms: 4,642 passed, 2 failed, 25 skipped. Its other failure wasExecApprovalsCoordinatorTests.ApprovedMultilinePowerShell_ReachesRunnerVerbatim(prompt: True, unsupportedWindows: True), which did not fail in the current-head run. One focused baseline run reproduced all four prerequisite-fixture failures, each reporting actual ARM64 architecture. These are direct baseline observations, not just unchanged-file attribution; they do not establish the cause of workload-sensitive timing differences. No baseline test was repaired or rerun to obtain a preferred result. The detached baseline checkout, logs, and TRX reports are retained locally.Preserved failures: the pre-fix stale-runtime regression failed as expected. An interim focused Tray build failed with MSB3027 while another task-owned test host held its binaries; that is not a successful validation result. CI run 40036790081 for
60af7868failed when the native UI host stalled before application bootstrap and its five-minute hang watchdog aborted the run. No unrelated tests were weakened or filtered to conceal these failures. The final hosted run passed all required lanes.Real Behavior Proof
pr1626. The Store Gateway and pre-existing other-task WSL distro were not selected for mutation.67a30565d8b59694f0cb6105f2ccd396d1e558d9, clean committed worktree.SetupAndConnectTestsselection withOPENCLAW_E2E_GATEWAY_VERSION=2026.10.6; strict containment used.\scripts\validate-mxc-e2e.ps1 -NoBuild -RuntimeIdentifier win-arm64without-AllowSkip.Passed! - Failed: 0, Passed: 161, Skipped: 0, Total: 161; visible capture output:Passed! - Failed: 0, Passed: 3, Skipped: 0, Total: 3; real WSL selection:Total tests: 26, Passed: 26; strict MXC selection:Total tests: 18, Passed: 18. The WSL selection includes support tests as well as live scenarios, not 26 independent end-to-end flows.Yes/No/N/A): N/A for public screenshot links. Current-head screenshots, TRX reports, and source/binary manifests are retained locally, not uploaded or presented as public links. The Light/Dark Ready and failed-cleanup captures were opened and inspected. Linked CI run identities were verified through GitHub.Isolated native runtime attempt, provenance, and cleanup
Native provenance: family
OpenClawFoundation.OpenClawGateway-pr1626_rfcbke2p71se2, ARM64 Gateway 2026.10.6 commitfe06181dc5ecc01cf8904abbfc26925925efefbc, published packaging tagv2026.10.6-msix.0atd0d4e73c5ed9ed312e800890302955d63d353ac7, released archive SHA-256cd4a2e77ca1e0e92d08df0c86001cf25c2d348d8375064d779ef188c691d1315. This was a side-by-side development package from released payload bytes, not a signed installer upgrade.Native proof used a session-only console harness referencing current SetupEngine/Connection and directly linking the production package resolver/setup host. Its build command was
dotnet build "$nativeProofRoot\Harness\Harness.csproj" -p:BuildProjectReferences=false --verbosity quiet(passed with zero warnings/errors). Invocation: setOPENCLAW_NATIVE_GATEWAY_DEV_PATCH=pr1626, thendotnet "$nativeProofRoot\Harness\bin\Debug\net10.0-windows10.0.26100.0\OpenClaw.SetupEngine.UI.dll" --package-ready OpenClawFoundation.OpenClawGateway-pr1626_rfcbke2p71se2. The one retry setOPENCLAW_NATIVE_GATEWAY_START_TIMEOUT=600.$nativeProofRootis the privatenative-runtimeartifact directory. This is production API/source-linked proof, not a completed installed-Companion onboarding flow.The initial failure was acknowledged
gateway-service start --jsonfollowed by readiness timeout. The retry failedconfig validate --jsonbefore startup or pairing. The seven timeout/command-owner files are byte-identical to the comparison base; the added caller progress reports were null and did not execute in this harness. There was no baseline runtime A/B run, so this does not establish either host contention or a pre-existing runtime failure. The missing positive path remains a blocker.Cleanup verified: exact
pr1626package teardown removed its isolated session, Gateway records, and guest profile; package registration is absent and all five surviving candidate process IDs disappeared. Cached build payloads remain. Read-only status confirmed the original Store Gateway is still running. The original other-task WSL distro and tracked PR source remain unchanged.Security Impact
Yes/No): No.Yes/No): Yes, authority checks bind completion to the persisted signing identity and prevent identity regeneration/relabeling during verification. No new credential format or exported secret is introduced.Yes/No): Yes, the completion flow verifies through the selected existing authenticated Gateway connection and model path; no new public endpoint is added.Yes/No): Yes, setup completion and restart ordering are changed, using existing bounded managed Gateway commands and a protected restart handoff. No new node command or arbitrary command input is added.Yes/No): No.Yes, explain the risk and mitigation: exact Gateway/endpoint/identity/session/model checks are repeated at admission and consumption; unknown write outcomes require reconciliation instead of replay; UI copy and diagnostics show only safe classifications, never raw sensitive exception content.Compatibility and Migration
Yes/No): Yes for the tested receipt contracts. No signed installer/upgrade execution is claimed.Yes/No): Yes, preparation-v2 binds its execution deadline at issuance and derives its allowance from supported startup timing. No manual user configuration edit is required.Yes/No): No manual migration. Destination and preparation-v1 admission behavior and valid legacy execution deadlines remain supported.Review Conversations
No inline review comments were returned by the GitHub review-comment API at this closeout. The findings above came from local independent reviews, not posted GitHub review threads.