Found while doing #259 / #260. Not caused by that change — it reproduces on main unmodified.
This suite reports different coverage depending on whether fixtures/*/results already exists:
| tree |
Statements |
Branches |
Functions |
Lines |
cold (after pnpm clean) |
96.81 |
93.42 |
93.1 |
96.7 |
warm (a second pnpm coverage) |
97.17 |
94.73 |
94.25 |
96.7 |
The delta is entirely in src/match.ts. createMatchFunction snapshots the result directory up front, and removeUnchangedFiles only runs when there are prior result files to compare against — so on a cold tree that path and its branches are never taken.
Two consequences:
vitest.config.ts carries a comment attributing these two number sets to "platform-conditional paths [that] are not taken on the ubuntu runner". That explanation is wrong. CI reports the lower pair because CI is always a cold checkout, not because of the platform. The comment should be corrected so the next person tuning the thresholds is not misled.
- The thresholds are effectively pinned to the cold numbers, which is the right choice, but it is accidental rather than stated.
Worth deciding whether removeUnchangedFiles should have a test that exercises it deterministically, which would collapse the two sets into one.
Found while doing #259 / #260. Not caused by that change — it reproduces on
mainunmodified.This suite reports different coverage depending on whether
fixtures/*/resultsalready exists:pnpm clean)pnpm coverage)The delta is entirely in
src/match.ts.createMatchFunctionsnapshots the result directory up front, andremoveUnchangedFilesonly runs when there are prior result files to compare against — so on a cold tree that path and its branches are never taken.Two consequences:
vitest.config.tscarries a comment attributing these two number sets to "platform-conditional paths [that] are not taken on the ubuntu runner". That explanation is wrong. CI reports the lower pair because CI is always a cold checkout, not because of the platform. The comment should be corrected so the next person tuning the thresholds is not misled.Worth deciding whether
removeUnchangedFilesshould have a test that exercises it deterministically, which would collapse the two sets into one.