playwright-browser-cache-scheduler-home-redirect
Diagnosis complete and verified end-to-end. All deliverables written.
Root cause (3-link chain, each link proven):
registryDirectory = PLAYWRIGHT_BROWSERS_PATH || $HOME/.cache/ms-playwright. The scheduler spawns sessions with HOME=/tmp/dogfood-muster/home, so Playwright looks for browsers in /tmp/dogfood-muster~/ms-playwright/... → browserType.launch: Executable doesn't exist (reproduced byte-for-byte with playwright-core 1.62.0, including the chromium_headless_shell-1234 revision).frontend/tests/setup.ts's isServerRunning() wraps chromium.launch() in a catch-all and returns false on any error, reporting "Dev server not running" when really the browser is missing.if (!serverAvailable) { console.warn(...); return; }, so the suite "passes" in ~2.9 s with zero assertions. Vitest 4's console intercept can even hide the warnings.Fix (one command):
env PLAYWRIGHT_BROWSERS_PATH=~/.cache/ms-playwright npm run test:integration
Verification performed live (repo cloned, deps installed, real browsers at ~/.cache/ms-playwright, Vite running):
- Path/launch matrix — bug env fails with the exact reported error; fix env launches OK even with HOME still redirected
- Detection probe with the repo's own node_modules: LAUNCH FAIL → LAUNCH OK
- Real vitest run of tests/navigation.test.ts: bug → 9/9 "passed" in ~500 ms with 9 skip warnings; fix → 9/9 real browser tests in 7.64 s, zero warnings — matching the production 2.9 s vs 52.7 s deltas
Artifacts:
- /workspace/solution.md — self-contained solution (title, symptom, root cause, exact fix, verification, optional hardening)
- /workspace/evidence.md — raw probe/vitest outputs
- /workspace/signatures.json — signature records with pass/fail
# Evidence - Problem class: playwright-browser-cache-scheduler-home-redirect - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-17T22:32:58.283Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Canopy E2E tick: vitest integration suite reported 49/49 passed in 2.9s but every browser test skipped with warning Dev server not running. Root cause: scheduler-spawned sessions get HOME=/tmp/dogfood-muster/home, so Playwright resolves its browser cache to /tmp/dogfood-muster~/ms-playwright/chromium_headless_shell-1234 which does not exist (browserType.launch: Executable does not exist). Fix: run the suite with PLAYWRIGHT_BROWSERS_PATH=~/.cache/ms-playwright (real browsers live there). Suite then runs real browser tests 49/49 in 52.7s. Detection: suite duration ~3s + Dev server not running warnings = all skips; verify with NODE_PATH=frontend/node_modules node -e chromium.launch probe.", "environment": "linux", "language": "typescript", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "playwright-browser-cache-scheduler-home-redirect", "provider": "openrouter", "solved_at": "2026-08-17T22:32:58.284Z", "version": "playwright 1.5x / vitest integration"}Diagnosis complete and verified end-to-end. All deliverables written.
Root cause (3-link chain, each link proven):
registryDirectory = PLAYWRIGHT_BROWSERS_PATH || $HOME/.cache/ms-playwright. The scheduler spawns sessions with HOME=/tmp/dogfood-muster/home, so Playwright looks for browsers in /tmp/dogfood-muster~/ms-playwright/... → browserType.launch: Executable doesn't exist (reproduced byte-for-byte with playwright-core 1.62.0, including the chromium_headless_shell-1234 revision).frontend/tests/setup.ts's isServerRunning() wraps chromium.launch() in a catch-all and returns false on any error, reporting "Dev server not running" when really the browser is missing.if (!serverAvailable) { console.warn(...); return; }, so the suite "passes" in ~2.9 s with zero assertions. Vitest 4's console intercept can even hide the warnings.Fix (one command):
env PLAYWRIGHT_BROWSERS_PATH=~/.cache/ms-playwright npm run test:integration
Verification performed live (repo cloned, deps installed, real browsers at ~/.cache/ms-playwright, Vite running):
- Path/launch matrix — bug env fails with the exact reported error; fix env launches OK even with HOME still redirected
- Detection probe with the repo's own node_modules: LAUNCH FAIL → LAUNCH OK
- Real vitest run of tests/navigation.test.ts: bug → 9/9 "passed" in ~500 ms with 9 skip warnings; fix → 9/9 real browser tests in 7.64 s, zero warnings — matching the production 2.9 s vs 52.7 s deltas
Artifacts:
- /workspace/solution.md — self-contained solution (title, symptom, root cause, exact fix, verification, optional hardening)
- /workspace/evidence.md — raw probe/vitest outputs
- /workspace/signatures.json — signature records with pass/fail
# Evidence - Problem class: playwright-browser-cache-scheduler-home-redirect - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-08-17T22:32:58.283Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "Canopy E2E tick: vitest integration suite reported 49/49 passed in 2.9s but every browser test skipped with warning Dev server not running. Root cause: scheduler-spawned sessions get HOME=/tmp/dogfood-muster/home, so Playwright resolves its browser cache to /tmp/dogfood-muster~/ms-playwright/chromium_headless_shell-1234 which does not exist (browserType.launch: Executable does not exist). Fix: run the suite with PLAYWRIGHT_BROWSERS_PATH=~/.cache/ms-playwright (real browsers live there). Suite then runs real browser tests 49/49 in 52.7s. Detection: suite duration ~3s + Dev server not running warnings = all skips; verify with NODE_PATH=frontend/node_modules node -e chromium.launch probe.", "environment": "linux", "language": "typescript", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "playwright-browser-cache-scheduler-home-redirect", "provider": "openrouter", "solved_at": "2026-08-17T22:32:58.284Z", "version": "playwright 1.5x / vitest integration"}