vitest-dev/vitest
14 rules learned from 1,307 merged PRs: the files and habits in vitest-dev/vitest that kept needing a fix after merge.
- Merged PRs read
- 1,307
- Needed a fix
- 69 (5.3%)
- Reverted
- 1
- Merged between
- 2025-11-07 and 2026-11-10
Tested on PRs the rules had never seen
14 of the 73 code PRs that breached a rule needed a fix (19%), against 0 of the 29 that breached none (0%).
Rules were learned from older PRs, then tested on later PRs they hadn't seen. How we tested
| PR | Title and the rule it breached | What happened |
|---|---|---|
| feat(browser): add failure-only trace view modeHotspot: packages/vitest/src/node/config/resolveConfig.ts (9 of 17 earlier PRs needed a fix) | fixed in #11771, 3 days later | |
| feat(browser): show trace steps timeline on terminal on test failureFragile area: packages/vitest/ (34 of 109 earlier PRs needed a fix) | fixed in #11695, 3 days later | |
| feat: introduce `--since-last-run` flagHotspot: packages/vitest/src/node/config/resolveConfig.ts (9 of 17 earlier PRs needed a fix) | fixed in #11707, 7 days later |
Fix-prone files and folders
PRs that touched these paths needed a follow-up fix more often than the 13% repo average. Counts are PRs that touched the path.
- Hotspot: packages/vitest/src/node/pools/browser.ts
5 of 8 earlier PRs that changed this needed a fix.
3 clean, 5 fixed (63%) - Hotspot: packages/vitest/src/node/project.ts
9 of 16 earlier PRs that changed this needed a fix.
7 clean, 9 fixed (56%) - Hotspot: packages/browser/src/client/orchestrator.ts
6 of 11 earlier PRs that changed this needed a fix.
5 clean, 6 fixed (55%) - Hotspot: packages/vitest/src/node/core.ts
12 of 24 earlier PRs that changed this needed a fix.
12 clean, 12 fixed (50%) - Hotspot: packages/vitest/src/node/config/resolveConfig.ts
13 of 28 earlier PRs that changed this needed a fix.
15 clean, 13 fixed (46%) - Hotspot: packages/vitest/src/integrations/snapshot/chai.ts
4 of 10 earlier PRs that changed this needed a fix.
6 clean, 4 fixed (40%) - Hotspot: packages/vitest/src/node/reporters/base.ts
4 of 10 earlier PRs that changed this needed a fix.
6 clean, 4 fixed (40%) - Fragile area: packages/expect/
8 of 21 earlier PRs that changed this needed a fix.
13 clean, 8 fixed (38%) - Hotspot: packages/vitest/src/node/cache/fsModuleCache.ts
6 of 16 earlier PRs that changed this needed a fix.
10 clean, 6 fixed (38%) - Hotspot: packages/browser-playwright/src/playwright.ts
3 of 9 earlier PRs that changed this needed a fix.
6 clean, 3 fixed (33%) - Fragile area: packages/mocker/
6 of 20 earlier PRs that changed this needed a fix.
14 clean, 6 fixed (30%) - Fragile area: packages/utils/
6 of 21 earlier PRs that changed this needed a fix.
15 clean, 6 fixed (29%) - Fragile area: packages/vitest/
51 of 190 earlier PRs that changed this needed a fix.
139 clean, 51 fixed (27%) - Fragile area: packages/snapshot/
4 of 15 earlier PRs that changed this needed a fix.
11 clean, 4 fixed (27%)
Conventions
Habits most PRs here follow, where PRs that broke them needed a fix more often. Counts on each bar are the PRs that broke it.
No habit here made the list.
Recent PRs that needed a fix
Rules flagged 172 recent PRs, and 39 of those needed a fix (23%), against 12% of all recent PRs. These are the 15 with the strongest rule that needed a fix, with the PR that fixed each.
| PR | Title | Size | Rule it breached | What happened |
|---|---|---|---|---|
| refactor!: separate config resolution from the server creation | +3,485 -3,143 | touches packages/vitest/src/node/project.ts7 clean, 9 fixed | fixed in #10731, same day | |
| fix: track project files and mocks with --changed | +2,804 -229 | touches packages/vitest/src/node/project.ts7 clean, 9 fixed | fixed in #11593, 13 days later | |
| feat(experimental): add an option to cache dependencies instead of statically parsing them | +1,756 -32 | touches packages/vitest/src/node/project.ts7 clean, 9 fixed | fixed in #11596, 7 days later | |
| feat!: share the Vite server between inline projects | +1,270 -355 | touches packages/vitest/src/node/project.ts7 clean, 9 fixed | fixed in #10913, 1 day later | |
| fix(browser): run browser instances as workers | +1,194 -239 | touches packages/vitest/src/node/project.ts7 clean, 9 fixed | fixed in #11582, 6 days later | |
| feat: support merge reports for non-sharded multi-environment runs (take 2) | +902 -203 | touches packages/vitest/src/node/project.ts7 clean, 9 fixed | fixed in #10348, 14 days later | |
| fix!: represent locator as an object instead of a string | +638 -214 | touches packages/browser/src/client/orchestrator.ts5 clean, 6 fixed | fixed in #10227, 1 day later | |
| feat(browser): add failure-only trace view mode | +332 -60 | touches packages/browser/src/client/orchestrator.ts5 clean, 6 fixed | fixed in #11771, 3 days later | |
| fix(browser): wait for orchestrator readiness before resolving browser sessions | +114 -7 | touches packages/browser/src/client/orchestrator.ts5 clean, 6 fixed | fixed in #10555, 8 days later | |
| feat: introduce `--since-last-run` flag | +772 -91 | touches packages/vitest/src/node/core.ts12 clean, 12 fixed | fixed in #11707, 7 days later | |
| fix: apply --shard before the test run starts | +301 -44 | touches packages/vitest/src/node/core.ts12 clean, 12 fixed | fixed in #11924, 5 days later | |
| feat!: parse files statically in vitest list by default | +84 -31 | touches packages/vitest/src/node/core.ts12 clean, 12 fixed | fixed in #11146, 4 days later | |
| chore(vitest): remove dead code that the "./src/*" export was hiding from knip | +81 -178 | touches packages/vitest/src/node/config/resolveConfig.ts15 clean, 13 fixed | fixed in #10928, 3 days later | |
| feat: support `test.ui.theme` option | +193 -14 | touches packages/vitest/src/node/config/resolveConfig.ts15 clean, 13 fixed | fixed in #11517, 1 day later | |
| feat(experimental/snapshot): support custom snapshot matcher | +867 -151 | touches packages/vitest/src/integrations/snapshot/chai.ts6 clean, 4 fixed | fixed in #10042, 2 days later |
Get this for your own repo
Precall reads your repo's history the same way and comments on new PRs that touch the spots that kept breaking.