fix(ci): portable electron launch for alignment auditor - #702
Merged
Conversation
#695 made the alignment auditor a CI gate but left the macOS Electron.app path hardcoded, so ubuntu-latest e2e dies with ENOENT before any fixture runs (breaks main and every open PR, including #680). Resolve via the electron package export like capture-screenshots and real-window-smoke, and fold spawn errors into the per-fixture failure count instead of an unhandled crash.
Portable electron path alone was not enough: every fixture still died with "fetch failed" on ubuntu-latest because the auditor launched unlike capture-screenshots / Playwright e2e (no cwd, switches after app path, stdio ignored, no Linux sandbox flags, fixed 8.5s sleep). Align spawn with the working launchers: cwd=apps/desktop, app='.', Chromium switches first, --no-sandbox/--disable-gpu/--disable-dev-shm-usage on Linux, pipe stderr/stdout, poll CDP until a page target appears, and include process tails in fixture errors so the next failure is diagnosable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Make the CDP alignment auditor actually boot on
ubuntu-latest. #695 wired it into the e2e job as a CI gate but left a macOS-only Electron path and a launch shape that never opens DevTools on Linux, so main and open PRs (including #680) fail the Alignment audit step.Why
Refs #695 (CI gate introduction). Seen on #680 and #702.
On the runner the failure progressed as:
ENOENTonElectron.app/Contents/MacOS/Electron(hard-coded macOS binary).import('electron'): all 9 fixturesERROR fetch failed— process spawned, but/json/listnever answered (no CDP), withstdio: 'ignore'hiding why.Playwright e2e on the same job already launches Electron successfully; the auditor did not mirror that launch.
Scope
Changed:
scripts/audit-alignment.mjsimport('electron')(platform-correct binary).cwd=apps/desktop, app path'.', Chromium switches before the app path.--no-sandbox,--disable-gpu,--disable-dev-shm-usage.Not included:
Verification
fetched-empty(--remote-debugging-port+cwd=apps/desktop+'.').import('electron')on macOS resolves to.../Electron.app/Contents/MacOS/Electron(package export, not a hand-built string).User-facing impact
None. CI-only script fix; no CHANGELOG, docs, migrations, or breaking changes.
Reviewer notes
scripts/audit-alignment.mjs. Rollback restores the broken hard-coded path / launch.Checklist