fix(desktop): run the Electron e2e suite on Linux in the PR gate - #96679
Conversation
🤖 CI report
|
e2927e2 to
dd1183b
Compare
There was a problem hiding this comment.
🟡 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-testjob with a Linuxelectron-testjob that packages and runs Electron E2E under xvfb. - Rewire the live-model
e2ejob and the required-check gate to depend onelectron-testinstead of the removed macOS job. - Extend
desktop-warm-caches.ymlto 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.
There was a problem hiding this comment.
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 |
|
/trunk merge |
|
😎 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
20d5aeb to
1378fd2
Compare
|
/trunk merge |
Problem
depot-macos-26slot on every PR before Desktop Tests reports.Changes
depot-ubuntu-24.04-4under xvfb.e2ejob depend on the newelectron-testjob. Mechanical.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;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;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:workflowsandactionlintpass locally.workflowfilter dispatches every job.Automatic notifications
Docs update
None.
products/desktop/docs/TESTING.mddoes 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-26keeps a macOS runner on every PR for coverage the release job now carries.https://claude.ai/code/session_01AAfrGhk4pdw6Y4X5pEnb9f