Skip to content

build: upgrade vitest to 4.1.0, dynamic coverage badge#515

Merged
jithinraj merged 2 commits intomainfrom
chore/vitest-coverage-badges
Mar 14, 2026
Merged

build: upgrade vitest to 4.1.0, dynamic coverage badge#515
jithinraj merged 2 commits intomainfrom
chore/vitest-coverage-badges

Conversation

@jithinraj
Copy link
Member

@jithinraj jithinraj commented Mar 14, 2026

Summary

  • Upgrade vitest and @vitest/coverage-v8 from 4.0.18 to 4.1.0
  • Add scripts/generate-coverage-summary.mjs that runs vitest with coverage and writes docs/releases/coverage-summary.json
  • Add dynamic Shields coverage badge to README (reads from generated JSON, not a static number)
  • Unify all README badges to brightgreen

Scope

Dev tooling only. No runtime, protocol, or test behavior changes.

Coverage scope

Perf tests (tests/perf/**) are excluded from coverage runs because coverage instrumentation overhead causes SLO threshold assertions to fail. The generated coverage-summary.json includes explicit metadata:

{
  "coverage_provider": "@vitest/coverage-v8",
  "scope": "non-perf",
  "excluded_suites": ["tests/perf/**"]
}

Hidden Unicode check

All changed files scanned with scripts/find-invisible-unicode.mjs: no dangerous Unicode found. GitHub's warning banner on the PR is a false positive from pnpm-lock.yaml integrity hashes.

Validation

  • node scripts/generate-coverage-summary.mjs produces correct JSON (lines 80.98%)
  • All 5732 non-perf tests pass under coverage
  • find-invisible-unicode.mjs clean on all changed files

@jithinraj jithinraj force-pushed the chore/vitest-coverage-badges branch from 4ad7801 to 0c554a3 Compare March 14, 2026 04:28
@jithinraj jithinraj changed the base branch from main to fix/prod-security-audit March 14, 2026 04:31
@jithinraj jithinraj changed the base branch from fix/prod-security-audit to main March 14, 2026 04:40
Upgrade vitest and @vitest/coverage-v8 to 4.1.0. Add coverage
summary generation script (scripts/generate-coverage-summary.mjs)
that produces docs/releases/coverage-summary.json for a dynamic
Shields badge. Update README badges to brightgreen and add coverage.
Add coverage_provider, scope, and excluded_suites fields to the
generated coverage-summary.json for audit transparency. Makes clear
that perf tests are excluded from coverage instrumentation runs.
@jithinraj jithinraj force-pushed the chore/vitest-coverage-badges branch from 65dfea2 to 677ddeb Compare March 14, 2026 04:41
@jithinraj jithinraj changed the title build: upgrade vitest to 4.1.0, add dynamic coverage badge build: upgrade vitest to 4.1.0, dynamic coverage Mar 14, 2026
@jithinraj jithinraj changed the title build: upgrade vitest to 4.1.0, dynamic coverage build: upgrade vitest to 4.1.0, dynamic coverage badge Mar 14, 2026
@jithinraj jithinraj merged commit 6ffb181 into main Mar 14, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant