Skip to content

fix(ci): fixture UI tests that inject native input fail the new-test soak instead of being soaked - #2227

Merged
bkudiess merged 2 commits into
openclaw:mainfrom
bkudiess:bkudiess-soak-native-input
Nov 14, 2026
Merged

bkudiess merged 2 commits into
openclaw:mainfrom
bkudiess:bkudiess-soak-native-input

Conversation

@bkudiess

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: the new-test soak fails fixture UI tests that inject native input (for example DashboardsResponsiveLightWidthsRenderTheMeasuredPageHost) with "An explicitly enabled owned native-input proof window is required." This happens even though the regular fixture lanes run them with native input enabled. It blocks pull requests that change those tests, such as #2222.

User Impact

No product change. Pull requests that change fixture UI tests which inject native input now get those tests soaked, the same way the fixture lanes run them, instead of failing the soak.

Why This Change Was Made

The fixture lanes run scripts/test-gateway-fixture.ps1 -NativeInputProof. That sets OPENCLAW_RUN_KEYBOARD_PROOF=1 only for the fixture UI test process (Category=GatewayFixture&KeyboardProof!=Required), and the workflow contract forbids a step-wide opt-in. The soak ran every UI test with one step environment that had native input off, so tests that always inject native input failed closed.

The soak now runs Tray UI tests as two subsets per run, each with its CI lane's environment:

  • Fixture UI tests (Category=GatewayFixture): OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1 and native input. Native input comes from the new step setting OPENCLAW_CI_SOAK_FIXTURE_NATIVE_INPUT: '1' and is applied only to that test process. The step-wide OPENCLAW_RUN_KEYBOARD_PROOF stays '0'.
  • Other UI tests: neither variable, as in the UI lane.

Other details:

  • Each subset writes its own test report and gets its own product data folders. A subset that ran no tests in the first run is skipped in later runs.
  • Failure messages name the subset.
  • Shared and Tray projects are unchanged.
  • Native keyboard proof (KeyboardProof=Required) stays excluded: the fixture lanes exclude it too, and the only CI step that runs it is the production-resources one, which the soak also excludes.
  • The setting is an environment variable rather than a runner parameter (the fix(ci): alpha promotion fails because older candidates don't accept -StepTimeoutMinutes #2154 promotion rule).

The workflow contract pins the setting, keeps the step-wide opt-in off, and requires both fixture lanes to still pass -NativeInputProof, so the two cannot drift apart. docs/TEST_COVERAGE.md records the rationale.

Note: a fixture-gated test without the Category=GatewayFixture trait (today the four StartupWindowUiTests tests) now skips in the soak, as it does in the UI lane. Before this change, the soak's step-wide OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1 made those tests run. No regular lane runs them; adding the trait is a separate follow-up.

Evidence

Native proof under the shared native-desktop lock, with the real app and the CI soak step environment, running scripts/Invoke-CiTestSoak.ps1 on GatewayFixtureUiTests.DashboardsResponsiveLightWidthsRenderTheMeasuredPageHost:

  • RED (setting unset, today's soak behavior): ui run 1 of 1 under CPU contention (fixture-ui tests) failed, with System.InvalidOperationException: An explicitly enabled owned native-input proof window is required. at ValidateDashboardWheelOptIn. This is fix(tests): Dashboards fixture tests fail when a control's UI Automation element is briefly missing after a re-render or resize #2222's failure.
  • GREEN (setting 1): 10 of 10 runs passed, including runs 2, 5 and 8 under CPU burners (16–20 s each). The step used 4.1 of 40 minutes. The empty ui subset ran once and was then skipped. No burner processes were left afterwards, and the real %APPDATA%/%LOCALAPPDATA%\OpenClawTray manifests were unchanged.

Change Type

  • Bug fix
  • Feature
  • Refactor
  • Docs or instructions
  • Tests or validation
  • Security hardening
  • Chore or infrastructure

Scope

  • Tray or WinUI UX
  • Windows node capability
  • Local MCP or winnode
  • Gateway, connection, or pairing
  • Setup or onboarding
  • Permissions, privacy, or security
  • Tests, CI, or docs

Required proof pools

  • none: CI workflow and the soak runner only. The native proof above covers the changed behavior; no product or capacity-dependent Windows proof is affected.

Validation

Local, head b810c0d (validated at fd6fd503 on main bb9cc8a; rebased onto 0467121 with an identical patch), PowerShell 7, isolated OPENCLAW_TRAY_* profile:

Command Result
scripts\test-ci-changed-tests.ps1 ✅ pass. New checks: the subset plan with the setting on, off, and for unit-test projects; an invalid setting is rejected; a removed variable is truly absent in child processes
scripts\test-ci-workflow-contract.ps1 ✅ pass
test-ci-gate-results.ps1, test-alpha-promotion.ps1, test-ci-change-classifier.ps1, validate-test-timing-patterns.ps1 ✅ pass
validate-docs.ps1, validate-agent-skills.ps1, test-agent-skills-validator.ps1, git diff --check ✅ pass
./build.ps1 ✅ pass
dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore ✅ 5890 passed, 29 skipped, 0 failed
dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore ✅ 6722 passed, 0 failed

Review: Hanselman dual review (claude-opus-5.5 high; gpt-6-astra long_context high). Both found no blockers. Fixed:

  • $null left an empty variable instead of removing it (both models).
  • The two subsets shared data folders.
  • Failure messages did not name the subset.
  • The doc now covers fixture-gated tests without a Category trait.

Both models confirmed the final head with no remaining findings.

Real Behavior Proof

Security Impact

  • New permissions or capabilities? No
  • Secrets or tokens handling changed? No
  • New or changed network calls? No
  • Command or tool execution surface changed? No. Native input is enabled only for fixture UI tests, as in the fixture lanes.
  • Data access scope changed? No
  • If any answer is Yes, explain the risk and mitigation: N/A

Compatibility and Migration

  • Backward compatible? Yes. The soak job runs only on pull requests, and older runners ignore the new setting.
  • Config or environment changes? Yes: optional OPENCLAW_CI_SOAK_FIXTURE_NATIVE_INPUT (default 0; CI sets 1).
  • Migration needed? No
  • If yes, list the exact upgrade steps: N/A

Review Conversations

  • I replied to or resolved every bot review conversation addressed by this PR.
  • I left unresolved only conversations that still need maintainer judgment.

…soak instead of being soaked

The soak now runs Tray UI tests as two subsets with their CI lanes'
environments. Fixture UI tests get OPENCLAW_RUN_GATEWAY_FIXTURE_UI=1 and, through
the new OPENCLAW_CI_SOAK_FIXTURE_NATIVE_INPUT step setting, the same native-input
opt-in the fixture lanes give them with -NativeInputProof, set only for their
test process. Other UI tests run without either, as in the UI lane. Native
keyboard proof stays excluded.

Co-authored-by: Copilot App <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 14, 2026 •

Copy link
Copy Markdown

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. labels Nov 14, 2026
@clawsweeper

clawsweeper Bot commented Nov 14, 2026

Copy link
Copy Markdown

Codex review: needs maintainer review before merge.

What this changes

This PR runs fixture UI tests and other UI tests in separate soak processes with their respective lane environments.

Example: The soak selects DashboardsResponsiveLightWidthsRenderTheMeasuredPageHost.

  • Before: Native wheel injection fails because OPENCLAW_RUN_KEYBOARD_PROOF is 0.
  • After: The fixture test process receives the explicit native-input opt-in while other UI tests do not.

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) Useful, focused CI repair with no definite findings, but validation confidence remains limited by the unclassified required-check failure.
Proof confidence 🦐 gold shrimp (3/6) This CI-only change requires no shipped-product proof; the body reports the actual soak runner exercising the real Windows app, with an opt-in failure followed by ten passing runs, but supplies no linked execution artifact.
Patch quality 🦐 gold shrimp (3/6) No actionable review findings were identified.

Product

Kind: Maintenance · Worth it: Yes · Fix scope: Complete
User problem: Contributors changing native-input fixture tests receive a required soak failure before the intended test behavior can be exercised.
Reason: Matching an existing test lane removes a concrete CI blocker, and the collaborator author has already authorized the direction and documented its coverage tradeoff.

Merge readiness

✅ Ready for maintainer review

Keep open: this maintainer-authored PR addresses a source-confirmed soak environment mismatch that remains on reviewed main; no definite introduced defect was found.

Priority: P2
Reviewed head: b810c0d2e562b1b12bd506a3c1ad25bd698c3b3c

Before merge

None.

Findings

None.

Agent review details

How this fits together

The CI soak runner receives selected test names, builds their projects, repeatedly launches filtered test processes, and turns their TRX results into a required CI outcome.

flowchart TD
A[Changed test selection] --> B[Soak runner]
B --> C[Fixture UI process]
B --> D[Other UI process]
C --> E[TRX results]
D --> E
E --> F[CI Gate]
Loading

Technical review

Best possible solution:

Keep the existing soak owner and align its fixture child environment with the established fixture lane while preserving per-process authorization and isolation.

Do we have a high-confidence way to reproduce the issue?

The base workflow disables native input, while the selected dashboard test explicitly throws without that opt-in; the PR also reports a matching Windows negative control, but no target code was executed during this review.

Is this the best way to solve the issue?

The split uses the existing runner and matches the fixture lane's authorization boundary; separate reports, data directories, and environment restoration serve that change without introducing a parallel owner.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against 0467121e68d2.

Provenance checked

  • Soak execution and lane environments changes intended behavior with a stated reason (4ea35ff: Repeatedly exercise new and changed tests under ordinary and contended execution before they reach main.)
  • Environment-based runner settings keeps the original intent (435f4fe: Current workflows must not pass new parameters to older release-candidate runner scripts.)

Security

None.

Evidence

What I checked:

Likely related people:

  • Barbara Kudiess: Raw commit 4ea35ff adds scripts/Invoke-CiTestSoak.ps1:31 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: high; commits: 4ea35ff9505f; files: scripts/Invoke-CiTestSoak.ps1)

Preflight source

Source unknown. Source comparison at the observed PR snapshot only. Completion is self-reported; body, policy, tests, execution, and report bytes are not verified.

Labels

Label changes:

  • add P2: The required soak rejects valid fixture UI test changes because its native-input environment differs from the regular fixture lanes.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Label justifications:

  • P2: The required soak rejects valid fixture UI test changes because its native-input environment differs from the regular fixture lanes.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🦐 gold shrimp and patch quality is 🦐 gold shrimp.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR.

Rating scale

6/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.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed November 14, 2026, 4:39 AM ET / 09:39 UTC.

The new check that an invalid OPENCLAW_CI_SOAK_FIXTURE_NATIVE_INPUT is rejected
leaves the expected child-process failure in LASTEXITCODE, and CI's pwsh shell
exits with it. Clear it after the check, end the script with exit 0, and have
the workflow contract require that ending.

Co-authored-by: Copilot App <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant