ci: skip the Playwright browser download in release builds - #33
Merged
Conversation
The x64 build failed in bootstrap (getaddrinfo ENOTFOUND cdn.playwright.dev) while playwright-core's postinstall tried to download a Chromium. arm64 and the test job passed the SAME commit (v0.9.1 → 2e1b857), so this is a transient network dependency, not a code defect — and an unnecessary one: no LevelCode build runs Playwright browser tests. playwright-core is pulled in transitively by the upstream `copilot` extension. Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 on the Build job env, alongside the GITHUB_TOKEN mitigation that already exists for the same class of problem (postinstall network fetches). Verified against the installed playwright-core: installBrowsersForNpmInstall() short-circuits on getAsBooleanFromENV of this exact var, so the Chromium fetch never runs. Scoped to the Build jobs, not global, so it can't affect the test job if that ever wants a browser. Note: v0.9.1 is a TAG, so this does not retroactively fix that release build (a re-run of the flaked job does); it prevents recurrence for every future release cut from develop. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR hardens the release build workflow by removing an unnecessary network dependency: Playwright’s browser download during playwright-core’s postinstall. This aligns with LevelCode’s release pipeline (which doesn’t run Playwright browser tests) and prevents transient DNS/network failures from breaking x64 release builds.
Changes:
- Set
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1for thebuildjob in the release workflow to skip Playwright’s Chromium download. - Document the rationale alongside the existing
GITHUB_TOKENmitigation for postinstall network fetch flakiness.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ndemianc
added a commit
that referenced
this pull request
Jul 24, 2026
All five points were real. Two of them made the tool quietly report LESS than the truth, which is the failure mode that matters most for something whose whole job is producing accurate facts. 1. prevTag was interpolated into a shell string. A tag name is repo-controlled but still runtime-discovered input, so this is now defended twice: all git calls go through spawnSync with an argv array (a shell cannot be quoted out of one), and the base tag must match ^vX.Y.Z$ before use. Shape matters independently of injection — a stray v0.9.2-rc1 sorts into the 'v*' glob and would silently produce the wrong range, wrong commit list and wrong compare link. Verified: v0.9.2-rc1, v-wip and "v0.9.2; rm -rf /" are all rejected. 2. PRs were only detected from merge commits, so on a squash-merging repo the list would read "(none detected)" while every subject carried "(#123)". Both shapes are now collected. 3. Suites were keyed by basename, so two extensions with the same test filename would produce an ambiguous "biggest suites" list. Keyed by relative path now. 4. The coverage line printed "N cases in total" while suites whose summary could not be parsed silently contributed 0 — authoritative-sounding and UNDER- reporting. This one bit immediately: 5 of 24 suites do not print a count, so "273 cases in total" was wrong. It now says how many suites were counted and names the ones that were not. 5. The fix/perf heading also carried reverts; renamed to say so. Also fixes a bug I introduced while making #2: prNumbers became a Set, but the renderer still read .length, which is undefined on a Set — so the PR list emptied itself silently. Caught by re-running against the real range (expected #33-36, got "(none detected)"). Materialised to a sorted array. Verified end to end against v0.9.1..HEAD: PRs #33-36 detected, coverage line now honest about the 5 unparsed suites, and all guardrails still fire. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The x64 build failed in bootstrap (getaddrinfo ENOTFOUND cdn.playwright.dev) while playwright-core's postinstall tried to download a Chromium. arm64 and the test job passed the SAME commit (v0.9.1 → 2e1b857), so this is a transient network dependency, not a code defect — and an unnecessary one: no LevelCode build runs Playwright browser tests. playwright-core is pulled in transitively by the upstream
copilotextension.Set PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=1 on the Build job env, alongside the GITHUB_TOKEN mitigation that already exists for the same class of problem (postinstall network fetches). Verified against the installed playwright-core: installBrowsersForNpmInstall() short-circuits on getAsBooleanFromENV of this exact var, so the Chromium fetch never runs. Scoped to the Build jobs, not global, so it can't affect the test job if that ever wants a browser.
Note: v0.9.1 is a TAG, so this does not retroactively fix that release build (a re-run of the flaked job does); it prevents recurrence for every future release cut from develop.