QA-PW-122 — No trace capture on retry
Generated from the rule registry. Get the same detail from the CLI with
mjolnir explain QA-PW-122.
| Field | Value |
|---|---|
| Severity | warning |
| Confidence | high |
| Tier | extended |
| Measured FP rate | 6% (n=80) |
| Evidence level | E2 |
| QA impact | False-green risk (FALSE-GREEN) |
| False-positive risk (author estimate) | low |
| Autofix available | no |
| Languages | typescript, javascript |
| Frameworks | playwright |
| Detection strategy | LEXICAL (regex heuristic) |
| Introduced in | v0.3.0 |
Why this fails in production
A test that fails once and passes on retry is exactly the case you'll need evidence for later — with no trace, the flake is uninvestigable.
What gets flagged (real detector output)
playwright.config has no `trace` capture setting.Example from this rule's own must-fire fixture: tests/fixtures/QA-PW-122/must-fire/playwright.config.ts
The fix
Add use: { trace: 'on-first-retry' } to the config.
Confirmed NOT to fire on the corresponding clean pattern
Verified against tests/fixtures/QA-PW-122/must-not-fire/playwright.config.ts — a legitimate, similar-looking pattern this rule correctly leaves alone.
Corpus-measured false-positive risk
Real occurrence counts from npm run corpus:audit against actively-maintained OSS repos — reproduce yourself, don't just trust this table (see the false-positive audit):
| Repo | Occurrences |
|---|---|
| microsoft-playwright-dotnet | 1 |
| microsoft-playwright-mcp | 1 |
| negative-fixtures | 60 |
| nextauthjs-next-auth | 2 |
| positive-fixtures | 62 |
| sveltejs-kit | 25 |
| vercel-next-js | 2 |
| vitest-dev-vitest | 1 |
| withastro-astro | 2 |