[0.5] test(coverage): ratchet vitest thresholds from measured baseline - #211
Merged
Conversation
Measure current v8 coverage on commit 75c466d and pin thresholds at floor(actual) so the suite passes today but any regression trips the ratchet. Also emit json-summary + reportOnFailure so baselines can be pulled from coverage/coverage-summary.json on subsequent runs. Baseline (2026-04-15): statements 37.49% branches 28.58% functions 34.60% lines 38.36% New thresholds: 37 / 28 / 34 / 38. Targets remain 80 / 70 / 75 / 80.
h4yfans
added a commit
that referenced
this pull request
May 6, 2026
[0.5] test(coverage): ratchet vitest thresholds from measured baseline
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pin desktop vitest coverage thresholds to a measured baseline so the suite
passes today but any regression trips the ratchet.
pnpm test:coverageon top of75c466dbto capture current v8 coveragefloor(actual)per metric (see table)json-summaryreporter andreportOnFailure: trueso future agents canread
apps/desktop/coverage/coverage-summary.jsonwithout re-running on aclean suite
vitest.config.tsdocuments the baseline, base commit,and target coverage so the next ratchet bump knows where to start
Coverage baseline
Base:
75c466db— measured 2026-04-15.Ratchet verification
Bumped
statementsto99locally and re-ran coverage — vitest emitted theexpected threshold errors (
ERROR: Coverage for lines (38.36%) does not meet global threshold (40%)etc.) and exited non-zero. Reverted to the pinnedvalues; final
pnpm test:coverageexits with the only failure being theknown
calendar-page.test.tsx:258"Due draft" flake (unrelated, trackedseparately).
Test plan
pnpm install --frozen-lockfilepnpm lint— 0 errors (warnings only)pnpm --filter @memry/desktop typecheck:nodepnpm --filter @memry/desktop typecheck:webpnpm typecheck:packagespnpm test— 5686/5687 pass (the 1 failure is the pre-existingcalendar-page.test.tsx:258"Due draft" flake)pnpm test:coverage— thresholds satisfied; only the calendar flakefails (does not trip coverage thresholds)