Skip to content

fix(desktop): run the Electron e2e suite on Linux in the PR gate - #96679

Merged
trunk-io[bot] merged 4 commits into
fix/devex-desktop-release-gatefrom
fix/devex-desktop-linux-electron-e2e
Sep 8, 2026
Merged

fix(desktop): run the Electron e2e suite on Linux in the PR gate#96679
trunk-io[bot] merged 4 commits into
fix/devex-desktop-release-gatefrom
fix/devex-desktop-linux-electron-e2e

Conversation

@webjunkie

@webjunkie webjunkie commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Problem

  • Desktop engineers wait up to an hour for a depot-macos-26 slot on every PR before Desktop Tests reports.
  • Merge-queue batches paid the same wait until fix(desktop): skip the macOS integration test on merge queue batches #96546 skipped the job there, which removed the only Electron boot check on a batch of stale PRs.
  • The Electron Playwright suite does not need macOS. The fixture already resolves the Linux build, the packager builds unpacked only, and the icon script exits cleanly off macOS.

Changes

  • Desktop Tests no longer requests a macOS runner. The Electron suite packages and runs on depot-ubuntu-24.04-4 under xvfb.
  • The job runs on every PR including drafts, and on merge-queue batches. The draft skip fix(desktop): take desktop tests off the master push lane #96633 added existed only to spare the macOS pool.
  • Master coverage stays on the daily cron from fix(desktop): take desktop tests off the master push lane #96633, plus the on-demand run the tag job dispatches (fix(desktop): gate the release tag on master Desktop Tests #96677).
  • macOS-specific coverage (signing, asar layout, Squirrel) stays in the release job, which the layer below moved to the full suite.
  • The gate and the live-model e2e job depend on the new electron-test job. Mechanical.
  • The master cache warmer now seeds the Linux Electron and Playwright caches the job restores, so PR runs do not download both every time.
  • Chromium's system libraries install on every run, not only on a browser cache miss, because the packaged Electron app needs them too.

Before:

flowchart LR
    changes --> unit[unit-test<br/>Linux]
    changes --> integ[integration-test<br/>depot-macos-26]
    unit --> e2e[e2e<br/>Linux]
    integ --> e2e
    integ --> pass[Desktop Tests Pass]
    e2e --> pass
    classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
    classDef phRed fill:#f54e00,stroke:#f54e00,color:#fff;
    classDef phYellow fill:#f9bd2b,stroke:#f9bd2b,color:#000;
    class unit,e2e phBlue;
    class integ phRed;
    class pass phYellow;
Loading

After:

flowchart LR
    changes --> unit[unit-test<br/>Linux]
    changes --> el[electron-test<br/>Linux, xvfb]
    unit --> e2e[e2e<br/>Linux]
    el --> e2e
    el --> pass[Desktop Tests Pass]
    e2e --> pass
    classDef phBlue fill:#1d4aff,stroke:#1d4aff,color:#fff;
    classDef phYellow fill:#f9bd2b,stroke:#f9bd2b,color:#000;
    class unit,el,e2e phBlue;
    class pass phYellow;
Loading

Note

Verified on this PR's CI: the app packages, boots and runs the suite on the Depot Linux runner with the default Chromium sandbox. The Depot kernel does not carry Ubuntu 24.04's user-namespace restriction, so no sysctl or sandbox helper change is needed.

Overlaps with #95852, which moves only the web suite off macOS. This layer supersedes it if it lands. Rebased over #96633, which kept the cron and lockfile-only cache warming.

How did you test this code?

  • hogli lint:workflows and actionlint pass locally.
  • The CI run on this PR is the test. The workflow file changed, so the workflow filter dispatches every job.
  • Not run locally: the host is macOS, so the Linux packaging and xvfb path could not be exercised here.

Automatic notifications

  • Publish to changelog?

Docs update

None. products/desktop/docs/TESTING.md does not describe the CI runner.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Claude Code (Fable 5.1 orchestrating, Opus subagent implementing). Skills invoked: /stacking-prs, /authoring-ci-workflows, /writing-code-comments, /writing-pr-descriptions, /simplify. Top layer of a stack. Alternative rejected: moving the job to GitHub-hosted macos-26 keeps a macOS runner on every PR for coverage the release job now carries.

https://claude.ai/code/session_01AAfrGhk4pdw6Y4X5pEnb9f

@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

🤖 CI report

⚠️ Trunk lane — backend Python lane

This PR is assigned to the backend Python lane. It runs backend Python tests and may merge in parallel with PRs in other lanes.

@webjunkie
webjunkie force-pushed the fix/devex-desktop-linux-electron-e2e branch from e2927e2 to dd1183b Compare September 8, 2026 18:52
@webjunkie
webjunkie marked this pull request as ready for review September 8, 2026 18:53
Copilot AI lite review requested due to automatic review settings September 8, 2026 18:53
@pr-assigner-resolver-posthog
pr-assigner-resolver-posthog Bot requested a review from a team September 8, 2026 18:54

Copilot AI 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.

🟡 Changes recommended

The PR description states a required Ubuntu 24.04 sysctl adjustment for Chromium sandboxing, but the new Linux electron-test job doesn’t apply it, risking a mismatch between documented and shipped behavior.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

Moves the Desktop Electron Playwright suite off the macOS pool by introducing a Linux electron-test job in the Desktop Tests workflow, and updates cache-warming so Linux Electron/Playwright caches are pre-seeded on master.

Changes:

  • Replace the macOS integration-test job with a Linux electron-test job that packages and runs Electron E2E under xvfb.
  • Rewire the live-model e2e job and the required-check gate to depend on electron-test instead of the removed macOS job.
  • Extend desktop-warm-caches.yml to seed Linux Electron and Playwright browser caches using the same keys as the new Linux job.
File summaries
File Description
.github/workflows/desktop-warm-caches.yml Adds Linux Electron + Playwright cache seeding to match the new Linux Desktop test job’s cache keys.
.github/workflows/desktop-test.yml Replaces the macOS integration job with a Linux Electron E2E job (xvfb), updates cache paths, and rewires downstream dependencies/gate.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/desktop-test.yml
@webjunkie webjunkie added the stamphog Request AI approval (no full review) label Sep 8, 2026

@stamphog stamphog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Not approved yet — waiting on the conditions below.

Re-add the stamphog label to request another review once you have addressed this.

Gates denied this PR as CI/infra tooling territory, and Copilot's review comment about a possible sandbox/sysctl mismatch between the PR's claims and the actual workflow remains unresolved — CI changes need human sign-off here, not automated approval.

  • Deterministic gates denied: deny-list match on CI/infra changes and T2-never tier classification.
  • Copilot review comment (older commit) raised a possible mismatch between the PR's sandbox/sysctl claims and the new Linux electron-test job; not visibly resolved in the diff or discussion.
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list matches: infra_cicd
size 75L, 2F substantive — within ceiling
tier classified as T2-never: T2-never (75L, 2F, single-area, fix)
stamphog 2.0.0b4 .stamphog/policy.yml @ 20d5aeb · reviewed head 20d5aeb

@stamphog stamphog Bot removed the stamphog Request AI approval (no full review) label Sep 8, 2026

@charlesvien charlesvien left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, great move

@webjunkie

Copy link
Copy Markdown
Contributor Author

/trunk merge

@trunk-io

trunk-io Bot commented Sep 8, 2026

Copy link
Copy Markdown

😎 Stack merged successfully - details.

depot-macos-26 is a fixed-size FIFO pool, so its wait sat on every
desktop PR, and the job was skipped on trunk-merge/** batches to keep the
queue moving. A batch of stale PRs is exactly what this job should catch,
so the skip goes with the runner.

The Electron fixture already resolves out/linux-unpacked/PostHog, the
package script builds unpacked only, and the glass-icon script exits 0
off macOS, so the suite runs on a Linux runner under xvfb. macOS-specific
coverage (signing, asar layout, Squirrel) lives in the release job.

Claude-Session: https://claude.ai/code/session_01AAfrGhk4pdw6Y4X5pEnb9f
The Depot Ubuntu 24.04 runner has no kernel.apparmor_restrict_unprivileged_userns
key, so the restriction the step worked around is not there and sysctl -w
failed the job instead.

Claude-Session: https://claude.ai/code/session_01AAfrGhk4pdw6Y4X5pEnb9f
xvfb-run starts a 640x480 display by default. The smoke suite asserts a
window at least 900x600, which the app could not reach on that screen.

Claude-Session: https://claude.ai/code/session_01AAfrGhk4pdw6Y4X5pEnb9f
The app starts maximized, and maximize() has no effect without a window
manager. On a bare Xvfb the default 1200x600 window keeps its Linux frame
and offers 573px of content, under the 600px the smoke suite asserts.
fluxbox inside the Xvfb session lets the window maximize like on a desktop.

Claude-Session: https://claude.ai/code/session_01AAfrGhk4pdw6Y4X5pEnb9f
@webjunkie

Copy link
Copy Markdown
Contributor Author

/trunk merge

@trunk-io
trunk-io Bot merged commit ccfa070 into master Sep 8, 2026
206 checks passed
@trunk-io
trunk-io Bot deleted the fix/devex-desktop-linux-electron-e2e branch September 8, 2026 23:12
@deployment-status-posthog

deployment-status-posthog Bot commented Sep 8, 2026

Copy link
Copy Markdown

Deploy status

Environment Status Deployed At Workflow
dev ✅ Deployed 2026-09-08 23:48 UTC Run
prod-us ✅ Deployed 2026-09-09 00:07 UTC Run
prod-eu ✅ Deployed 2026-09-09 00:09 UTC Run

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature/desktop Feature Tag: Desktop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants