From 89d0e2be9b5551dd92efccf3c39c2f59d1180818 Mon Sep 17 00:00:00 2001 From: Garry Tan Date: Tue, 28 Apr 2026 00:00:49 -0700 Subject: [PATCH] fix(windows-ci): curate Playwright-launching tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Round 4 of windows-free-tests fixes. Round 3 cleared shard 2 except for browse/test/batch.test.ts:35 which calls `await bm.launch()` and triggers Playwright Chromium launch. The windows-latest runner doesn't have Chromium installed (browser bring-up is a separate concern, tracked by PR #1238 windows-pty-bun-pty-fix). Fix: extend WINDOWS_FRAGILE_PATTERNS with `await \\w+\\.launch\\(` matcher. Catches batch.test.ts plus 7 sibling tests (commands, compare-board, content-security, handoff, security-live-playwright, security-sidepanel-dom, snapshot — most already excluded by other patterns). Curated Windows subset: 76 → 72 tests (~56% of free suite). Net curation across all 4 rounds: 56 of 128 free tests excluded, each with a logged reason. The 56 excluded fall into 6 buckets — POSIX shells, raw /tmp/, chmod/xargs, file mode bitmasks, forward-slash path assertions, bin/ shebang spawns, and Playwright launches — all tracked as a P4 follow-up TODO for full Windows parity. Co-Authored-By: Claude Opus 4.7 (1M context) --- scripts/test-free-shards.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/test-free-shards.ts b/scripts/test-free-shards.ts index 6ad9e1da..cbde53d3 100755 --- a/scripts/test-free-shards.ts +++ b/scripts/test-free-shards.ts @@ -68,6 +68,12 @@ const WINDOWS_FRAGILE_PATTERNS: Array<{ pattern: RegExp; reason: string }> = [ // tries to execute the file directly via CreateProcess, which fails on the // shebang. Catches gstack-question-log.test.ts, gstack-paths.test.ts, etc. { pattern: /path\.join\([^)]*,\s*['"]bin['"]\s*[,)]/, reason: 'spawns bin/ shebang script (Windows CreateProcess does not parse shebangs)' }, + // Tests that launch a real Playwright browser. The windows-free-tests CI job + // runs a curated subset that intentionally does NOT install Chromium — + // browser bring-up on Windows is a separate concern (see PR #1238). Tests + // matching `await foo.launch(` need Chromium and fail with "Executable + // doesn't exist" on the runner. + { pattern: /await\s+\w+\.launch\(/, reason: 'launches Playwright browser (Chromium not installed in windows-free CI)' }, ]; export const DEFAULT_SHARD_COUNT = 20;