Skip to content

fix(onboarding): finish setup before showing AI as ready - #1626

Merged
karkarl merged 14 commits into
mainfrom
bkudiess-onboarding-readiness
Oct 26, 2026
Merged

karkarl merged 14 commits into
mainfrom
bkudiess-onboarding-readiness

Conversation

@bkudiess

@bkudiess bkudiess commented Oct 3, 2026 •

Copy link
Copy Markdown
Collaborator

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 e5122db3c9433f6281025f4149420183f94c71f1 in c80d862f, preserving main's native startup diagnostics and configurable startup allowance. Current pushed head: 67a30565d8b59694f0cb6105f2ccd396d1e558d9.

Evidence

  • Final-head CI: Build and Test run 40038479850 passed, including the required CI Gate, core/CLI, Tray/setup/integration, UI/accessibility, setup/connect, revocation, network recovery, x64 publish smoke, and unsigned x64/ARM64 MSIX lanes. Its PR head is 67a30565; the tested synthetic merge with main is d0e2ed2f27bc8258bfbffdce790cd1468dfbeeda. Release-only conditional jobs were skipped as expected, not reported as executed proof.
  • Local dual-model Hanselman review completed on the final head with no remaining material source finding. Independent source/proof-plan review does not replace the runtime gates below.
  • The stale-runtime race has a deterministic regression: it failed before the fix with the reported terminal-state exception, then passed after refreshing the snapshot.
  • Real-wire fixture tests distinguish config.changed from 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.
  • Current-head visible proof: 3 passed, zero failed/skipped. The developer launched the frozen runner from foreground PowerShell; Light/Dark Ready, disabled choices, minimum-size viewports, and the actual failed-cleanup Close were captured. The Ready Light/Dark and failed-cleanup screenshots were visually inspected.
  • Real WSL Gateway 2026.10.6 setup/connect/recovery selection: 26 passed, zero failed/skipped. Strict real Gateway-to-Windows-node MXC selection: 18 passed, zero failed/skipped, including all three required containment proofs.
  • A separately registered ARM64 native Gateway patch reached a verified owned listener and correctly refused unverified completion. Later startup and configuration-validation timeouts prevented operator pairing, inference, successful verified completion, and recovery proof. These are not reported as passes.
Hanselman findings, dispositions, and fix confidence

The original full review used head c80d862f against main e5122db3. Both models reviewed the fix delta at 60af7868, then the final delta 60af7868..67a30565.

Actual models: claude-opus-5.5 (default context, high reasoning) and gpt-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

Issue Opus 5.5 GPT-6 Astra Disposition Supporting evidence
In-memory WSL uncertainty is lost across Companion recreation LOW MEDIUM Removed the optimization and retained confirmed restart reconciliation; regression recreates the coordinator after an indeterminate restart. Regression coverage and both final source reviews; managed GPU route proof remains open.

Only one model flagged: LOW consensus

Issue Opus 5.5 GPT-6 Astra Disposition Supporting evidence
WSL withdrawal restarts when saved configuration is empty HIGH not flagged Disputed performance finding. Empty saved configuration cannot prove absence of a running route. Both final reviewers accepted retaining the fail-closed restart. Conservative safety policy preserved; restart/reconnect cost is explicit. Managed route runtime proof remains open.
Retry launches a second process after shutdown scheduling fails LOW not flagged Fixed by recording committed publication and hiding unsafe retry. Precommit failures remain retryable. Regression coverage and final source review.
Failed Back cleanup leaves no action LOW not flagged Fixed with Close, exercised through the actual failed-return path. Native assertions plus current-head visible capture.
Completed Stopped/NotInstalled startup waits the full recovery budget LOW not flagged Fixed with prompt terminal rejection after owned recovery inspection. Focused recovery regression coverage and final source review.
Ready misses the actual configuration wire event not flagged MEDIUM Fixed with a dedicated configuration-change event and live-client lifecycle subscription. Real client wire-event tests and native UI lifecycle assertions.
Finishing loses phase guidance and safe diagnostics not flagged MEDIUM Fixed with shared localized classification and exception-type/phase-only logging. Classification/localization coverage and final source review.
Unrelated metadata incorrectly withdraws Ready MEDIUM not flagged Fixed by keeping broad catalog signals separate from the exact configuration event. Real client metadata tests preserve the page and request count.
Terminal decision uses a pre-completion runtime snapshot not flagged MEDIUM Fixed with a fresh snapshot; deterministic before/after regression. The same deterministic case failed before the fix and passed afterward.

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 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-upgrade was 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, $proofRoot is the private session artifact directory. The visual runner additionally pins the head and verifies source/binary freeze manifests. The real WSL runner sets OPENCLAW_RUN_E2E=1, OPENCLAW_RUN_OLLAMA_E2E=1, and OPENCLAW_E2E_GATEWAY_VERSION=2026.10.6, with separate fixture-owned data.

Exact command Result and source
.\build.ps1 Passed on clean final head, including WinUI.
dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type none Failed: 4,648 passed, 1 failed, 25 skipped. The unchanged Markdown scaling case measured 614 ms in the earlier run and 603 ms in the repeated full run against its 500 ms limit.
dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type none Failed: 4,556 passed, 4 failed, 0 skipped. All failures are the unchanged ARM64-host prerequisite fixture cases in BuildPrerequisiteTests.CheckOnly_UsesTheAppLocalRuntimeResolver.
dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --no-restore --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type none Passed: 2,477 passed, 0 failed, 1 skipped.
dotnet test .\tests\OpenClaw.Connection.Tests\OpenClaw.Connection.Tests.csproj --no-restore --blame-hang --blame-hang-timeout 5m --blame-hang-dump-type none Repeated full suite passed: 1,694 passed, 0 failed, 1 skipped. The earlier full run failed the unchanged ConnectAndReconnect_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 none Final head: 161 passed, 0 failed, 0 skipped in 1m39s. Native ARM64 WinUI and setup UI compiled successfully.
dotnet 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 none Developer-initiated foreground run: 3 passed, 0 failed, 0 skipped. Current-head captures and freeze manifests retained. The filter separator is a literal pipe; Markdown escapes it only for this table.
dotnet 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 Real WSL Gateway selection: 26 passed, 0 failed, 0 skipped. Fixture teardown preserved the original distro inventory.
.\scripts\validate-mxc-e2e.ps1 -NoBuild -RuntimeIdentifier win-arm64 Passed: 18 passed, 0 failed, 0 skipped. No -AllowSkip; all three required named proofs passed.
.\scripts\validate-docs.ps1 Passed: 66 Markdown files, seven pool contracts, and documentation-flow regression on final-source content.
git -c core.whitespace=cr-at-eol diff --check Passed. CRLF-aware check avoids misclassifying inherited line endings.

The 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.ps1 are 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=false passed: 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 e5122db3 independently reproduced the same scaling failure at 798 ms: 4,642 passed, 2 failed, 25 skipped. Its other failure was ExecApprovalsCoordinatorTests.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 60af7868 failed 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

  • Environment tested: Windows ARM64 Adreno desktop, .NET 10, native WinUI test host with isolated data and synthetic Gateway; separate real WSL Gateway 2026.10.6 fixtures; separate development native Gateway patch pr1626. The Store Gateway and pre-existing other-task WSL distro were not selected for mutation.
  • PR head or commit tested: 67a30565d8b59694f0cb6105f2ccd396d1e558d9, clean committed worktree.
  • Exact steps or command run: the native test command in Validation exercises actual setup completion, Ready admission, real client configuration events, unrelated usage metadata, and failed native cleanup/Close. The session-only pinned visual runner selected three existing native proof cases. Real WSL used the existing SetupAndConnectTests selection with OPENCLAW_E2E_GATEWAY_VERSION=2026.10.6; strict containment used .\scripts\validate-mxc-e2e.ps1 -NoBuild -RuntimeIdentifier win-arm64 without -AllowSkip.
  • Evidence after fix: native regression output: 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.
  • Observed result: actual client and WinUI assertions verify precise configuration invalidation and safe Close. Current-head screenshots show Light/Dark Ready and the actual failed-cleanup Close. Real WSL scenarios cover setup/pairing, restart/reconnect, credential/approval behavior, and safe node invocation. Strict MXC confirms a verified listener, real sandboxed execution, and rejected writes to protected tray data. Both WSL fixtures tore down their own distro; only the original other-task distro remained.
  • Screenshot or artifact links verified? (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.
  • Not verified or blocked: successful real native pairing/model verification/completion and recovery; product-managed NVIDIA Local AI routing, recovery, Ready latency, and inference. The native patch initially started with verified ownership and refused unverified completion, but its subsequent startup exceeded 180 seconds. A second attempt using the supported 600-second startup allowance instead exceeded the separate 120-second configuration-validation timeout. No inference binary/model was downloaded or executed, and no CPU/custom-provider result is substituted for managed GPU proof. Earlier foreground failures remain recorded; the successful current-head captures came from a developer-initiated foreground run. Historical RTXspark2 screenshots are not current-head evidence.
Isolated native runtime attempt, provenance, and cleanup

Native provenance: family OpenClawFoundation.OpenClawGateway-pr1626_rfcbke2p71se2, ARM64 Gateway 2026.10.6 commit fe06181dc5ecc01cf8904abbfc26925925efefbc, published packaging tag v2026.10.6-msix.0 at d0d4e73c5ed9ed312e800890302955d63d353ac7, released archive SHA-256 cd4a2e77ca1e0e92d08df0c86001cf25c2d348d8375064d779ef188c691d1315. 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: set OPENCLAW_NATIVE_GATEWAY_DEV_PATCH=pr1626, then dotnet "$nativeProofRoot\Harness\bin\Debug\net10.0-windows10.0.26100.0\OpenClaw.SetupEngine.UI.dll" --package-ready OpenClawFoundation.OpenClawGateway-pr1626_rfcbke2p71se2. The one retry set OPENCLAW_NATIVE_GATEWAY_START_TIMEOUT=600. $nativeProofRoot is the private native-runtime artifact directory. This is production API/source-linked proof, not a completed installed-Companion onboarding flow.

The initial failure was acknowledged gateway-service start --json followed by readiness timeout. The retry failed config validate --json before 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 pr1626 package 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

  • New permissions or capabilities? (Yes/No): No.
  • Secrets or tokens handling changed? (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.
  • New or changed network calls? (Yes/No): Yes, the completion flow verifies through the selected existing authenticated Gateway connection and model path; no new public endpoint is added.
  • Command or tool execution surface changed? (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.
  • Data access scope changed? (Yes/No): No.
  • If any answer is 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

  • Backward compatible? (Yes/No): Yes for the tested receipt contracts. No signed installer/upgrade execution is claimed.
  • Config or environment changes? (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.
  • Migration needed? (Yes/No): No manual migration. Destination and preparation-v1 admission behavior and valid legacy execution deadlines remain supported.
  • If yes, list the exact upgrade steps: N/A. No installer or manual migration change.

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.

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.

@clawsweeper

clawsweeper Bot commented Oct 3, 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.

@clawsweeper clawsweeper Bot added P2 Normal priority bug or improvement with limited blast radius. 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. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. labels Oct 3, 2026
@clawsweeper

clawsweeper Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Codex review: needs real behavior proof before merge.

What this changes

This 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.

  • Before: The Ready chooser appears before finalization and post-restart verification finish.
  • After: Finishing setup remains visible until the restarted connection and selected model pass verification.

Review scores

Measure Result What it means
Overall readiness 🦪 silver shellfish (2/6) Useful readiness repair with meaningful owner-level tests, but final authority and receipt compatibility remain unproven and the ownership ledger is stale.
Proof confidence 🦪 silver shellfish (2/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Setup can announce that AI is ready before setup finalization and the restarted Gateway/model route are usable.
Reason: The contradictory readiness state has concrete user impact, and the maintainer-authored direction and recorded maintainer involvement establish approval for finishing setup before Ready.

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
Reviewed head: 9c3503a66990c99cc220d3c86adca8a423fd954b

Before merge

  • Add real behavior proof - Authority-chain proof required: inspected earlier-head screenshots show failed verification without Ready, subsequent Ready, and a completed Qwen reply; the current-head Windows ARM64 capture shows Connected Chat awaiting its reply. Supply redacted production-path traces of allowed native completion and revoked or reassigned signing identity/session rejection before recovery writes and destination activation, including retained retry; current-head Ready admission, uninterrupted native handoff, stale-dialog interaction, and strict MXC remain unverified. Receipt compatibility additionally needs signed latest-stable-to-candidate and downgrade transitions with settings and pairing intact. Redact credentials, IPs, phone numbers, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Update the ledger for the completion ownership transfer (P3) - This previously reported correction remains unresolved: completion now runs through SetupCompletionPreparation before Ready, while docs/ARCHITECTURE.md rows setup-native-final-choice and setup-native-ai-finalization still name SetupNativeCompletionCoordinator and describe choice-triggered finalization. The root AGENTS.md requires ownership transfers to update the ledger in the same PR. Record the preparation, Ready, and navigation owners and their new invariants so future changes do not restore the superseded ordering.
  • Resolve security concern: Preparation authority survives restart and explicit retry - Identity, route, session, and generation checks are present; supplied fixtures and screenshots do not establish revoked or reassigned authority rejection through recovery writes and final destination activation.
  • Resolve merge risk - Before merge, the PR owner must establish that preparation receipts retained across restart or retry cannot authorize recovery writes or destination activation after signing identity or session authority is revoked or reassigned.
  • Add data-model compatibility proof - The review found that existing stored data may not work after upgrade. Show that existing data still loads and works with this change.

Findings

  • [P3] Update the ledger for the completion ownership transfer — src/OpenClaw.SetupEngine.UI/SetupWindow.xaml.cs:745-750
  • [medium] Preparation authority survives restart and explicit retry — src/OpenClaw.Tray.WinUI/Services/SetupDashboardHandoffStore.cs:44

Tests

  • Low-value test tests/OpenClaw.SetupEngine.Tests/SetupNativeCompletionTimingTests.cs: Remove ModelRecoveryAllowsTwoFullGatewayRestartsAndRuntimeStartup: it schedules synthetic delays rather than exercising either restart owner and duplicates the adjacent budget-composition assertion.
  • Missing end-to-end proof: Supplied proof does not complete current-head readiness admission, native authorization rejection and uninterrupted handoff, stale-dialog recovery, strict MXC, or signed receipt transitions; broad base-fail/head-pass regression evidence is also absent.
Agent review details

How this fits together

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

Technical review

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

  • [P3] Update the ledger for the completion ownership transfer — src/OpenClaw.SetupEngine.UI/SetupWindow.xaml.cs:745-750
    This previously reported correction remains unresolved: completion now runs through SetupCompletionPreparation before Ready, while docs/ARCHITECTURE.md rows setup-native-final-choice and setup-native-ai-finalization still name SetupNativeCompletionCoordinator and describe choice-triggered finalization. The root AGENTS.md requires ownership transfers to update the ledger in the same PR. Record the preparation, Ready, and navigation owners and their new invariants so future changes do not restore the superseded ordering.
    Confidence: 0.99

Overall correctness: patch is correct
Overall confidence: 0.88

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against bef07da01911.

Merge-risk options

Maintainer options:

  1. Establish final-effect rejection (recommended)
    The PR owner supplies production-path evidence for allowed native completion and rejection of revoked or reassigned identity/session authority before recovery writes and destination activation, including retained retry.
  2. Keep landing paused
    Keep this PR open until an authorized native environment can establish the receipt authority boundary.

Provenance checked

  • Completion ordering and ownership changes intended behavior with a stated reason (3eed1f1: The earlier onboarding design verified the model, offered three destinations, and finalized on explicit choice; this PR explains the revised ordering and adds visible completion consent.)
  • Bounded restart execution keeps the original intent (3e6ac76: Separate bounded phases and immutable receipt deadlines prevented premature timeout and renewal; the included WSL recovery changes enlarge the recovery budget while retaining earlier receipt deadlines.)
  • Local AI routing during endpoint changes keeps the original intent (621f410: Endpoint cycles retain the local primary to prevent unintended cloud fallback; confirmed Gateway restart now ensures the running route adopts publication or withdrawal before listener release.)
  • Normal connection-owner readiness keeps the original intent (3d54ce3: The existing fix waits for the authenticated manager and already-admitted recovery before Chat handoff; the broader preparation flow preserves those ownership checks.)

Testing

Proof path: in-process harness.

Security

Needs attention: No reachable authorization bypass was established, but the persisted preparation authority still needs final-effect rejection evidence.

Evidence

Security concerns:

  • [medium] Preparation authority survives restart and explicit retry — src/OpenClaw.Tray.WinUI/Services/SetupDashboardHandoffStore.cs:44
    Identity, route, session, and generation checks are present; supplied fixtures and screenshots do not establish revoked or reassigned authority rejection through recovery writes and final destination activation.
    Confidence: 0.95

What I checked:

  • Verified introduced changes: The pinned main-to-head diff includes the readiness, recovery, receipt, presentation, and supporting test changes; the checkout remains clean. (9c3503a66990)
  • Current-main behavior: Main mounts AiReadyPage before SetupNativeCompletionCoordinator.SelectAsync drains, verifies, finalizes, and publishes the chosen destination. (src/OpenClaw.SetupEngine.UI/SetupWindow.xaml.cs, bef07da01911)
  • Unresolved ownership contract: The architecture ledger still assigns completion to SetupNativeCompletionCoordinator and describes choice-triggered finalization, while the patch uses SetupCompletionPreparation before Ready; the latest prior review already raised this correction. (docs/ARCHITECTURE.md:956, 9c3503a66990)
  • Earlier findings addressed: The gallery now asserts visible, unchecked discovery consent; Ready commit invalidates and hides the stale failure dialog, and duplicate unavailable reports preserve its existing Retry callback. (src/OpenClaw.Tray.WinUI/Services/WindowManager.cs:381, 9c3503a66990)
  • Inspected current-head screenshot: The image shows Owner Connected and the REBASED1626-OK request awaiting a response; it does not show Ready or a completed reply. Prepared local files contained HTML, so the actual image was inspected through the GitHub contents API. (pr1626/rtxspark2-9c3503a6/chat-connected-pending-reply.png, cfd75ad6f1af)
  • Inspected earlier-head screenshots: The three earlier-head images show verification failure without Ready, subsequent Ready for the Qwen model, and Connected Chat returning PR1626-CURRENT-HEAD-OK. (pr1626/rtxspark2-93a7bc5e/chat-reply.png, 072b5b86c1e2)

Likely related people:

  • Karen: Raw commit 7dcbc2f adds src/OpenClaw.Tray.WinUI/Services/LocalAiGatewayLifecycle.cs:66 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 7dcbc2f798a8; files: src/OpenClaw.Tray.WinUI/Services/LocalAiGatewayLifecycle.cs)
  • Joel: Raw commit ccd64bb adds src/OpenClaw.Tray.WinUI/Services/LocalAiGatewayProviderCoordinator.cs:13 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: ccd64bbb7d68; files: src/OpenClaw.Tray.WinUI/Services/LocalAiGatewayProviderCoordinator.cs)

Labels

Label changes:

  • add rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • remove rating: 🦐 gold shrimp: Current PR rating is rating: 🦪 silver shellfish, so this older rating label is no longer current.

Label justifications:

  • P1: Premature Ready affects the first useful onboarding workflow and is supported by a Store report and current-main source.
  • merge-risk: 🚨 compatibility: Persisted preparation receipt fields and execution deadlines change across versions, with signed-package transition compatibility unverified.
  • merge-risk: 🚨 security-boundary: The restart receipt carries identity/session-bound authority into later recovery and navigation, requiring final-effect rejection evidence.
  • rating: 🦪 silver shellfish: Overall readiness is 🦪 silver shellfish; proof is 🦪 silver shellfish and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Add final-effect proof for revoked or reassigned identity/session authority, including retained retry.
  • Demonstrate signed latest-stable-to-candidate and downgrade receipt transitions with settings and pairing preserved.
  • Complete focused Ready, uninterrupted native handoff, stale-dialog recovery, and strict MXC proof.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

History

Review history (11 earlier review cycles; latest 8 shown)
  • reviewed 2026-10-04T02:40:28.986Z sha 7aebcdb :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-04T17:03:54.502Z sha 7aebcdb :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-04T18:52:39.389Z sha 4b764e7 :: needs real behavior proof before merge. :: none
  • reviewed 2026-10-20T22:04:08.157Z sha 8fb9473 :: needs real behavior proof before merge. :: [P2] [P2] Restore the visible default-off catalog consent assertion | [P2] [P2] Bind failure presentation to the handoff that failed | [P2] [P2] Preserve valid receipts issued with the previous execution budget
  • reviewed 2026-10-21T00:41:50.209Z sha 90ea2ba :: needs real behavior proof before merge. :: [P2] [P2] Restore the visible default-off catalog consent assertion | [P2] [P2] Bind failure presentation to the handoff that failed
  • reviewed 2026-10-22T04:24:44.498Z sha 894d27e :: needs real behavior proof before merge. :: [P2] Restore the visible default-off catalog consent assertion | [P2] Bind failure presentation to the handoff that failed | [P3] Update the ledger for the completion ownership transfer
  • reviewed 2026-10-22T07:56:29.988Z sha be86995 :: needs real behavior proof before merge. :: [P2] Restore the visible default-off catalog consent assertion | [P2] Bind failure presentation to the handoff that failed | [P3] Update the ledger for the completion ownership transfer
  • reviewed 2026-10-22T16:18:26.889Z sha 93a7bc5 :: needs real behavior proof before merge. :: [P3] Update the ledger for the completion ownership transfer

Reviewed October 22, 2026, 1:10 PM ET / 17:10 UTC (Revision 12).

@bkudiess bkudiess 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 Oct 3, 2026
@bkudiess

bkudiess commented Oct 4, 2026

Copy link
Copy Markdown
Collaborator Author

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.

@bkudiess
bkudiess force-pushed the bkudiess-onboarding-readiness branch from 4b764e7 to 9c6b030 Compare October 13, 2026 20:50
@bkudiess

Copy link
Copy Markdown
Collaborator Author

Addressed the review against rebased head 9c6b030ada7ce839fb65a0e5bbbd4942f8c98670 without weakening the readiness/authority checks. The PR remains draft.

Review request Result
Current-head validation Full build passed. Local Shared 4,280 passed/35 skipped; Tray 4,045 passed; SetupEngine 2,372 passed/1 skipped; Connection 1,581 passed/1 skipped; selected framework UI 140 passed. Exact commands are in the updated body.
Native allowed completion and revoked/reassigned authority rejection before final effects, including retry Blocked, not resolved. A separately registered test Gateway slot using the official payload rejected setup because Windows 11 build 26300 reports the isolated-session backend unavailable and requires a newer Windows build. No existing Gateway/profile was repurposed.
Visible native restart, Ready and destination navigation Blocked, not resolved. The real native setup could not reach this state. Fixture-backed manager/receipt/window tests are supplemental only.
Signed-package fresh-install/upgrade/downgrade receipt transitions Not verified. The loose development registration is not signed-package transition evidence. No normal package replacement or uninstaller was used.

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 LocalAiApiCredentialStoreTests.ConcurrentCreationConvergesOnOneCredential; that store/test is unchanged from main in this PR and passed both local full Connection runs. I have not suppressed it or claimed it fixed. No review proof requirement has been marked resolved.

@bkudiess bkudiess added the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 14, 2026
@bkudiess bkudiess 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 Oct 14, 2026
@joelagnel

Copy link
Copy Markdown
Collaborator

@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.

joelagnel and others added 4 commits October 22, 2026 12:29
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.
@joelagnel
joelagnel force-pushed the bkudiess-onboarding-readiness branch from 93a7bc5 to 9c3503a Compare October 22, 2026 16:56
@joelagnel

Copy link
Copy Markdown
Collaborator

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

@joelagnel

Copy link
Copy Markdown
Collaborator

@clawsweeper re-review

@clawsweeper

clawsweeper Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

🦞👀
Exact review queued.

Re-review progress:

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. and removed rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 22, 2026
@joelagnel joelagnel removed the status: 🚢 actively landing A maintainer or agent is actively driving this item through implementation, validation, or merge. label Oct 22, 2026
@joelagnel
joelagnel marked this pull request as draft October 22, 2026 20:03
karkarl and others added 5 commits October 23, 2026 13:20
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]>

@karkarl karkarl left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Manually verified

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦪 silver shellfish Thin PR readiness signal; proof, validation, or implementation needs work. 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.

4 participants