From 2d19a44bcd35992f47a7c176216efe48cca349a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Schultz=20Madsen?= Date: Thu, 7 May 2026 19:00:52 +0200 Subject: [PATCH] chore(playwright): make retries: 0 explicit + document fail-fast intent MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Shard b's playwright specs form a chain of cumulative state mutations (dashboard-assert → dashboard-edit-a → dashboard-edit-b) operating on the same worker "c d" and same week ranges with no per-spec DB reset. When a test fails partway and the suite retries, the chain runs twice; cumulative writes stack; downstream specs see corrupted baselines and fail with confusing deltas (e.g. expected 88.36, got 156.38 — exactly +68 hours of doubled accumulation in WorkingHours). This commit doesn't change current behavior — Playwright's default is already retries: 0. It just makes the value explicit and documents *why* nobody should ever raise it to mask flakes. Future stabilization work belongs in fixing the actual flake source (worker isolation OR adding a test-only reset endpoint OR direct SQL cleanup from a beforeAll hook), not in retries-through-cumulative-state. Fail-fast surfaces the actual flaky test on the first run; otherwise the cascade buries the real culprit under collateral damage. Co-Authored-By: Claude Opus 4.7 (1M context) --- eform-client/playwright.config.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/eform-client/playwright.config.ts b/eform-client/playwright.config.ts index 6281d5126..64b24ee1a 100644 --- a/eform-client/playwright.config.ts +++ b/eform-client/playwright.config.ts @@ -3,6 +3,14 @@ import { defineConfig } from '@playwright/test'; export default defineConfig({ testDir: 'playwright/e2e', workers: 1, + // Explicit fail-fast — do NOT raise this. Shard b's specs form a chain of + // cumulative state mutations on a shared worker / week range with no + // per-spec DB reset; retrying through a partial failure stacks writes and + // produces confusing cascade failures downstream (e.g. expected 88.36, got + // 156.38 from a doubled WorkingHours pass). The actual fix for the + // underlying flake source belongs in test isolation (worker isolation OR + // a test-only reset endpoint), not in masking via retries. + retries: 0, use: { baseURL: 'http://localhost:4200', viewport: { width: 1920, height: 1080 },