fix(e2e): write a trace on mock-tier failure so the debug path exists

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 <noreply@anthropic.com>
This commit is contained in:
Sergey Kozyrenko
2026-07-24 02:23:56 +07:00
co-authored by Claude Opus 4.8
parent 8a6eecd6e6
commit b6e5564f49
+4 -1
View File
@@ -110,7 +110,10 @@ export default defineConfig<BackendOptions>({
// 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,