Skip to content

Use ${{ runner.temp }} for PLAYWRIGHT_BROWSERS_PATH so install and launch agree on the browser path - #61423

Merged
pelikhan merged 3 commits into
mainfrom
copilot/fix-playwright-browsers-path
Sep 17, 2026
Merged

pelikhan merged 3 commits into
mainfrom
copilot/fix-playwright-browsers-path

Conversation

Copilot AI commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

playwrightBrowsersPath was emitted as the shell string ${RUNNER_TEMP}/gh-aw/playwright-browsers and set via env:, which GitHub Actions never shell-expands. The install step therefore downloaded browsers into a relative directory literally named ${RUNNER_TEMP} (rooted at the job cwd), while playwright-core expanded the variable itself at launch — so the agent looked for a browser that wasn't there.

Changes

  • pkg/workflow/playwright_cli.go: switch the constant to the Actions expression form, which is expanded by the runner before the step executes. This matches the form already used in .github/workflows/ci.yml.

    const playwrightBrowsersPath = "${{ runner.temp }}/gh-aw/playwright-browsers"

    The constant is only ever used in step-level env: blocks (browser install, playwright-cli install --skills, and the agent execution step via applyPlaywrightBrowserEnv), where the runner context is available — top-level workflow env would still be rejected by validateTopLevelEnvExpressions.

  • Tests: updated expectations in pkg/workflow/playwright_cli_test.go.

  • Lock files: recompiled the 19 affected .lock.yml workflows (three env lines each). Action-pin JSON files were deliberately left untouched to keep unrelated pin churn out of the diff.

  • Changeset: added a patch changeset.

Note: make check-workflow-drift fails on .github/workflows/release.lock.yml on the unmodified baseline as well (flaky action-pin resolution in the sandbox); unrelated to this change.

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix issue with playwrightBrowsersPath not expanding Use ${{ runner.temp }} for PLAYWRIGHT_BROWSERS_PATH so install and launch agree on the browser path Sep 16, 2026
Copilot AI requested a review from pelikhan September 16, 2026 23:35
@pelikhan
pelikhan marked this pull request as ready for review September 16, 2026 23:36
Copilot AI balanced review requested due to automatic review settings September 16, 2026 23:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Three Playwright WASM golden outputs remain stale and will fail byte-for-byte tests.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Fixes Playwright browser installation and launch to share the runner’s resolved temporary directory.

Changes:

  • Uses ${{ runner.temp }} for PLAYWRIGHT_BROWSERS_PATH.
  • Updates unit expectations and 19 compiled workflows.
  • Adds a patch changeset.
File summaries
File Description
pkg/workflow/playwright_cli.go Corrects the shared browser path.
pkg/workflow/playwright_cli_test.go Updates install-step expectations.
.github/workflows/weekly-editors-health-check.lock.yml Recompiles Playwright environment paths.
.github/workflows/visual-regression-checker.lock.yml Recompiles Playwright environment paths.
.github/workflows/smoke-test-tools.lock.yml Recompiles Playwright environment paths.
.github/workflows/smoke-gemini.lock.yml Recompiles Playwright environment paths.
.github/workflows/smoke-copilot.lock.yml Recompiles Playwright environment paths.
.github/workflows/smoke-copilot-small.lock.yml Recompiles Playwright environment paths.
.github/workflows/smoke-copilot-arm.lock.yml Recompiles Playwright environment paths.
.github/workflows/smoke-copilot-aoai-entra.lock.yml Recompiles Playwright environment paths.
.github/workflows/smoke-copilot-aoai-apikey.lock.yml Recompiles Playwright environment paths.
.github/workflows/smoke-codex.lock.yml Recompiles Playwright environment paths.
.github/workflows/smoke-claude.lock.yml Recompiles Playwright environment paths.
.github/workflows/smoke-agent-scoped-approved.lock.yml Recompiles Playwright environment paths.
.github/workflows/slide-deck-maintainer.lock.yml Recompiles Playwright environment paths.
.github/workflows/docs-noob-tester.lock.yml Recompiles Playwright environment paths.
.github/workflows/daily-multi-device-docs-tester.lock.yml Recompiles Playwright environment paths.
.github/workflows/daily-model-inventory.lock.yml Recompiles Playwright environment paths.
.github/workflows/cloclo.lock.yml Recompiles Playwright environment paths.
.github/workflows/blog-auditor.lock.yml Recompiles Playwright environment paths.
.github/workflows/archivx-agentic-workflows-analyzer.lock.yml Recompiles Playwright environment paths.
.changeset/playwright-browsers-path-runner-temp.md Documents the patch-level fix.
Review details
  • Files reviewed: 22/22 changed files
  • Comments generated: 1
  • Review effort level: Balanced

💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

browserStep := strings.Join(steps[1], "\n")
assert.Contains(t, browserStep, `bash "${RUNNER_TEMP}/gh-aw/actions/install_playwright_browsers.sh" chromium`)
assert.Contains(t, browserStep, "PLAYWRIGHT_BROWSERS_PATH: ${RUNNER_TEMP}/gh-aw/playwright-browsers")
assert.Contains(t, browserStep, "PLAYWRIGHT_BROWSERS_PATH: ${{ runner.temp }}/gh-aw/playwright-browsers")
@gh-aw-bot

Copy link
Copy Markdown
Collaborator

@copilot CI is failing on this PR and the latest review still requests changes. Please fix the failing checks below, refresh any stale generated outputs, and then run the pr-finisher skill.

Failed checks:

Latest review summary: three Playwright WASM golden outputs appear stale and need to be regenerated before this can merge.

If the branch is behind, refresh it and push the smallest necessary fix set.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • github.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "github.com"

See Network Configuration for more information.

Generated by 👨‍🍳 PR Sous Chef · pi · gpt54 · 50.1 AIC · ⊞ 9.4K · ◷
Comment /souschef to run again

Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>

Copilot AI commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@copilot CI is failing on this PR and the latest review still requests changes. Please fix the failing checks below, refresh any stale generated outputs, and then run the pr-finisher skill.

Failed ...

Fixed in 7cc30a3: regenerated the stale Playwright native/WASM golden outputs. make test-wasm-golden, make test-wasm, make lint, and make test pass. The final pre-push gate reaches only the pre-existing release.lock.yml drift noted in the PR description.

Copilot AI requested a review from gh-aw-bot September 17, 2026 00:04
@pelikhan
pelikhan merged commit 954c78b into main Sep 17, 2026
33 checks passed
@pelikhan
pelikhan deleted the copilot/fix-playwright-browsers-path branch September 17, 2026 04:15
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This pull request is included in a new release.

Release: v0.89.17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

4 participants