Repository navigation
fix(setup): give native Gateway Store install a 30-minute budget with elapsed-minute wait status - #1750
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 maintainer review before merge. What this changesExtends native Gateway acquisition to 30 minutes, adds an environment override, and displays localized elapsed-minute installation status. Example: Microsoft Store installation runs from 15:46:59 until 16:02:47.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR addresses a confirmed timeout still present on main; both earlier findings are fixed, and no new actionable code defect was found. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe native setup page delegates Store acquisition to the existing acquisition and installer owners, then proceeds only after current-user package registration and execution aliases are verified. flowchart TD
A[Native setup page] --> B[Package acquisition deadline]
B --> C[WinGet installer]
C --> D[Microsoft Store deployment]
C --> E[Package registration verification]
E --> F[Gateway setup continuation]
A --> G[Localized elapsed-minute status]
Technical reviewBest possible solution: Retain one bounded acquisition owner, visible waiting feedback, verified registration before continuation, and actionable in-product Retry and cancellation. Do we have a high-confidence way to reproduce the issue? Current-main acquisition and installer limits reproduce the reported failure path whenever Store deployment exceeds five minutes; the linked ARM64 report supplies a concrete affected version and deployment timeline, but this review ran no target code. Is this the best way to solve the issue? The smallest complete fix fits the existing acquisition, installer, and page owners, preserves the single-attempt and cancellation invariants, and avoids parsing WinGet output or introducing a second installation path. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 4cbbe51c45a7. Provenance checked
TestingProof path: unit tests only. SecurityNone. EvidenceWhat 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 (1 earlier review cycle)
Reviewed October 30, 2026, 2:20 AM ET / 06:20 UTC (Revision 2). |
A cold Microsoft Store deployment can outlive the previous 5-minute acquisition deadline, so Companion marked package acquisition as needing attention while WinGet was still running and required a retry. Raise the shared deadline to 30 minutes via NativeGatewayPackageAcquisition.DefaultTimeout, shared by EnsureAsync and the WinGet/WinGet-repair command timeouts. Override it with OPENCLAW_SETUP_PACKAGE_ACQUISITION_TIMEOUT (seconds, 1-2147483); an explicit EnsureAsync timeout argument still wins and invalid values warn and keep the default. Cancellation still reaches CommandRunner and stops the WinGet process tree. While the install runs, NativeGatewaySetupPage now shows localized waiting progress (elapsed minutes) after the first 30 seconds in all six locales, and ARCHITECTURE.md/SETUP_ENGINE_REDESIGN.md document the new bound. Validation: build.ps1 all green; SetupEngine 2340 passed, Tray 4083 passed, Shared 4313 passed.
…timeout tests Address review on openclaw#1750: put the acquisition-timeout tests in the nonparallel EnvironmentVariableCollection so installer tests cannot observe a temporary override, add a localized minute unit to the waiting status (updated once per minute after the first minute instead of every 30 seconds, so no 0-minute message appears), remove the stray /data> text node from all six resw files, drop the deadline test that also passed with the old 5-minute bound, and pin both with contract tests.
Rubber-duck review on openclaw#1750: format the waiting status through SetupLocalization.Format so a malformed translation cannot fault the pump and fail a successful install; restore the EnsureAsync XML doc that the ResolveTimeout doc displaced; derive the invalid-override warning's minutes from DefaultTimeout; bound the explicit-timeout precedence test so an environment-wins regression fails in 10 s instead of passing after 300 s; rename the override test to what it asserts.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Hanselman re-reviewVerdict: no new defect or blocking production issue found in Pedro's latest update. Two non-blocking findings from the earlier review remain. Reviewed head: This was a delta review of the three changed files, their affected callers and tests, and the earlier unresolved/disputed findings. It was not a second full-PR review. Independent reviewers: Both models agree: HIGH consensusConsensus measures agreement that an issue exists, not agreement on its severity.
Only one model flagged: LOW consensusNone in this review round. The test issue was reproduced on this exact remote head: $env:OPENCLAW_REPO_ROOT = (Get-Location).Path
$env:OPENCLAW_SETUP_PACKAGE_ACQUISITION_TIMEOUT = '90'
dotnet test .\tests\OpenClaw.SetupEngine.Tests\OpenClaw.SetupEngine.Tests.csproj --filter 'FullyQualifiedName~Install_UsesCurrentUserWinGetAndAllowsUpgradeExactlyOnce|FullyQualifiedName~PinnedCertificateMismatch_RepairsLatestWinGetAndRetriesOnce' --logger 'console;verbosity=normal'Result: 3 failed, 0 passed. Every failure reports expected The small fix is to serialize environment-mutating installer tests, clear and restore the override around default assertions, retain independent default expectations, and cover override propagation through install/repair/retry. The guide should document the 30-minute default and seconds-based override. Resolved and rejected findings
Proof boundaryThe exact-head CI Gate, setup/connect E2E, tray/setup/integration lane, and UI/functional/accessibility lane were successful when checked. These do not replace visible proof of the changed elapsed-minute state or a real cold Microsoft Store installation lasting more than five minutes. Those behavior proofs remain unverified. The fixes and fresh validation results follow. Appended maintainer fixesPushed dd1a78558654138e985ff389fb2561330c7ac867 on top of the reviewed author head, without rewriting the contributor's commits.
Validation ran on the source tree committed above:
The 15 cleanup-worker failures match the earlier host execution-policy blocker. No execution policy was weakened or changed, and no unrelated test was disabled. The full SetupEngine suite is not clean on this host. Both verified review findings are fixed. The dual-model verdict above applies to |
Co-authored-by: Copilot App <[email protected]>
Related: #1756
What Problem This Solves
Fixes: native onboarding marks "Install or verify Gateway package" as needing attention, and requires a retry, while a cold Microsoft Store deployment is still running past 5 minutes.
User Impact
User impact: a first-time native Gateway install from Microsoft Store now gets 30 minutes before setup gives up, and the package step shows "Still installing the Gateway from Microsoft Store... (N min elapsed)" once per minute instead of one static message. Operators can change the bound with
OPENCLAW_SETUP_PACKAGE_ACQUISITION_TIMEOUT(seconds).Why This Change Was Made
The observed #1756 timeline (WinGet started Store at 15:46:59, AppX registered at 15:53:55, Store completed at 16:02:47) outlives the previous 5-minute deadline. One budget now has one owner:
NativeGatewayPackageAcquisition.DefaultTimeout(30 minutes) boundsEnsureAsyncand bothNativeGatewayMsixInstallercommand timeouts (WinGet install and WinGet repair). It replaces the privateNativeGatewayMsixInstaller.CommandTimeout.OPENCLAW_SETUP_PACKAGE_ACQUISITION_TIMEOUToverrides it in seconds (1-2147483). Any other value logs a warning and keeps the default. An explicitEnsureAsynctimeout argument still wins.CommandRunnerand stops the WinGet process tree; Windows may still finish a submitted deployment.NativeGatewaySetupPage.InstallAsyncupdates a localized waiting status every minute (all six locales, with a minute unit). It formats throughSetupLocalization.Format, so a malformed translation falls back to the template instead of failing the install. No WinGet stdout parsing, no second installer launch, no background resume.ARCHITECTURE.mdandSETUP_ENGINE_REDESIGN.mddescribe the default, the override and precedence.Preserved invariant: install at most once per attempt, cancellation kills WinGet, registration polling starts only after the installer returns. PR openclaw/openclaw#1741 (the 5s -> 30s pre-pairing HTTP probe) is intentionally left alone.
Review fixes since the first revision
NativeGatewayPackageAcquisitionTestsjoined the non-parallelEnvironmentVariableCollection, so installer tests cannot observe a temporary override.NativeGatewaySetupUxContractTestschecks the unit per locale.EnsureAsync_UnsetEnvironment_Uses30MinuteDeadline(it also passed with the old 5-minute bound)./data>text node removed from all six.reswfiles.SetupLocalization.Format; theEnsureAsyncXML doc is back onEnsureAsync; the invalid-override warning derives its minutes fromDefaultTimeout;EnsureAsync_ExplicitTimeoutStillWinsOverEnvironmentis bounded to 10 s so an environment-wins regression fails instead of passing after 300 s; the override test is renamed toTimeout_EnvironmentOverride_IsUsedOnlyForValidValuesbecause it does not assert the warning.Evidence
Automated, on head
b22a3cc7:EnsureAsync_ExplicitTimeoutStillWinsOverEnvironment: explicit 50 ms timeout with the variable set to 300 throws the acquisitionTimeoutExceptionwith retry guidance. Mutation check: forcingResolveTimeout()to win makes it fail in 10 s.Timeout_EnvironmentOverride_IsUsedOnlyForValidValues:90is used;0,not-a-numberand2147484keep the 30-minute default.DefaultTimeoutat the install, repair and retry command sites.NativeGatewaySetupUxContractTests: every.reswwaiting string containsMicrosoft Store,{0}and its locale's minute unit.Change Type
Scope
winnodeRequired proof pools
windows-winui-interactive: the native onboarding package-step status text and its localized strings changed.Validation
Local, Windows ARM64, head
b22a3cc7:./build.ps1: all builds succeeded (Shared, Cli, WinNodeCli, SetupEngine, WinUI); documentation validation passed.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 4808 passed, 24 skipped, 0 failed.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 4754 passed, 0 failed.dotnet test ./tests/OpenClaw.SetupEngine.Tests/OpenClaw.SetupEngine.Tests.csproj --no-restore: 2490 passed, 1 skipped, 0 failed.OPENCLAW_REPO_ROOTset to the worktree. Without it, 5 MXC test-host and 3 artwork source-contract tests fail on path discovery; none touch this change.CI on the previous head
b410e096: every executed job passed except "UI, functional, and accessibility tests", where the test host crashed during Windows App SDK bootstrap inVoiceServiceProgressRoutingTests/WorkspaceSessionLayoutTests(not touched here). New CI forb22a3cc7is pending.Real Behavior Proof
b22a3cc7.windows-winui-interactivescreenshot of the waiting status: the first update needs a minute of real WinGet runtime. Feasible next step: on a machine without the package, setOPENCLAW_SETUP_PACKAGE_ACQUISITION_TIMEOUT=150, run native setup, capture "1 min" / "2 min" updates, then confirm the timeout, Retry, and no remainingwinget.exe.Security Impact
Yes, explain the risk and mitigation:Compatibility and Migration
OPENCLAW_SETUP_PACKAGE_ACQUISITION_TIMEOUT(seconds); unset keeps the new 30-minute default.Review Conversations