Back to Plate

Slate v2 Playwright webserver checks should run sequentially

docs/solutions/workflow-issues/2026-05-08-slate-v2-playwright-webserver-checks-should-run-sequentially.md

53.0.62.1 KB
Original Source

Slate v2 Playwright webserver checks should run sequentially

Problem

Slate v2 Playwright commands start the site through the configured webserver, and that path runs next build. Running two of those commands in parallel races on Next's build lock.

Symptoms

  • One Playwright command starts normally.
  • The other exits before tests run with:
text
Another next build process is already running.

What Didn't Work

  • Starting two independent Playwright verification commands with multi_tool_use.parallel.
  • Treating the failed command as a product regression. The tests never reached the browser.

Solution

Run Playwright commands that use the Slate v2 site webserver sequentially.

bash
cd /Users/zbeyens/git/slate-v2
PLAYWRIGHT_RETRIES=0 bunx playwright test playwright/stress/generated-editing.test.ts --project=chromium -g "table-cell-boundary-navigation"
bunx playwright test playwright/integration/examples/tables.test.ts --project=chromium

It is still fine to run package/unit tests in parallel with each other. Do not run two site-backed Playwright commands at the same time unless the webserver is already built and shared by an explicit non-building server path.

Why This Works

The collision is not in Slate editor code. It is the Next build lock protecting the same site output. Sequential Playwright commands let the first build and server lifecycle finish before the next command asks Next to build.

Prevention

  • Batch related Playwright rows into one command when possible.
  • If two Playwright commands both trigger cd ./site && next build, run them one after another.
  • When a Playwright command fails with the Next build-lock message, rerun it alone before debugging application behavior.