Skip to content

test(plugins): make the CSP refusal Electron probe deterministic on Linux - #37326

Merged
nwparker merged 1 commit into
mainfrom
nwparker/fix-blocked-requests-electron-flake
Nov 2, 2026
Merged

nwparker merged 1 commit into
mainfrom
nwparker/fix-blocked-requests-electron-flake

Conversation

@nwparker

@nwparker nwparker commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​31 $\color{#cf222e}{\Huge{\mathbf{−}}}$​11 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​20
Prod 0 0 0 0

ELI5

A test that checks how Orca reads blocked-request messages from Electron sometimes hung on Linux CI. It now always finishes.

What Changed

plugin-frame-blocked-requests.electron.test.ts loads a page whose content policy blocks everything, then reads the console lines Electron prints. Before, the page declared fonts and media in markup, and the test waited for an exact number of lines. A hidden Linux window may never lay out the page, so the font and media were never requested, the count was never reached, and the 30s launcher timeout fired. In the failed main runs 41388813032 and 41389106099 this showed up in shard 7 as Error: timeout / no result. Now the page requests each kind from script: FontFace.load(), plus appended link, img, iframe, video, script and fetch. It waits for every request to finish, whether it fails or loads, then logs a done line. The main process waits for that line, not for a count.

Why

Requesting from script does not depend on rendering, and each request finishes on its own outcome. If Linux ever stops refusing a kind, the test fails on the origin assertion with a readable diff instead of hanging. The alternative was to wait less strictly, for example for "at least N" lines. That keeps the dependence on layout.

Linked Issue

N/A (maintainer; main CI flake)

Visual Proof

N/A, test-only change.

Testing

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

5/5 passes locally on macOS under ORCA_BACKGROUND_LAUNCH=1. Not run on Linux locally; Linux CI covers it.

Risk

Test-only. Revert with a plain revert.

Level: Low

Review

Agent skill upstream boundary

  • Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

Test-only; no product, SSH, or wire impact.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • I stated the risk: what could break, for whom, and how to back it out
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

…ang on Linux

The probe waited for an exact count of refusal lines, but markup-only fonts and media load
only on layout, which a hidden Linux CI window may skip, so it timed out at 30s. The page
now requests each kind from script, settles each on its own outcome, and logs a done line
the main process waits on.
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