Repository navigation
fix(tests): mock Gateway fixture UI tests fail intermittently in CI - #2132
Conversation
Wait on observable UI state instead of one-shot reads: - Automations editor scroll waits for settled geometry, so an external scroll after a schedule change no longer strands the convergence loop. - Automations empty-agent check asserts absence on the first complete UIA traversal while the inventory re-renders. - Sessions toast settles the expanded row and scrolls the revealed Archive command into view before asserting visibility. - Usage and Automations pinned hosts wait for the hub window. - New-agent flow waits for an enabled assistant selector. - Continuity records a composer receipt when the Send wait times out (diagnostic only; root cause still open). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
🦞👀 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 stabilizes mock Gateway UI tests with observable readiness waits and adds diagnostics for an unresolved composer timeout. Example: The Automations editor reaches the requested 49.4% scroll position, then layout moves it to 22.4%.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this collaborator-authored PR makes useful test repairs absent from main, preserves the final assertions, and introduces no actionable defect found in this review. Priority: P2 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe fixture UI suite launches an isolated Windows app against a synthetic Gateway, drives native controls through UI Automation, and produces assertions and diagnostic artifacts for CI. flowchart LR
A[Fixture CI job] --> B[Gateway fixture UI tests]
B --> C[Isolated Windows app]
C <--> D[Synthetic Gateway]
B --> E[UI Automation observations]
E --> F[Assertions and diagnostic artifacts]
Technical reviewBest possible solution: Land the focused readiness repairs with their strict assertions intact and investigate the explicitly excluded failures separately. Do we have a high-confidence way to reproduce the issue? The base wait cannot finish when scrolling settles at 22.4% after a 49.4% request while the field remains clipped; the PR reports matching before/after fault injection, but this read-only review ran no tests. Is this the best way to solve the issue? The smallest complete repair is to observe readiness through the existing polling and scrolling owners while retaining final assertions; the diff follows that approach without production hooks or new test cases. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 64c96ac92d10. 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, 6:58 PM ET / 23:58 UTC. |
What Problem This Solves
Fixes: the "Mock Gateway application and compatibility tests" CI job fails intermittently on
mainand on unrelated PRs, so first-attempt runs go red and need reruns.User Impact
User impact: there is no product change. Contributors get fewer false CI failures from five mock Gateway UI tests.
Why This Change Was Made
Each test checked the UI once, or waited for the wrong condition, while the UI was still changing. The tests now wait for a state they can observe, then make the same assertions:
The changes add no retries, sleeps, fixed settle counts, skips, or weaker assertions.
Not fixed in this PR:
SelectedAssistantAndConversationSurviveTransientRosterLossButNotAuthoritativeRemoval. The draft is empty after the test sets it, and the cause is not established. This PR only adds a failure receipt (draft length right after the set, composer identity and count). The receipt cannot change the test result. A separate session owns the root cause.SidebarSwitchesRealHistoriesAndShowsMessage240AtBothWidths, which is left for a follow-up.SystemsDaily_InsetAndExpandedNativeFrames, a known flake that this PR does not touch.Evidence
COMException 0x8000FFFFfrom a liveAutomationIdread) was found and fixed during validation.Change Type
Scope
winnodeRequired proof pools
none: test-only change to the mock Gateway fixture UI tests; no product behavior changed, and CI runs these tests directly.Validation
All runs were local on Windows x64 at 175% DPI, with isolated profiles. Metadata for the real
%APPDATA%/%LOCALAPPDATA%\OpenClawTraywas unchanged after every run.Repeat runs on the final test source (rebased onto 3d5f142):
Automations_ScopesToAgentsAndCoversMainStates(Light + Dark)SessionsDesignNativeWindowGallery,UsagePinned_ToggleOwnsHitPointAndTabOrderWithVisibleOperationFeedback,NewAgentUsesGatewayCreationAndRefreshesWithoutReplacingConversationSelectedAssistantAndConversationSurviveTransientRosterLossButNotAuthoritativeRemovalFull suites at the same source:
test-gateway-fixture.ps1 -Screenshots -NativeInputProofpassed 55/55.Category=GatewayFixture&KeyboardProof!=Requiredwith the native-input opt-in: 124/124 passed (30m04s). These ran directly, because the script caps each project at 1800 s, and this run takes about 30 minutes locally at 175% DPI with screenshots.After rebasing onto
origin/main64c96ac:tests/OpenClaw.Tray.UITests,tests/OpenClaw.GatewayFixtureHostortests/OpenClaw.TestSupport.Closeout on the final tree:
./build.ps1: all builds succeeded.dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj: 5847 passed, 0 failed, 29 skipped.dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj: 6347 passed, 0 failed.Real Behavior Proof
dotnet test tests/OpenClaw.Tray.UITests -c Debug -r win-x64 -p:DevBuild=false --filter <test>, with the fixture environment fromscripts/test-gateway-fixture.ps1.Yes/No/N/A): N/A (local artifacts only).BoundingRectangleSizeReasonableviolation on a transient button ("snapshot peer unresolved", 175% DPI).Security Impact
Yes/No): NoYes/No): NoYes/No): NoYes/No): NoYes/No): NoYes, explain the risk and mitigation: N/A. The new failure receipt records lengths, counts and flags only, not message content.Compatibility and Migration
Yes/No): YesYes/No): NoYes/No): NoReview Conversations