Skip to content

Fix X11 probe and window-state quit flakes - #97

Merged
1bye merged 3 commits into
mainfrom
codex/ci-flakes
Nov 21, 2026
Merged

1bye merged 3 commits into
mainfrom
codex/ci-flakes

Conversation

@1bye

@1bye 1bye commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Fix X11 shortcut lifecycle reconnects and give native window placement a bounded final flush on quit.

  • Root cause of the X11 flake: Xvfb resets when its last client disconnects. The probe explicitly unregisters its first shortcut (closing the X connection), registers a second, drops it, then registers again. Reconnects can race that reset. Run Xvfb with -s '-screen 0 1280x800x24 -noreset' so the server stays ready between clients. The separate build step is a secondary fix: compilation no longer runs inside the display lifecycle. Preserve connection failures through the existing Native variant; only an unset display remains Unsupported. Capability detection stays boolean and public error mapping stays compatible.
  • Root cause of the quit flake: GPUI 0.3.11 gives returned quit futures only 200 ms, while real blocking-pool scheduling and synced atomic writes can take longer. Drain writes before returning that future, with a separate three-second block_with_timeout budget. Warn and return on timeout. Move the serialization guard into blocking I/O and cancel the coalescing worker so completion does not need another UI task to run. Disk I/O remains off-thread; final placement can be lost if this longer budget expires.
  • Keep all existing fullscreen and normal-bounds assertions. Hold the write gate for twice the normal shutdown deadline in the success test. A second test holds the gate until quit returns, proving the three-second timeout allows exit while the write is still blocked. It uses the production deadline and adds about three seconds; no sleeping worker, retry loop, or tight wall-clock upper assertion. Disable the test scheduler’s randomized early poll cutoff while retaining the real deadline. Test X11 missing-display versus native diagnostics separately.

Evidence: X11 failure compiled inside xvfb-run, then reported Unsupported; the original mapping discarded the precise connect error. Source inspection confirms the repeated connection lifecycle responsible for the reset race. Windows failure raced the real write against GPUI’s shutdown deadline; removing randomized poll limits did not remove that deadline.

Validation: focused rake format passed; rake lint reported zero diagnostics. No local cargo build, test, or clippy commands run.

Final head: 943868821dc7ab0cd4a58c77346407cc55652c25.

Initial run 44886486049: windows-tests 1/1 passed; desktop (ubuntu-24.04) 0/1 passed. Its shortcut lifecycle probe passed, and both window-state regression tests passed in all three Linux test configurations. The desktop job failed only in the separate real-frame smoke step: Desktop smoke exceeded 60s; the app emitted startup and session-service warnings without a panic. Keep that failure visible; no smoke assertion or timeout was relaxed.

Requested final-head reruns: windows-tests 3/3 passed; desktop (ubuntu-24.04) 3/3 passed.

Including the initial run, verified final-head results: windows-tests 4/4 passed; desktop (ubuntu-24.04) 3/4 passed, with the initial separate smoke timeout retained above. Earlier passes on a2a3047 do not count toward this head. Final validation is complete; the PR remains draft and unmerged for user review.

🤖 Generated with Claude Code

1bye and others added 3 commits November 18, 2026 19:38
Build the X11 probe before starting its display and preserve connection diagnostics. Keep write serialization owned by blocking I/O so final shutdown can drain slow writes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The lifecycle probe closes and reopens X connections. Keep Xvfb alive between clients so reconnects cannot race its automatic reset.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Allow slow writes beyond the normal shutdown deadline, but warn and return if the disk remains stuck. Cover both a delayed write and a gate held until quit returns.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1bye added a commit that referenced this pull request Nov 21, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@1bye
1bye marked this pull request as ready for review November 21, 2026 22:36
@1bye
1bye merged commit 814a7fe into main Nov 21, 2026
43 of 44 checks passed
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.

1 participant