Repository navigation
fix(test): stabilize hardware and UI integration tests - #1302
Conversation
Co-authored-by: Copilot App <[email protected]> Copilot-Session: ffe78bbb-0a14-472d-9854-479c3d25430c
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed September 2, 2026, 6:40 PM ET / 22:40 UTC. ClawSweeper reviewWhat this changesThe PR preflights camera devices before capture, grants consent in the isolated integration fixture, and retries one delayed deep-link activation in the live accessibility harness. Merge readiness✅ Ready for maintainer review Keep open. The PR has a distinct, bounded fix beyond current main’s consent-prompt timeout: it prevents camera-less hosts from entering MediaCapture initialization and retries a lost accessibility activation. The current head has direct Windows MCP and real-process accessibility evidence, with no blocking review finding. Priority: P2 Review scores
Verification
How this fits togetherThe tray app exposes camera capture through its local MCP server, which passes approved requests to Windows MediaCapture. Its UI accessibility suite opens the isolated WinUI app through deep links and waits for app-owned readiness signals before running Axe. flowchart LR
A[Local MCP camera request] --> B[Consent gate]
B --> C[Camera device preflight]
C --> D[Windows MediaCapture]
E[Accessibility test] --> F[Deep-link activation]
F --> G[Hub navigation signal]
G --> H[Live Axe scan]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Merge the small preflight and retry changes after normal checks complete, retaining the direct Windows MCP and real-process accessibility coverage as the regression guard. Do we have a high-confidence way to reproduce the issue? Yes. The source identifies the camera-less MediaCapture path and the bounded readiness retry, and the PR provides current-head Windows MCP and real-process accessibility results for those paths. Is this the best way to solve the issue? Yes. Device enumeration is a narrow guard before the hanging initialization path, while one idempotent deep-link retry preserves the existing timeout and failure behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 297b6c89bc45. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (1 earlier review cycle)
|
Co-authored-by: Copilot App <[email protected]> Copilot-Session: ffe78bbb-0a14-472d-9854-479c3d25430c
* fix(test): avoid camera capture timeouts Co-authored-by: Copilot App <[email protected]> Copilot-Session: ffe78bbb-0a14-472d-9854-479c3d25430c * fix(test): retry delayed UI navigation Co-authored-by: Copilot App <[email protected]> Copilot-Session: ffe78bbb-0a14-472d-9854-479c3d25430c --------- Copilot-Session: ffe78bbb-0a14-472d-9854-479c3d25430c
Summary
MediaCapture.InitializeAsync, returning a deterministic tool error when no camera exists or a requested device is unavailableRoot cause
GitHub Actions run 33664243199 timed out in
CameraSnap_ReturnsImageOrWellFormedErrorfor two reasons: the isolated fixture had not granted newly required capture consent, then Windows leftMediaCapture.InitializeAsyncpending on a camera-less runner. The blocked MCP request also caused the followingscreen.snapshotrequest to time out.The next PR run failed
SandboxPageaccessibility scanning before Axe executed. Its TRX showed the app-owned navigation acknowledgement missed the fixed 10-second window under sustained UI automation load. Five isolated Sandbox scans passed, and merely increasing the timeout later reproduced the same failure on Chat after 20 seconds. The harness now re-sends the idempotent deep link once. Hub same-page deduplication emits a fresh readiness signal, while a second failure still propagates and the full Axe scan remains unchanged.Suppressing either test would hide real product or harness behavior and was not necessary.
Required proof pools
windows-winui-interactive: the real-process accessibility navigation harness changed and was exercised against the live isolated WinUI app.Validation
./build.ps1: passeddotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore: 3,873 passed, 32 skippeddotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore: 2,824 passedOpenClaw.Tray.IntegrationTestsonwin-x64: 22 passeddotnet test ./tests/OpenClaw.Tray.UITests/OpenClaw.Tray.UITests.csproj -c Debug -r win-x64 --no-build --filter "Category=Accessibility": 21/21 passed after the retry changeReal behavior proof
Current-head black-box MCP integration output on a Windows host without a camera:
Current-head real-process Axe run:
Sandbox completing in 27 seconds demonstrates that the first bounded readiness attempt expired under sustained load, the idempotent retry recovered, and Axe still scanned the live page successfully. No visible UI changed, so screenshot proof is not applicable.