Repository navigation
fix(ci): Tray UI tests fail intermittently and the step times out on passing runs - #2130
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 changesThis PR replaces timing-sensitive UI test observations with bounded state checks, delays test-only accessibility readiness, and raises the CI step timeout. Example: Dashboard resizing posts a delayed render for an 820-DIP viewport.
Review scores
ProductKind: Bug fix · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this maintainer-authored PR contains useful CI reliability fixes that remain absent from main; no actionable introduced defect was found. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe Windows UI CI lane runs mounted WinUI tests and real-process accessibility scans; app-owned readiness signals and bounded test observations determine when assertions begin. flowchart TD
A[GitHub Actions UI lane] --> B[Native UI tests]
B --> C[Mounted WinUI controls]
A --> D[Accessibility fixture]
D --> E[SettingsShellView]
E --> F[Loaded and idle transitions]
F --> G[Readiness acknowledgement]
G --> D
Technical reviewBest possible solution: Keep readiness in SettingsShellView and use bounded observations in the existing tests while retaining behavioral assertions and the per-test hang guard. Do we have a high-confidence way to reproduce the issue? Source confirms premature Settings acknowledgement and stale-layout acceptance; the body supplies targeted before/after reproductions, while this read-only review executed no builds or tests. Is this the best way to solve the issue? The patch uses existing owners and bounded waits for the asserted state, preserves assertions, and documents uncertainty instead of claiming the draft-loss mechanism is solved. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 96f3b25fed85. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Preflight sourceSource unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified. Review metrics
LabelsLabel changes:
Label justifications:
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 Reviewed November 12, 2026, 4:14 PM ET / 21:14 UTC. |
cc29828 to
f8d0b68
Compare
…passing runs Wait for observable state instead of fixed settle counts or one-shot lookups in the flaky Tray UI tests, and fix the root causes found while reproducing them: - Dashboards: require the hero column to be rendered for the target width (stale posted render reproduced: 196 = 820-64-560), wait for the replaced gallery to be laid out after an agent switch, and give the second widget a distinct sandbox URL so Chromium's cache lock does not hold its request for 20 s. - Accessibility readiness: Settings pages publish the test-only page-ready signal once, after Loaded and after expand storyboards stop (was written before the page loaded by WorkspaceWindow.RenderSettings). - Systems rows wait for expand storyboards to stop; Workspace waits for Inbox and history-button state; the question proof waits for the composer view model and visibility instead of fixed cycles and records lifecycle diagnostics. - NextCompositionAsync and the native theme surface use the named render-wait budget instead of an unnamed 2 s literal, and report slow or missing frames. - Raise the Tray UI step budget from 15 to 25 minutes (passing runs take 13-15). Co-authored-by: Copilot App <[email protected]>
f8d0b68 to
3226d86
Compare
What Problem This Solves
Fixes: the "UI, functional, and accessibility tests" CI job fails intermittently in the Tray UI and accessibility tests, and the "Run Tray UI Tests" step is killed by its 15-minute limit on runs where every test passed.
User Impact
User impact: no user-visible change. Contributors should see fewer reruns on
mainand on PRs. One product change applies only when the test-onlyOPENCLAW_ACCESSIBILITY_NAVIGATION_SIGNALvariable is set.Why This Change Was Made
Each failure was traced from CI logs to a cause. Where possible, the fix was proven with a deterministic local reproduction. Tests now wait for the state they assert, with existing bounded waits. The changes add no retries, no sleeps, no fixed settle counts and no skips, and they keep every assertion.
DashboardWidgetCellTests.HeroResizing…/ResponsivePage…(520):Assert.InRange, Actual 196 / 40HeroMatchesColumnrequires the column to be rendered for the target width. This also covers 3 passing tests that use the same check.DashboardWidgetCellTests.ConnectionChange…(completed: False): "relay boundary did not settle" after 30 sDashboardWidgetCellTests.ActiveSearch…(switchAgent: True):Assert.Trueon search sizeAccessibilityScanTests(About):BoundingRectangleSizeReasonableon a captionWorkspaceWindow.RenderSettingswrote the page-ready signal right afterFrame.Navigate, before the page loaded.SettingsShellViewis now the only writer. It publishes afterLoaded, then waits for expand storyboards to stop, bounded byOPENCLAW_ACCESSIBILITY_READY_SETTLE_MS(default 5 s). On timeout it publishes nothing, so the test fails cleanly.NativeSharedFlowTests.NativeInstall…(main 0bd9348) andMinimumWindow…(local suite run):TimeoutExceptioninNextCompositionAsyncOPENCLAW_UI_RENDER_WAIT_TIMEOUT_SECONDS) and logs slow or missing frames. The theme-surface helper no longer waits for frames it does not need.SystemsPageProofTests.InventoryRows…(expanded: True): "Expanded contents stay inside their own bordered row."ExpandStatesstoryboard could still be running.WorkspaceWindowProofTests.NativePagesAndOwnerLinks…: missingWorkspaceNavigation,WorkspaceForward; Inbox empty-state timeoutWorkspaceNavigationwas already fixed by #2117 (improve(chat): refine composer sizing and context controls).ReactorQuestionProofTests.ProductionRoot…: composerVisible, expectedCollapsedReactorQuestionProofTests.ProductionRoot…: draft""after a fixed 5-cycle settletimeout-minutesto 25. The per-test 300 s hang guard is unchanged.SettingsChrome_SearchAndBidirectionalHistory…: both CI signatures (SearchBox()!NRE and the rawSettingsSearchlookup) are already fixed onmain(#2125 (fix: Dashboard loses the selected chat on newer Gateways) and the retained-observation helper). This PR does not change that test. CronCronPageMarkerfailures were a branch-only bug, fixed in the #1893 squash.ForgetConfirmation…was fixed by #2115.Evidence
Post, the test fails with exactly CI'sActual: 196. With the new check it passes.WorkspaceWindowProofTestsandDashboardWidgetCellTestsclasses, allAccessibilityScanTests, plus the focused tests.NativeSharedFlowTestspassed 5 consecutive rounds of 28 tests on the final head.SessionsHubRegressionTests.ResponsiveLayout….main3d5f142, so this PR did not cause it. CI pins its desktop.MinimumWindowfailure that this head fixes.Textwrite and the deferredTextChangeddoes not overwrite the edit. A minimal controlledTextBoxexperiment showed this.TextBoxhad no stale echo-suppression token in 30 traced runs.ClearDraftIfUnchanged.ReactorToolActivityProofTests) all passed.Change Type
Scope
winnodeRequired proof pools
none: there is no visible product change. The only product change is the test-only accessibility readiness signal, which this PR's native test runs exercise directly. CI's UI job is the authoritative proof.Validation
All commands ran in the task worktree.
f33f6c4a, identical to the final head for every non-UI-test file):./build.ps1: all builds succeeded.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 5,847 passed, 29 skipped, 0 failed.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 6,347 passed, 0 failed.pwsh scripts/test-ci-workflow-contract.ps1: passed.dotnet build tests/OpenClaw.Tray.UITests -c Debug -r win-x64: 0 errors.dotnet test tests/OpenClaw.Tray.UITests --no-build --filter "<changed tests>", 5 consecutive rounds of 168 passed, 0 failed (diff hashf33f6c4a).dotnet test tests/OpenClaw.Tray.UITests --no-build --filter "FullyQualifiedName~NativeSharedFlowTests": 5 consecutive rounds of 28 passed, 0 failed (final head).dotnet test tests/OpenClaw.Tray.UITests --no-build --filter "Category!=Accessibility&Category!=NativeOnboardingProof&Category!=GatewayFixture&Category!=ProductionResources&Category!=AnimationPreferenceEnabled&Category!=AnimationPreferenceDisabled"withOPENCLAW_UI_TEST_RESOURCE_PROFILE=Standard, on the final head: 1,369 passed, 9 skipped, 4 failed. All 4 are the host-DPI SessionsHub case, which fails the same way onmain.OPENCLAW_TRAY_DATA_DIR,OPENCLAW_TRAY_APPDATA_DIRandOPENCLAW_TRAY_LOCALAPPDATA_DIRfolders. The real%APPDATA%and%LOCALAPPDATA%\OpenClawTraymetadata manifests were unchanged after every run.Loaded. Both are fixed and confirmed resolved by both reviewers.NextCompositionAsynccallers now share the named budget, and the production Gateway's sandbox URL shape was not verified.Real Behavior Proof
cc2982831(diff hash09f43454equals the validated working tree on base3d5f1427)Actual: 196, new check passed. ConnectionChange: second sandbox request 20.0 s late with the shared URL, total 7.8 s with distinct URLs. 5 consecutive passing rounds for every changed test.main.Yes/No/N/A) N/AReactorQuestionProofTestsdraft-loss mechanism was not reproduced or proven.NextCompositionAsynctimeouts is not proven.Security Impact
Yes/No) NoYes/No) NoYes/No) NoYes/No) NoYes/No) NoYes, explain the risk and mitigation:Compatibility and Migration
Yes/No) YesYes/No) Yes. There is a new optional test-onlyOPENCLAW_ACCESSIBILITY_READY_SETTLE_MS, and the CI step timeout is now 25 minutes.Yes/No) NoReview Conversations