fix(windows-ci): curate pre-existing breakage from v1.14.0.0 sidebar refactor

Round 10 of windows-free-tests fixes. Round 9 cleared shards 7+8; shard 9
surfaced ENOENT for browse/src/sidebar-agent.ts. That file was DELETED in
v1.14.0.0 (sidebar REPL refactor — sidebar-agent.ts and the chat queue
path were ripped in favor of the interactive xterm.js PTY). 10 security
tests still reference it via top-level fs.readFileSync and fail on import.

Verified locally: `bun test browse/test/security-source-contracts.test.ts`
on this branch reports 0 pass, 1 fail, 1 error. Mac/Linux CI exits 0
because Bun reports module-load failures as "error" not "fail" and the
exit code is 0; Windows CI exits 1 (stricter). Same pre-existing
breakage on every platform — just only visible in shard 9 of the
Windows lane.

Fix: add WINDOWS_FRAGILE_PATTERNS entry matching `sidebar-agent.ts` /
`src/sidebar-agent` references. Curates browse/test/sidebar-ux.test.ts
(other 9 likely caught by paid-eval filter or earlier patterns).

Tracked as a follow-up TODO: update or delete the 10 security tests that
reference deleted source. Out of scope for v1.20.0.0 portability wave.

Curated subset: 64 → 63 tests (~49% of free suite).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-04-28 00:19:07 -07:00
parent 6841d82a98
commit 288a6cee29
+7
View File
@@ -84,6 +84,13 @@ const WINDOWS_FRAGILE_PATTERNS: Array<{ pattern: RegExp; reason: string }> = [
// BROWSE_HEADLESS_SKIP=1 to skip the browser launch but still need a working
// server, which they don't get on Windows.
{ pattern: /BROWSE_HEADLESS_SKIP|spawn\(\[['"]bun['"],\s*['"]run['"]/, reason: 'spawns the browse server subprocess (Bun-driven path is Windows-broken)' },
// Tests that read browse/src/sidebar-agent.ts — deleted in v1.14.0.0
// sidebar refactor (replaced by sidepanel-terminal.js). 10 security tests
// still reference it and fail on import. They've been broken on every
// platform since v1.14, but Bun on macOS/Linux reports the failure as a
// module-load error (exit 0) while Bun on Windows treats it as a hard
// fail (exit 1). Tracked as a follow-up: update or delete these tests.
{ pattern: /['"]sidebar-agent\.ts['"]|src\/sidebar-agent['"]/, reason: 'reads deleted browse/src/sidebar-agent.ts (pre-existing breakage from v1.14.0.0 sidebar refactor)' },
];
// Explicit known-Windows-incompatible test files that don't fit a regex