Skip to content

Add Playwright loopback smoke workflows - #7934

Merged
lpcox merged 1 commit into
mainfrom
smoke-playwright-loopback
Aug 31, 2026
Merged

Add Playwright loopback smoke workflows#7934
lpcox merged 1 commit into
mainfrom
smoke-playwright-loopback

Conversation

@lpcox

@lpcox lpcox commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add Playwright CLI loopback smoke workflows for Docker/runc, gVisor, Docker sbx, and Cloud Hypervisor
  • run the browser and a JavaScript-rendered test server in the same sandbox over 127.0.0.1
  • configure Chromium to bypass Squid only for loopback and verify non-allowlisted https://example.com navigation fails
  • validate deterministic runtime results after the agent exits
  • extend workflow post-processing so the Playwright gVisor and sbx locks receive required runtime setup

Package provenance

  • pin @playwright/cli@0.1.18
  • verify the exact version exists before installation
  • force npm through https://packagefeedproxy.microsoft.io/npm/
  • allow only Microsoft npm proxy/tarball hosts and Playwright browser-download hosts through AWF
  • block the Node ecosystem and confirm generated lockfiles contain no public npm or yarn registry domains

Both @playwright/cli@0.1.18 and the post-processing dependency ts-node@10.9.2 are available from the Microsoft registry.

Validation

  • real Chromium loopback navigation with JavaScript title rendering
  • blocked non-loopback navigation through an intentionally unavailable proxy
  • workflow compilation and validation for all four runtimes
  • TypeScript type checking
  • post-processing unit tests (59 passing)
  • generated lockfile and shell/Node syntax checks

The runtime workflows intentionally determine whether each sandbox image/rootfs already contains Chromium's required Linux shared libraries; failures will identify which runtime artifact needs those dependencies baked in without granting package-manager privileges inside the sandbox.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6ba940bd-5aa8-4dd2-9c34-fc4c991fe355
Copilot AI balanced review requested due to automatic review settings August 31, 2026 23:06
@github-actions

Copy link
Copy Markdown
Contributor

✅ Coverage Check Passed

Overall Coverage

Metric Base PR Delta
Lines 93.09% 93.11% 📈 +0.02%
Statements 91.73% 91.75% 📈 +0.02%
Functions 92.19% 92.19% ➡️ +0.00%
Branches 85.43% 85.44% ➡️ +0.01%
📁 Per-file Coverage Changes (1 files)
File Lines (Before → After) Statements (Before → After)
src/log-directory-setup.ts 96.2% → 100.0% (+3.78%) 96.3% → 100.0% (+3.71%)

Coverage comparison generated by scripts/ci/compare-coverage.ts

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.

Copilot review overview

🟡 Changes recommended

npm installation bypasses AWF network enforcement, and the Cloud Hypervisor workflow does not expose the required runner tool cache.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 4 Medium severity

New issues introduced by this change (4)
Severity Finding
Medium severity .github/​workflows/​smoke-playwright-runc.md — This install runs as a host setup step before the generated awf invocation…
Medium severity .github/​workflows/​smoke-playwright-gvisor.md — This install runs as a host setup step before the generated awf invocation…
Medium severity .github/​workflows/​smoke-playwright-docker-sbx.md — This install runs as a host setup step before the generated awf invocation…
Medium severity .github/​workflows/​smoke-playwright-cloud-hypervisor.md — This install runs as a host setup step before the generated awf invocation…
What changed in this PR

Adds Playwright loopback smoke coverage across four AWF runtimes, including browser validation, blocked egress checks, and generated workflow support.

Changes:

  • Adds shared Playwright smoke and result-validation scripts.
  • Adds runc, gVisor, Docker sbx, and Cloud Hypervisor workflows.
  • Extends post-processing for new gVisor and sbx locks.
File Description
scripts/​ci/​validate-playwright-loopback-smoke.js Validates runtime results.
scripts/​ci/​run-playwright-loopback-smoke.sh Runs browser smoke checks.
scripts/​ci/​postprocess-smoke-workflows.ts Patches new runtime locks.
.github/​workflows/​smoke-playwright-runc.md Defines runc smoke workflow.
.github/​workflows/​smoke-playwright-runc.lock.yml Compiled runc workflow.
.github/​workflows/​smoke-playwright-gvisor.md Defines gVisor smoke workflow.
.github/​workflows/​smoke-playwright-gvisor.lock.yml Compiled gVisor workflow.
.github/​workflows/​smoke-playwright-docker-sbx.md Defines sbx smoke workflow.
.github/​workflows/​smoke-playwright-docker-sbx.lock.yml Compiled and patched sbx workflow.
.github/​workflows/​smoke-playwright-cloud-hypervisor.md Defines Cloud Hypervisor smoke workflow.
.github/​workflows/​smoke-playwright-cloud-hypervisor.lock.yml Compiled Cloud Hypervisor workflow.
Suppressed comments (1)

.github/workflows/smoke-playwright-cloud-hypervisor.md:49

  • The generated Cloud Hypervisor command omits --cloud-hypervisor-mount-policy workspace-and-tool-cache, although Playwright CLI is installed under the runner's global Node tool cache and the generated guest command scans RUNNER_TOOL_CACHE. AWF defaults to workspace-only and removes that variable unless the cache export exists (docs/awf-config-spec.md:148-164; src/cloud-hypervisor/guest-environment-builder.ts:43-51), so this workflow fails before it can find playwright-cli. Add the explicit tool-cache mount policy to this workflow's generated AWF invocation, then regenerate and post-process the lock.
    runtime: cloud-hypervisor

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

Comment on lines +31 to +34
- name: Install Playwright CLI from Microsoft registry
run: |
test "$(npm view @playwright/cli@0.1.18 version --registry="$NPM_CONFIG_REGISTRY")" = "0.1.18"
npm install -g @playwright/cli@0.1.18 --registry="$NPM_CONFIG_REGISTRY"
Comment on lines +31 to +34
- name: Install Playwright CLI from Microsoft registry
run: |
test "$(npm view @playwright/cli@0.1.18 version --registry="$NPM_CONFIG_REGISTRY")" = "0.1.18"
npm install -g @playwright/cli@0.1.18 --registry="$NPM_CONFIG_REGISTRY"
Comment on lines +31 to +34
- name: Install Playwright CLI from Microsoft registry
run: |
test "$(npm view @playwright/cli@0.1.18 version --registry="$NPM_CONFIG_REGISTRY")" = "0.1.18"
npm install -g @playwright/cli@0.1.18 --registry="$NPM_CONFIG_REGISTRY"
Comment on lines +31 to +34
- name: Install Playwright CLI from Microsoft registry
run: |
test "$(npm view @playwright/cli@0.1.18 version --registry="$NPM_CONFIG_REGISTRY")" = "0.1.18"
npm install -g @playwright/cli@0.1.18 --registry="$NPM_CONFIG_REGISTRY"
@github-actions

Copy link
Copy Markdown
Contributor

⏳ Copilot review left inline comments.

@lpcox To proceed:

  1. Ask @copilot to address the review feedback (reply to this comment or the review thread)
  2. Once the fix is pushed, add the ready-for-aw label to trigger agentic CI smoke tests

@lpcox
lpcox merged commit 07b3c1b into main Aug 31, 2026
26 of 27 checks passed
@lpcox
lpcox deleted the smoke-playwright-loopback branch August 31, 2026 23:24
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.

2 participants