Skip to content

ci(electron): non-blocking real-Electron smoke lane + measured Electron 45 sandbox results - #159

Merged
krassx merged 6 commits into
mainfrom
fix/issue-116
Oct 29, 2026
Merged

krassx merged 6 commits into
mainfrom
fix/issue-116

Conversation

@krassx

@krassx krassx commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Refs #116

Remaining #116 items (rrweb 2.2.0 and the annotation event were already merged in #117 / #143):

  • Real-Electron smoke (packages/instrumentation-tests/harness/electron-smoke.mts + electron-smoke/): bundles the real launchMain + launchRenderer + a single-file sandboxed preload and runs them on a REAL Electron binary (ELECTRON_BIN) in a sandbox: true, contextIsolation: true window with a recording transport (no network). Asserts: sandbox is real, no Buffer/setImmediate in the preload, bridge exposed, session-id handshake, renderer console converges into the one bundle main uploads (with replay.bin, crash.json), onError empty. Run via pnpm --filter @bugsee/instrumentation-tests test:electron-smoke. Mutation check: breaking the renderer marker fails the smoke.
  • electron-compat workflow: nightly + workflow_dispatch (input: version/dist-tag, default alpha), xvfb on ubuntu-latest, never a PR check. No continue-on-error on purpose: GitHub reports such a job as successful, hiding the failures the lane exists to catch; the trigger set alone makes it non-blocking.
  • README (packages/electron/README.md): replaced the "not run on Electron 45" line with the measured results (issue Third-party compat watch (2026-10-22): Electron 45 GA changes sandboxed preloads, display-capture permissions and Windows crash capture #110 comment); the Windows/real-minidump/pixel-video/ASAR "not run" list is kept.

Verification: ran locally on Electron 45.0.0 (macOS, 13/13 PASS). Ran on a real GitHub Linux runner under xvfb with electron@alpha = 46.0.0-alpha.2 (Chromium 158): 13/13 PASS, via a temporary branch-push trigger (since removed). A workflow_dispatch run could not be observed because GitHub only dispatches workflows present on the default branch, so this is Refs, not Fixes; the first dispatch after merge is the remaining check.

Not covered here: sibling-require failure and display-capture routing are measured in the README but not asserted (display-capture is printed); built dist/preload.cjs is not what the smoke bundles.

🤖 Generated with Claude Code

krassx and others added 5 commits October 29, 2026 18:42
…) and measured Electron 45 sandbox results

Refs #116

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…document

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 24 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a56a6194-2c5b-435c-a0c3-56d3ea85d702
Commits

Reviewing files that changed from the base of the PR and between 4d3cb27 and b0f88b9.

Files selected for processing: 8
  • .github/workflows/electron-compat.yml
  • packages/electron/README.md
  • packages/instrumentation-tests/harness/README.md
  • packages/instrumentation-tests/harness/electron-smoke.mts
  • packages/instrumentation-tests/harness/electron-smoke/main-entry.ts
  • packages/instrumentation-tests/harness/electron-smoke/preload-entry.ts
  • packages/instrumentation-tests/harness/electron-smoke/renderer-entry.ts
  • packages/instrumentation-tests/package.json
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@claude

claude Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Claude finished @krassx's task in 50s —— View job


Review of PR #159: real-Electron smoke lane

I read the full diff against origin/main and checked it against the surrounding code (launchMain, launchRenderer, the preload bridge, crash-reporter.ts, and ci.yml conventions). I did not run any tests or tooling. Dependencies aren't installed in this job, so tsc, lint and the smoke itself were not executed by me. The 13/13 results are the author's own, as stated in the PR body.

Findings

One inline comment, P3: on Linux the smoke passes --no-sandbox, so the nightly lane covers the sandboxed-preload environment but not the OS-sandboxed renderer. It's a coverage-wording gap, not a bug (electron-smoke.mts:70).

I considered these and found no real defect:

  • Workflow inputs and concurrency: inputs.electron || 'alpha' is used consistently for the scheduled case, the concurrency group, and the job name.
  • ELECTRON_BIN: installing the binary explicitly before resolving it avoids the lazy-download stdout pollution of $GITHUB_ENV.
  • Network: crashReporter is started with uploadToServer: false (crash-reporter.ts:46), and the transport is a recorder, so the smoke touches no network.
  • Failure modes: a hang or a missing result gives exit 2 via the spawnSync timeout or a missing RESULT_JSON. A missing bundle or missing renderer result fails the assertions rather than passing vacuously.
  • Race: the renderer publishes __result only after its streamed capture has had 1.5 s to reach main, and logException runs after that. So the convergence assertion isn't racing.
  • Conventions: action versions match ci.yml (checkout@v7, pnpm/action-setup@v6, setup-node@v7).
  • continue-on-error: dropping it and relying on the trigger set for non-blocking is the right call.

Minor notes, no action required:

  • A red nightly run only notifies whoever last edited the cron. If this is meant to be an early-warning lane, consider a failure-time issue or Slack step.
  • spawnSync's timeout kills only the main Electron process, so helper processes could linger until the runner is torn down.

Summary

  1. Overall risk: Low. This is CI and harness code only, with no SDK runtime changes. It is triggered only by schedule and manual dispatch, so it can't block PRs.
  2. Merge recommendation: Approve. As the PR notes, the first workflow_dispatch after merge is still the remaining check.
  3. Most important issue to fix: only the P3 above, which is a coverage caveat to document (or to avoid by dropping --no-sandbox when possible).
  4. Positives:
    • Real Electron bundles the real launchMain, launchRenderer and a single-file preload.
    • It measures the actual Electron 45/46 behavior instead of relying on the fake IPC bus.
    • The README is honest about what is not asserted, and the mutation check is documented.
    • It polls rather than sleeping a fixed time and bounds the non-asserted steps.

…ame the sandbox check

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@claude

claude Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Claude finished @krassx's task in 16s —— View job


Re-review of PR #159 after the latest push (b0f88b9e)

I read the latest commit against origin/main and re-read electron-compat.yml and main-entry.ts. I did not run the smoke, tsc or lint. The 13/13 results are the author's.

Earlier finding: addressed

  • P3, --no-sandbox on Linux (electron-smoke.mts): b0f88b9e rewrote the code comment to say the Linux lane covers the sandboxed-preload environment but not the OS-sandboxed renderer path. It also renamed the check to preload runs in a sandboxed context (process.sandboxed) and added the same caveat to the packages/electron/README.md sentence about the lane. That matches the fix I suggested, so I have nothing left to flag.

New findings

None. The commit changes only a comment, a check label and README text, so it can't affect behavior. I re-checked the following and found nothing wrong:

  • Workflow: triggers are schedule and workflow_dispatch only, and there is no continue-on-error. inputs.electron || 'alpha' is used consistently for the cron case. The Electron binary is installed explicitly before ELECTRON_BIN is appended to $GITHUB_ENV.
  • Smoke: it polls with until, bounds the unasserted display-media and stop() steps with within, and uses a recording transport, so no network is touched.

Two minor notes from my first review still apply and need no action. A red nightly run only notifies whoever last edited the cron, and spawnSync's timeout kills only the main Electron process.

Summary

  1. Overall risk: Low. This is CI and harness code only, with no SDK runtime changes, and it can't block PRs.
  2. Merge recommendation: Approve. The first workflow_dispatch run after merge is still the remaining check, as the PR description says.
  3. Issues to fix: none outstanding.
  4. Positives:
    • It exercises the real launchMain and launchRenderer on a real Electron binary.
    • The README states exactly what is and isn't asserted.
    • The fix for the previous finding was prompt and accurate.

@krassx
krassx merged commit 2da6c8e into main Oct 29, 2026
8 checks passed
@krassx
krassx deleted the fix/issue-116 branch October 29, 2026 16:11
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