Repository navigation
fix(tests): wait for onboarding cards before invocation - #1646
Conversation
Adapt the framework readiness seam from closed unmerged PR #1559, original commit 8912d67. Wait for the exact AI action card without changing native input or product behavior, retain strict XAML handler checks, and add delayed-state and timeout regressions. Co-authored-by: Copilot App <[email protected]>
|
🦞👀 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. Reviewed October 6, 2026, 1:22 AM ET / 05:22 UTC. ClawSweeper reviewWhat this changesThe PR makes onboarding framework tests wait for the exact AI action card to become ready, adds delayed-readiness and timeout regressions, and documents the test contract. Merge readiness✅ Ready for maintainer review This remains a useful, bounded test repair: current main lacks the readiness wait, and the earlier implementation closed unmerged. No blocking correctness or security defect was found. Priority: P3 Review scores
Verification
How this fits togetherWindows onboarding framework tests mount the real setup page in a WinUI test window and invoke its XAML-wired card actions. The changed helper checks card readiness before invoking those actions; native keyboard and pointer proof uses a separate path. flowchart TD
A[Onboarding test scenario] --> B[Real WinUI setup page]
B --> C[Target AI action card]
C --> D{Card ready within 10 seconds?}
D -->|Yes| E[Validate XAML handler and invoke]
D -->|No| F[Fail with readiness diagnostics]
E --> G[Assert action and completion]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep a single bounded framework readiness wait with strict handler validation and separate native-input coverage. Do we have a high-confidence way to reproduce the issue? Yes for the readiness precondition: forced unloading or disabling exercises the immediate assertion gap visible in main. The original intermittent CI scheduling failure was not independently reproduced. Is this the best way to solve the issue? Yes. Reusing the existing bounded rendering wait before strict invocation is a narrow repair that preserves handler checks and the native proof boundary. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against b1a41be1b8ae. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
What Problem This Solves
Fixes framework onboarding tests invoking an AI action card before that exact card is ready.
User Impact
No product UX or control behavior changes. Framework tests synchronize against the target card rather than treating parent-panel visibility and a dispatcher yield as readiness proof.
Why This Change Was Made
Wait up to 10 seconds for loaded, enabled, click-enabled cards attached to the page's non-null XamlRoot. Preserve strict assertions and XAML-wired handler verification, with diagnostics for each readiness condition. Native input/compositor proof is separate and unchanged.
Adapted from #1559 (fix(tests): wait for onboarding cards before invocation), original head
8912d67fb87ad7bc5b49f4e41c96bbbcd5fa7ceb. Its author closed it unmerged October 1. Inspected comments, reviews, inline discussion and timeline contain no human rejection or stated closure reason. This PR does not reopen it or claim a known closure intent. Original author metadata is preserved with the Copilot co-author trailer.Only the AI framework invocation seam, regressions and test-coverage documentation change. No product code, native publication waits, workflow files, fixture refactors or CI-speed optimizations.
Evidence
Current-head local framework proof: all 77 ARM64 AI cases passed, including four new regressions and existing strict XAML-handler rejection cases. Hosted CI also passed: 19 functional tests, 445 Tray UI tests (14 skipped), 23 accessibility tests.
Required rubber-duck review completed. Parent-authorized app-native Hanselman review used Claude Opus 5.5/high and GPT-6 Astra/high/long_context on
1ab07907: neither found blocking defects. Low-only limitations retained without scope expansion: detach tests overlap load/root gates; no dedicated mismatched-root fixture; task draining in cleanup may mask the first failure message but still fails correctly. CLI autoreview was attempted against the exact commit but unavailable becausecodexis not installed. No host tooling/configuration changes made.Change Type
Scope
Required proof pools
none: framework-only synchronization, not product UI, native input, compositor, architecture-specific runtime, installer or gateway behavior. Actual WinUI framework execution was performed on ARM64; no native screenshot proof claimed.Validation
Frozen head
1ab07907ef93644068e186ce552757c0b32e388f;OPENCLAW_REPO_ROOTpoints to this worktree and all three tray roots are session-isolated. Fresh test projects were built before--no-restore, preventing a zero-test no-op..\build.ps1: all five projects passed.dotnet build .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --verbosity quiet: passed.dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore: 4,232 passed, 36 skipped, 0 failed.dotnet build .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --verbosity quiet: passed.dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore: 3,899 passed, 0 skipped, 0 failed..\scripts\run-proof-tests.ps1 -Project 'tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj' -Filter 'FullyQualifiedName~OnboardingAiPageTests&Category!=NativeOnboardingProof' -ResultName 'onboarding-card-readiness' -RuntimeIdentifier win-arm64: 77 passed, 0 skipped, 0 failed; 22.7421 seconds. TRX verifies non-zero tests.git diff --check: passed.Base compatibility: predecessor #1645 (fix(audio): bound process cleanup without racing disposal) merged as
e23f43a1a216fef8db23feca122b89f62ae71cc8. Its five changed files are disjoint from this patch; inspected process-owner changes do not affect the card/framework seam.git merge-tree --write-tree origin/main HEADsucceeds with combined treec5929eb7165e77f8447f8846cf83cbf1386d2c8f; delta from current main is exactly this three-file patch. No blind rerun or branch rewrite performed.Real behavior proof
1ab07907ef93644068e186ce552757c0b32e388f.Security Impact
No new permissions, capabilities, secret handling, network calls, execution surface or data access.
Compatibility and Migration
Backward compatible. No configuration/environment changes or migration.
Review Conversations
No inline review conversations were present at closeout; both app-native reviews reconciled.