From b6e5564f4921e6f4d32966f65f972851908bb2eb Mon Sep 17 00:00:00 2001 From: Sergey Kozyrenko Date: Fri, 24 Jul 2026 02:23:56 +0700 Subject: [PATCH] fix(e2e): write a trace on mock-tier failure so the debug path exists MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mock PR gate runs retries:0, but trace was 'on-first-retry' — so it never recorded a trace on that tier, while docs/e2e.md ("Debugging a red CI run") and the auto-posted PR comment both tell you to open trace.zip from the mock tier's e2e-report artifact. Every red gate run dead-ended the advertised debug path. Switches trace to 'retain-on-failure' (matching video on the same line), keeping the stand tier at 'off' for the session-cookie privacy reason. Proven on a clean host: a failing mock test (retries:0) now writes trace.zip + video.webm. Co-Authored-By: Claude Opus 4.8 --- frontend/e2e/playwright.config.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/e2e/playwright.config.ts b/frontend/e2e/playwright.config.ts index 9f936482..7d79338a 100644 --- a/frontend/e2e/playwright.config.ts +++ b/frontend/e2e/playwright.config.ts @@ -110,7 +110,10 @@ export default defineConfig({ // Stand traces/videos embed the live session cookie and the setup // project's password fill; CI uploads test-results as a public-repo // artifact, so they must never be recorded on that tier. - trace: tier === 'stand' ? 'off' : 'on-first-retry', + // retain-on-failure, not on-first-retry: the mock PR gate runs retries:0, + // so on-first-retry would never write a trace — yet the docs and the PR + // comment tell you to open trace.zip from that tier's report. + trace: tier === 'stand' ? 'off' : 'retain-on-failure', video: tier === 'stand' ? 'off' : 'retain-on-failure', }, // The gate must test the shipped artifact: keep this on the production build,