Skip to content

test(desktop): stabilize live zenity Xvfb tests - #221

Merged
ElbertePlinio merged 4 commits into
mainfrom
test/217-zenity-xvfb-flake
Oct 3, 2026
Merged

ElbertePlinio merged 4 commits into
mainfrom
test/217-zenity-xvfb-flake

Conversation

@ElbertePlinio

@ElbertePlinio ElbertePlinio commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

This fixes the two live zenity Xvfb tests that flaked in CI on #216.

The GTK exec test waits for its window by polling, but its 15 s bound was too tight for the first CI test step, where every test file runs in parallel. In 13 earlier CI jobs, this test took 2.0 to 10.0 s in bun run test and about 0.5 s in the later bun run test:coverage step of the same job. One run went past 15 s. The bound is now 30 s, the production default for desktop exec, and the test timeout is 60 s. An earlier commit on this branch tried session isolation instead. CI showed that it did not change the timing, so a later commit reverts it.

The capture test compared the before capture with the after capture of desktop_type. The after capture follows input completion, and the app may not have redrawn yet. The product does not promise that redraw. The GTK caret also blinks, so the old check mostly passed because of the blink. The fixture now turns off the caret blink in the session's private config home. Before it types, the test requires the screen to stay stable for 1.3 s, longer than one blink cycle, within 8 s, shorter than GTK's 10 s blink timeout. A live caret therefore fails that step. Then the test waits for the typed text to change the screen against the before capture.

Only test files change. There is no QA device pass, because there is no UI, CLI output or app behavior to drive. The loaded local runs below replace it.

Closes #217

Requirement Verified by Scenario Result Evidence
Reproduce under load Automated test, local Unchanged capture test, pinned to one CPU with 7 busy-loop burners Digest equality reproduced in 1 of 8 runs. The GTK window timeout did not reproduce locally. CI step timings explain it. Failed CI run; local logs not published
GTK window wait waits for the window, not a fixed time Automated test, local and CI execApp already polls every 100 ms. The whole integration file ran unloaded. The GTK test ran 10 times under 7-burner load. All passed. Under load the test took 3.8 to 6.9 s, against the 30 s bound. Local runs; CI below
After-capture check waits for the expected change Automated test, local Unloaded; 3 burners 10/10; 5 burners 9/10; 7 burners 8/8 at the final stable wait. Negative check with the blink left on. Every failure was in the out-of-scope desktop_type input stage (#222). There were no stable-wait or change-wait failures. With the blink on, the stable wait timed out as intended. Local runs; CI below
Confirm stability over repeated CI runs CI test job, repeated attempts at each head Both zenity tests passed in 11 of 11 jobs: c7b5d9c 4 of 4, feedc89 3 of 3, 70c87da 3 of 3, merged head 46c1475 1 of 1. The GTK test took at most 9.4 s in the parallel step, against the 30 s bound. One 70c87da attempt failed only in the unrelated Android test tracked in #210. c7b5d9c, feedc89, 70c87da, 46c1475
Repository checks Automated Full suite with the CI PICKFORGE_REQUIRE_* flags, typecheck, oxlint and PickCheck 0.4.0 against origin/main, at the merged head 46c1475 153 files and 2349 tests passed; typecheck, lint and PickCheck passed Local runs; CI at 46c1475

Under heavy load on one core, desktop_type itself sometimes fails closed with "no text was sent". The old and new tests both hit it. The cause is the 250 ms server grab bound in x11-wire.ts. That bound is product behavior, so it is tracked in #222. The after capture can come before the redraw, and #223 tracks that product question.

Run the GTK exec test with session isolation like production exec.
Turn off the caret blink in the capture fixture and wait for the
typed text against the settled before frame instead of comparing the
immediate after capture.
@ElbertePlinio
ElbertePlinio merged commit 46c6e12 into main Oct 3, 2026
10 checks passed
@ElbertePlinio
ElbertePlinio deleted the test/217-zenity-xvfb-flake branch October 3, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test: live zenity Xvfb tests flake in CI

1 participant