Skip to content

feat: headless Electron launch smoke test (Linux) - #733

Draft
Letark wants to merge 1 commit into
mainfrom
feat/headless-launch-smoke-test
Draft

feat: headless Electron launch smoke test (Linux)#733
Letark wants to merge 1 commit into
mainfrom
feat/headless-launch-smoke-test

Conversation

@Letark

@Letark Letark commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a headless launch test to the packaging-smoke job that verifies the packaged AppImage actually boots without crashing. This fills the gap between "files exist with correct metadata" and "the app runs."

What it does

  1. Extracts the x64 AppImage to a temp directory
  2. Launches under xvfb-run with --no-sandbox (CI-safe Electron flags)
  3. Monitors stdout for [Startup] log markers (30s timeout)
  4. Waits 5s stabilization period to catch immediate post-boot crashes
  5. Kills the app and reports pass/fail
  6. Cleans up extracted files

What this proves

  • Electron initializes (no missing native modules, no crash on import)
  • Main process reaches app.whenReady() and emits startup logs
  • Reticulum sidecar path resolution succeeds
  • Process stays alive (no immediate crash after boot)

What changed

File Change
scripts/test-electron-headless-launch.mjs New script — launch, monitor, assert, cleanup
.github/workflows/build.yaml Add xvfb install + headless launch step (Linux only)
.github/workflows/release.yaml Same as build.yaml
docs/ci-cd.md Document the new script

Testing

  • Linux-only; gracefully skips on macOS/Windows
  • Requires xvfb package (added to apt-get install step)
  • Can be tested locally: xvfb-run --auto-servernum node scripts/test-electron-headless-launch.mjs
  • CI will validate on next manual build workflow dispatch

Notes

  • This is Phase 1 (process-alive + startup markers). Future phases could add CDP health checks or Playwright E2E.
  • Timeout is 30s for startup + 5s stabilization — generous for CI cold-start.

Add a headless launch test to the packaging-smoke job that verifies the
packaged AppImage actually boots without crashing.

- New script: scripts/test-electron-headless-launch.mjs
  - Extracts x64 AppImage to temp directory
  - Launches under xvfb-run with --no-sandbox (CI-safe)
  - Monitors stdout for [Startup] log markers (30s timeout)
  - Waits 5s stabilization period after markers found
  - Cleans up extracted files
  - Linux-only (skips gracefully on other platforms)

- Workflow changes: build.yaml + release.yaml
  - Added xvfb to apt-get install (alongside squashfs-tools)
  - New step 'Headless Electron launch test (Linux)' after smoke_run
  - Runs only on ubuntu-latest via xvfb-run --auto-servernum

- Docs: docs/ci-cd.md updated with script description

What this proves:
- Electron initializes (no missing native modules, no crash on import)
- Main process reaches app.whenReady() and emits startup logs
- Reticulum sidecar path resolution succeeds (no missing binary crash)
- Basic renderer loading (implicit via process staying alive)
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 931872a5-3491-4837-9cc2-5cd18335ee03

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

Copy link
Copy Markdown

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