Repository navigation
chore(ci): run mock Gateway UI scenarios in pull requests - #1905
Conversation
Enable the strict fixture runner in the ordinary Windows UI lane and model placement discovery required by composer scenarios. 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. |
|
Local evidence from this separate CI candidate (d64b35b): full build passed; Shared 4654 passed, 24 skipped, zero failures; Tray 4566 passed with four baseline ARM64 prerequisite-fixture failures; strict mock-Gateway fixture 32 profile/app plus 30 native UI passed, zero failures/skips. Missing placement RPC is repaired; new placement regressions failed before the fix. Both ComposerNew cases and the unchanged wide-resize case passed. #1899 remains open because the intermittent resize mechanism is not proven fixed. The four ARM64 prerequisite-fixture failures are independently repaired in #1898 at 5ce60c4 (full Tray 4570/4570); that repair has not been imported here. This local fixture execution used SDK 2.5.1 and does not prove SDK 2.6.4 behavior or hosted x64 execution. No MXC, WSL, shared runtime installation, or live-provider Gateway was required for these fixture tests. |
|
Codex review: needs maintainer review before merge. What this changesThis PR runs strict mock-Gateway application scenarios in the existing Windows UI lane and supplies their missing placement catalogs. Example: The fixture-backed composer opens a new conversation for agent main.
Review scores
ProductKind: Maintenance · Worth it: Yes · Fix scope: Partial Merge readiness✅ Ready for maintainer review Keep open: this collaborator-authored draft provides useful CI coverage and a focused fixture repair absent from main; no actionable patch defect was found, and the author's explicit landing pause remains. Priority: P2 Before mergeNone. FindingsNone. Tests
Agent review detailsHow this fits togetherThe Windows UI workflow invokes the existing fixture runner, which launches isolated application scenarios against a synthetic loopback Gateway and produces test reports and diagnostic artifacts. flowchart LR
A[Selected Windows UI lane] --> B[Strict fixture runner]
B --> C[Isolated Companion app]
C --> D[Real Gateway client]
D --> E[Synthetic Gateway catalogs]
B --> F[Reports and screenshots]
Technical reviewBest possible solution: Use the existing strict runner and scenario catalogs for CI, while retaining the separate investigation of intermittent wide-window visibility. Do we have a high-confidence way to reproduce the issue? Main's UI job lacks the fixture opt-in, so these application tests skip; source also confirms the missing placement RPCs, and the author reports the new regression failing before repair. Is this the best way to solve the issue? The patch is a focused use of existing owners: enable the strict runner, avoid duplicate selection, and add only the synthetic reads required by the real client. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against c59652f9b8ca. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
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 October 28, 2026, 11:31 AM ET / 15:31 UTC. |
Co-authored-by: Copilot App <[email protected]>
Preserve the newly landed placement catalog and its invalid-parameter cases; retain the real-client catalog regression and synthetic workspace metadata. Co-authored-by: Copilot App <[email protected]>
Main now recognizes projects.add as a denied write. Assert the explicit FIXTURE_READ_ONLY outcome with session mutations both enabled and disabled, rather than expecting an unknown RPC. Co-authored-by: Copilot App <[email protected]>
Answer ordinary question discovery without enabling mutations. Configure and verify the disposable hosted desktop before UI tests, and wait for draft acknowledgement before interactive question delivery. Co-authored-by: Copilot App <[email protected]>
Require successful app build, runtime installation and desktop setup, but run fixture scenarios after earlier test failures. Preserve the earlier failure and always collect fixture screenshots when launch prerequisites passed. Co-authored-by: Copilot App <[email protected]>
|
Repair update: New head |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
Keep passing captures inside test-results-ui, publish only failed or interrupted failure runs, and retain strict evidence and upload errors. Co-authored-by: Copilot App <[email protected]>
A selected ComboBox value can precede its dependent control in the UI Automation tree. Await the mounted expression editor using the existing fixture deadline before editing it. Preserve all timezone and saved-payload assertions. Co-authored-by: Copilot App <[email protected]>
) * chore(ci): run mock Gateway UI scenarios in pull requests Enable the strict fixture runner in the ordinary Windows UI lane and model placement discovery required by composer scenarios. Co-authored-by: Copilot App <[email protected]> * chore(ci): publish browsable mock Gateway screenshots Co-authored-by: Copilot App <[email protected]> * test: preserve landed fixture placement write rejection Main now recognizes projects.add as a denied write. Assert the explicit FIXTURE_READ_ONLY outcome with session mutations both enabled and disabled, rather than expecting an unknown RPC. Co-authored-by: Copilot App <[email protected]> * fix(ci): support question recovery and full-width fixture proof Answer ordinary question discovery without enabling mutations. Configure and verify the disposable hosted desktop before UI tests, and wait for draft acknowledgement before interactive question delivery. Co-authored-by: Copilot App <[email protected]> * fix(ci): collect fixture proof after unrelated UI failures Require successful app build, runtime installation and desktop setup, but run fixture scenarios after earlier test failures. Preserve the earlier failure and always collect fixture screenshots when launch prerequisites passed. Co-authored-by: Copilot App <[email protected]> * fix(ci): preview screenshots only for failed Gateway fixtures Keep passing captures inside test-results-ui, publish only failed or interrupted failure runs, and retain strict evidence and upload errors. Co-authored-by: Copilot App <[email protected]> * fix(test): wait for the cron expression editor after selection A selected ComboBox value can precede its dependent control in the UI Automation tree. Await the mounted expression editor using the existing fixture deadline before editing it. Preserve all timezone and saved-payload assertions. Co-authored-by: Copilot App <[email protected]> --------- Co-authored-by: Copilot App <[email protected]>
Related: #1899. Originally independent of #1898 (chore: update Windows App SDK to 2.6.4). Current head merges landed main (
814e732e) to resolve overlapping fixture-test additions. SDK 2.6.4 is now inherited from main, with no separate SDK or Reactor dependency change in this PR.What Problem This Solves
Pull-request CI skips real-app mock-Gateway scenarios, and their screenshots currently require downloading and extracting the complete diagnostic ZIP.
Coverage enabled by default in PR CI
New default CI execution, not 73 newly authored tests. Previously, ordinary PR CI did not enable the opt-in real-app mock-Gateway scenarios, so those UI tests skipped rather than exercising Companion. This PR adds a dedicated required lane, strict pass/no-skip checks and screenshot collection. Most scenarios already existed for explicit local runs; supporting tests may already have run elsewhere in CI.
The real Windows app, production Gateway client and native UI run against a deterministic loopback WebSocket server on
windows-latest, without an MXC-capable OS image, WSL Gateway or AI-provider account. Hosted run 40919838577, attempt 1 executed 39 UI cases plus 34 supporting app/profile/harness cases, all passing with zero skips. Counts include parameterized variants./newThe 34 supporting cases are not additional UI journeys. They cover the real operator connection with node execution off; concurrent app/profile/MCP-token/preference isolation; safe synthetic settings and endpoint/port validation; explicit executable selection and rejection of missing/incompatible apps; child-environment isolation, setup handoff, owned cleanup, cancellation and timeout/error propagation.
Boundary: this closes the real-app rendering and Gateway-event handling gap. It does not replace real Gateway compatibility/pairing, AI-provider, WSL setup, MSIX installation, or MXC-backed
system.run, sandboxing and actual command-execution proof. Ordinary UI, functional and accessibility suites remain separate from these 73 fixture-lane cases.Updated CI Summary to include screenshots of UI test failures for easier inspection:

User Impact
User impact: no shipping application change. Contributors get required fixture-backed UI scenarios and a Mock Gateway screenshots index only for failed fixture tests. Failed-test captures link to individual browser-preview PNG artifacts, grouped by test/scenario. Successful PNGs stay inside
test-results-ui\GatewayFixture, without preview entries or standalone artifacts. GitHub sign-in is required; the complete diagnostic ZIP remains available.Why This Change Was Made
Reuse
test-gateway-fixture.ps1in the ordinarywindows-latestUI job after installing the Windows App Runtime selected byDirectory.Build.propsand before DevBuild changes app identity. RunCategory=GatewayFixtureonce with an explicit current Debug x64 app. Failed, skipped, missing-report and zero-test selections fail the step. Context usage and chat-run correlation are included.Preserve main's placement catalogs, add agent workspace/recents metadata and a real-client catalog regression, and retain explicit read-only/unsupported-parameter rejection. Native keyboard/compositor galleries, Release proof, real Gateway, WSL and MXC remain separate.
Ordinary fixtures now answer empty
question.listrecovery without enabling interactive mutations. Before hosted UI launches, configure a session-only 1920x1080 desktop and verify enough actual work area for the unchanged 1300x950 proof. Local and self-hosted execution is refused. The interactive test waits for the mounted composer's draft and enabled Send state before delivering a question, retaining its original draft-preservation assertions.Only prepare the publisher when the fixture step fails, then publish captures belonging to failed tests or interrupted runs with a failure capture. Passing tests stay archive-only, including in mixed failed suites and above the preview artifact budget. Publish eligible PNGs unarchived with the official Actions artifact SDK, using unique test/capture names and the returned artifact IDs. Retain partial navigation if an upload fails and do not suppress publication failures. The full
test-results-uiZIP is uploaded first. No Pages, public branches, third-party hosting or write permissions are introduced.The latest strict hosted fixture run exposed a cron-editor synchronization gap: the schedule ComboBox reported "Cron" before
FormCronExprappeared in the UI Automation tree. Wait for that dependent field with the existing fixture deadline before editing it. The failure capture already shows the field rendered. No production code, timeout, saved-payload assertion or timezone expectation changes.Evidence
Current head
7df72ae4passes the full local build, 4,689 Shared tests (24 existing opt-in skips), 4,686 Tray tests and both focused native cron tests, with no focused failures/skips. All four isolated app runs and their testhost were absent after cleanup. The three-line repair preserves the existing deadline, selection check, unique saved expressions, timezone assertions and non-target-job comparisons.Current-head CI passes: run 40919838577, attempt 1, head
7df72ae4, tested merge6a9f28e86134fc1ec278a257204347517adecd27. All required jobs and CI Gate succeeded: 34/34 profile/app, 39/39 fixture UI (including both cron tests), 585 ordinary UI (7 existing opt-in skips), 19 Functional UI, 23 accessibility and 12 hardware-profile checks. All three WSL E2E shards, Core/CLI, Tray/setup/integration, x64 release smoke and MSIX/bundle jobs passed. Release/publication jobs remain intentionally skipped.The successful run skipped both screenshot-publisher steps and created zero standalone PNG artifacts. Its verified complete UI archive contains all 100 fixture PNGs.
Failure-only publication is proved on GitHub: run 40913089050, attempt 1, head
76d89df8, tested merge6767c477dacf6b8be4bde379c6fd008bd42b36c9. Its archive contains 93 PNGs, but only the failed cron test's two captures were published separately. The other 91 stayed archive-only. Both raw-artifact API digests match the downloaded PNG bytes. Replaying that actual mixed-result archive selects the same two captures and preserves all 93 originals.That run passed all 34 profile/app checks, 38 fixture UI cases, 585 ordinary UI cases (7 opt-in skips) and 19 Functional UI cases. Its one fixture failure was
CronEditor_NewJobOtherJobAndScheduleKindDoNotInheritPreservedZone:Missing cron control FormCronExprimmediately after selecting the Cron schedule. The downloaded failure screenshot then shows the expression field, supporting the UIA-readiness gap rather than a permanently missing form control. Accessibility and hardware-profile steps were skipped after this failure, not passed.All three WSL E2E shards, Core/CLI, Tray/setup/integration, x64 release smoke and both MSIX architectures passed in that earlier run. Its cron fixture failure and red CI Gate are retained as the before-fix evidence; current-head hosted x64 acceptance is the subsequent successful run above.
Earlier run 40745776543 had four different failures. They passed in run 40913089050, but the intermittent failures and investigation remain recorded rather than declared fixed:
FullSetup_TrayEnsuresWslKeepAliveE2ESetupFixture.WaitForTrayKeepAliveReadyAsync, line 877. ItsFile.ReadAllLinesAsyncdoes not permit the existing log writer. A synthetic held-open writer reproduces Windows error 32; the existing repositoryFileShare.ReadWrite | FileShare.Deletereader pattern reads the same marker while that writer stays open. This confirms a reader-sharing defect without claiming a real-WSL rerun or fix.KokoroDownloadOwnershipTests.PreviewCompletion_PreservesPendingDownloadAndTerminalState,successandstorage-failureBuildPrerequisiteTests.CheckOnly_UsesTheAppLocalRuntimeResolver,14.29.30139/x64/ unsupportedBoth subprocess owners already drain stdout/stderr concurrently, but their timeout paths lose the captured child output. Bounded follow-up should retain stage/output evidence without weakening deadlines. No download, WSL or process-lifetime repairs are imported into this CI-selection PR. No blanket retries, timeout increases, skips or suppression were added.
Historical head
ba5b9e43, run 40745776543, passed 32/32 profile/app and 31/31 fixture UI with no fixture skips, 574 ordinary UI checks (7 opt-in skips), 19 Functional UI and 23 accessibility checks. Its old policy published 80 individual PNGs. The historical wide-history screenshot shows final message 240 and its end marker at 1300x950. Existing artifacts are not deleted by the new policy; authenticated browser image rendering remains unverified.Failure history retained: initial run 40714457906 failed actual widths 900 then 1044. Run 40728085479 had 25 unexpected
question.listassertions, that geometry failure and two visibility timeouts. Run 40741383242 proved the 1920x1080 desktop but its ordinary UI host hung at Windows App SDK bootstrap and the unchanged 300-second guard aborted it before fixture launch. Current source lets fixture proof execute despite earlier unrelated test failures, while requiring successful build/runtime/desktop prerequisites and retaining the red job. Current UI bootstrap and all fixture cases passed; the intermittent earlier hang is not declared fixed. Intermittent clipping remains unproven and related #1899 stays open.Independent Copilot rubber-duck reviews of the original CI/catalog change and the screenshot publisher/tests/workflow/lockfile/docs found no P0-P3 issues. The canonical shared autoreview installation/helper was unavailable; verified reviewer model identity and helper-owned frozen-input/isolation status are not claimed. Subsequent upstream reconciliation was self-checked and revalidated: main's
gateway:fixtureID, no duplicate catalog keys, existing invalid-parameter rows, and explicitFIXTURE_READ_ONLYplacement-write rejection in both session-mutation modes.Repair review rejected the proposed Server Core display cmdlet before publication; it was replaced with User32. Independent narrow review found no ABI/safety bugs in that replacement; actual hosted geometry is now proved. The final draft-readiness and fail-independent workflow changes were self-reviewed and revalidated, not attributed to the independent review.
The five-file failure-only follow-up was self-reviewed and simplified against its parent: 43 additions / 11 removals, with no new owner, configuration, dependency or product change. Existing workflow gating and per-test filtering protect different boundaries. No new independent review or canonical-helper result is claimed for this follow-up.
The subsequent cron synchronization repair is three lines in the existing test helper, self-reviewed against the real hosted failure and its screenshot. It uses the existing bounded readiness helper rather than sleeps, test retries or production hooks. No new independent review is claimed for this small test-only follow-up.
Change Type
Scope
winnodeRequired proof pools
none: CI selection, evidence publication, synthetic fixture metadata and test-only UIA readiness. No shipping UI, native dependency, real Gateway, installer, keyboard gallery or MXC contract change. The existing hosted UI lane remains the acceptance boundary.Validation
Current tested source: cron-readiness follow-up
7df72ae4aee6e95163f0d99daf88d9763ac3ab3e, validated as the three-line patch on parent76d89df8. Manually recorded patch SHA256bbed9abea6894ecb634a295b4410a82b78f075277d23e4d05b16fef4637bd7b7matched before and after validation. Publisher follow-up76d89df8was validated as the five-file patch onba5b9e43, SHA2562cbf94d0edb9f007a9864a4222c8f02e6ebf5e835e01c61301c5033102745408. Its hosted run tested merge6767c477dacf6b8be4bde379c6fd008bd42b36c9. Required commands ran sequentially, withOPENCLAW_REPO_ROOTset to this worktree andOPENCLAW_TRAY_DATA_DIRset to disposable task-owned settings. No local shared-runtime installation or display-resolution change.Current-head hosted run tested merge
6a9f28e86134fc1ec278a257204347517adecd27, parents4e31031108c890a57eef06040f6ab016a6234841and7df72ae4aee6e95163f0d99daf88d9763ac3ab3e. Downloaded TRX counters and exact formerly failing cron cases were inspected, not inferred from job exit status alone..\build.ps1dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore --logger 'trx;LogFileName=shared.trx' --results-directory .\TestResults\CronReadinessCloseoutdotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --logger 'trx;LogFileName=tray.trx' --results-directory .\TestResults\CronReadinessCloseoutdotnet build .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -c Debug -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false --no-restoredotnet test .\tests\OpenClaw.Tray.UITests\OpenClaw.Tray.UITests.csproj -c Debug -r win-arm64 -p:Platform=ARM64 -p:DevBuild=false --no-build --no-restore --filter 'FullyQualifiedName~GatewayFixtureUiTests.CronEditor_' --blame-hang-timeout 300s --logger 'trx;LogFileName=cron-ui.trx' --results-directory .\TestResults\CronReadinessCloseoutdotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore --filter 'FullyQualifiedName~KokoroDownloadOwnershipTests|FullyQualifiedName~BuildPrerequisiteTests' --logger 'trx;LogFileName=subprocess-baseline.trx' --results-directory .\TestResults\FailureOnlyInvestigationnode --test .github\scripts\gateway-fixture-report\report.test.mjs.\scripts\test-ci-workflow-contract.ps1.\scripts\validate-docs.ps1.\scripts\validate-agent-skills.ps1.\scripts\test-agent-skills-validator.ps1git diff --checkEarlier unchanged application/fixture source, not relaunched for this publisher-only follow-up:
.\scripts\test-gateway-fixture.ps1 -AppPath '.\src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.22621.0\win-arm64\OpenClaw.Tray.WinUI.exe' -ArtifactsDirectory '.\TestResults\FixtureRepairUiFinal' -Screenshotspassed 32 profile/app + 31 native UI with no failures/skips (invocation1d8d2a9c11404bc68ebc272b30cef843).dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-build --no-restore --filter FullyQualifiedName~GatewayFixtureProtocolTests --logger 'trx;LogFileName=protocol.trx' --results-directory .\TestResults\FixtureRepairCloseout --verbosity quietpassed 106 cases with no failures/skips..\scripts\test-ci-desktop-resolution.ps1passed the binding/ABI and local/self-hosted refusal checks without display mutation.The first post-merge Shared run (
6e90d495) had two placement regression failures: main now recognizesprojects.addas a denied write rather than an unknown method. Corrected assertions require the explicitFIXTURE_READ_ONLYoutcome and no unexpected RPCs. Focused reproduction went from 2 failed to 2 passed; all required commands were then rerun, with the final results above.Repair history retained: question-discovery baseline 2 failed/13 passed became 106 protocol passes after the fixture fix. The first repaired local UI run passed 30/31, failing draft retention in the inherited interactive case; after adding the draft/Send acknowledgement precondition, focused 1/1 and full 31/31 passed. One workflow-contract attempt hit its existing two-second no-output child deadline while a build was busy; subsequent serial checks passed without changing that guard.
Historical initial-head (
d64b35b2, SDK 2.5.1) evidence is not attributed to this head: full build passed; Shared 4,654 passed/24 skipped; Tray 4,566 passed/4 prerequisite-fixture failures. The prerequisite repair is now inherited from main and passed in this head's own full Tray run. The initial local strict command.\scripts\test-gateway-fixture.ps1 -AppPath '.\src\OpenClaw.Tray.WinUI\bin\Debug\net10.0-windows10.0.22621.0\win-arm64\OpenClaw.Tray.WinUI.exe' -ArtifactsDirectory '.\TestResults\FixtureCiDebug' -Screenshotspassed 32 profile/app + 30 native UI, zero failures/skips. Original failures and the hosted geometry failure are retained, not skipped or retried into success.Real Behavior Proof
windows-latest. Hosted matching runtime installer 2.6.4 succeeded; desktop receipt is 1920x1080 with a 1920x1032 work area.7df72ae4aee6e95163f0d99daf88d9763ac3ab3e, hosted merge6a9f28e86134fc1ec278a257204347517adecd27; local test-only patch built on parent76d89df8. Earlier hosted failure-only publisher head76d89df891aa55b82347048f207f7bfccb4ec08e, merge6767c477dacf6b8be4bde379c6fd008bd42b36c9. SDK 2.6.4 is inherited from main; Reactor remains preview.12. Loaded runtime module version was not independently captured.OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1, explicit freshly built ARM64 Debug app, isolated fixture artifacts and screenshots enabled. Replay of actual all-success and mixed-result hosted archives checks selected captures and unchanged PNG hashes.cron.add/cron.updateschedules preserve absent timezone, unlisted Pacific/Auckland, explicit UTC and listed America/Chicago while verifying other jobs remain unchanged. Current new-job screenshot visibly shows the populated expression editor. Four app PIDs plus their fixture/testhost PID were absent after cleanup.Yes/No/N/A): Yes, artifact identity/name verified through GitHub and hosted ZIP/screenshots inspected. Authenticated browser image rendering remains unverified because the canvas is signed out.Security Impact
Yes/No): NoYes/No): NoYes/No): Yes, locked dependency installation and individual PNG uploads to the existing GitHub Actions artifact service.Yes/No): NoYes/No): NoYes, explain the risk and mitigation: Only PNGs from fixture-owned run directories are uploaded; no profile contents, token fields or raw logs are added to the summary. Existing artifact authentication/retention and read-only workflow permissions remain unchanged. Fork PRs use the runner-provided artifact runtime token. Dependencies are locked and installed with lifecycle scripts disabled.Compatibility and Migration
Yes/No): YesYes/No): Yes, existing fixture opt-in is scoped to child test processes. Only disposable GitHub-hosted CI changes display resolution for its session; local/self-hosted use is refused.Yes/No): NoReview Conversations