Skip to content

ci: prove the Xvfb display before desktop jobs and smoke artifacts once - #651

Merged
Rinat S (rsolmano) merged 2 commits into
mainfrom
ci-xvfb-readiness
Oct 6, 2026
Merged

Rinat S (rsolmano) merged 2 commits into
mainfrom
ci-xvfb-readiness

Conversation

@rsolmano

@rsolmano Rinat S (rsolmano) commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

On the first run of #642 (now merged), desktop shard 1/4 failed before any test ran. The native smoke:desktop timed out (native-ui desktop ready, 30 s) because the virtual display never became usable: Electrobun logged GlobalShortcut event loop failed to initialize and GTK never started, where a healthy run logs X11 display opened successfully. That is a runner-environment fault, not an app regression. With the suites sharded, each native smoke also runs in every shard, so a rare fault like this is 4× as likely to fail CI while adding no coverage.

Approach

Retry the virtual display only, never the app or the tests.

  • Desktop shards start Xvfb as an explicit step and continue only once xdpyinfo (an X client on the exported DISPLAY, no auth cookie) connects. If it doesn't answer within 10 s, the server is killed, its lock and socket are cleared, and it is restarted, at most 3 times. After that the job fails with the Xvfb log. Once the display is proven, any application failure fails CI as before.
  • smoke:binary and smoke:desktop run only in shard 1. Each run still smokes each artifact exactly once, as it did before sharding.

Blanket job retries were considered and rejected: they would also hide real regressions, against the no-blanket-retries flake policy in e2e/SPEC.md.

Changes

  • .github/workflows/ci.yml
    • New Start virtual display step in desktop-shard that exports DISPLAY=:99 via GITHUB_ENV.
    • xvfb-run -a dropped from the smoke and e2e steps, and x11-utils replaces xauth in the apt list.
    • if: matrix.shard == 1 on smoke:binary and smoke:desktop.
  • .github/SPEC.md: records the shard-1-only smoke rule and the display-only retry boundary.

Screenshots

Not applicable — no frontend changes.

Related issues

None.

Checklist

  • Fast gates pass: bun run lint, bun run typecheck, bun run test — not rerun: no source, test or config files changed (CI workflow + spec only); this PR's CI runs them
  • E2E suite passes for app-affecting changes (bun run e2e, or bun run e2e:full when touching agent behavior) — not app-affecting; this PR's CI runs every desktop/binary shard on the new display step
  • Before/after screenshots are included for frontend changes, or marked not applicable
  • Relevant SPEC.md / top-level specs updated to reflect any boundary, contract, or behavior change
  • I have read the Contributing guide and agree to the Code of Conduct

Testing

  • @action-validator/cli .github/workflows/ci.yml → valid
  • bash -n on the extracted display step → OK
  • Display step with stubbed Xvfb/xdpyinfo, server answering on the 2nd start → exit 0 after 2 starts, DISPLAY=:99 exported
  • Same stubs, server never answering → exit 1 after 3 starts, nothing exported
  • Not run on a Linux runner locally; this PR's CI is the first real run of the display step.

@jetbrains-air jetbrains-air Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — ready to merge.

Base automatically changed from ci-speedup-review to main October 6, 2026 07:29

@jetbrains-air jetbrains-air Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — ready to merge.

@jetbrains-air jetbrains-air Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved — ready to merge.

@rsolmano
Rinat S (rsolmano) added this pull request to the merge queue Oct 6, 2026
Merged via the queue into main with commit 1f8c01f Oct 6, 2026
17 of 34 checks passed
@rsolmano
Rinat S (rsolmano) deleted the ci-xvfb-readiness branch October 6, 2026 08:38
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.

2 participants