Playwright Browser QA
Browser-based frontend quality check — resolution chain across CLI, MCP, and operator-specified browser; default headless mode, optional visible mode, hard-fail strict visible mode.
Overview
When a task touches any frontend markup, the quality-review step automatically runs a browser pass against the local dev surface and writes screenshot, trace, and a short summary into a per-task artefact directory. The pass is skipped silently for tasks with no frontend touch. If no browser tool is available on the host, the step records a finding and proceeds — the absence of tooling is never a blocker.
Resolution Chain
The bundled detection script picks the first available tool in this order: command-line Playwright, MCP-bridged Playwright, an operator-specified browser binary supplied via environment variable. If none of the three are present, the chain returns «none» and the step emits a single advisory line instead of a screenshot.
Headed Modes
- Default — headless run. No display required.
- Visible (lenient) — operator asks for a visible browser via flag or in the original brief. If a display is available, the browser opens on screen; if not, the step records an advisory and falls through to headless mode.
- Visible (strict) — same flag with stricter contract. If a display is unavailable, the step exits with a hard-fail code; the operator must run on a machine with a display.
Artefact Layout
Each run writes into a timestamped subdirectory: datarim/qa/playwright-{TASK-ID}/run-<ISO-timestamp>/ containing screenshot.png, an optional trace.zip, the combined standard output and standard error log, and a short summary.md. A latest symbolic link points to the most recent run (a copy fallback is used on filesystems that do not support symbolic links).
Concurrency
A per-task lock prevents two parallel quality-review runs from clobbering each other's artefacts. The lock uses a portable mechanism that gracefully degrades on systems without the standard locking command.
Source
Contract shipped with Datarim v2.8.0.