[GH-ISSUE #5] Enforce test coverage thresholds in CI #2

Closed
opened 2026-10-15 18:19:46 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @morluto on GitHub (Jul 12, 2026).
Original GitHub issue: https://github.com/morluto/rea/issues/5

Motivation

Coverage instrumentation is available in vitest.config.ts but currently disabled (enabled: false). Enforcing minimum coverage thresholds in CI ensures that new code contributions maintain test quality and gives agents clear feedback when their changes reduce coverage.

Proposed Changes

  1. Enable coverage in vitest.config.ts with provider set to v8
  2. Add coverageThreshold config with initial thresholds (e.g., 60% lines, 60% branches, 60% functions, 60% statements)
  3. Update CI workflow to run tests with coverage and fail on threshold violations
  4. Document coverage expectations in CONTRIBUTING.md

Acceptance Criteria

  • npm test fails when coverage drops below configured thresholds
  • CI workflow enforces coverage on every PR
  • Thresholds are set to realistic values based on current coverage levels
Originally created by @morluto on GitHub (Jul 12, 2026). Original GitHub issue: https://github.com/morluto/rea/issues/5 ## Motivation Coverage instrumentation is available in vitest.config.ts but currently disabled (`enabled: false`). Enforcing minimum coverage thresholds in CI ensures that new code contributions maintain test quality and gives agents clear feedback when their changes reduce coverage. ## Proposed Changes 1. Enable coverage in vitest.config.ts with provider set to v8 2. Add `coverageThreshold` config with initial thresholds (e.g., 60% lines, 60% branches, 60% functions, 60% statements) 3. Update CI workflow to run tests with coverage and fail on threshold violations 4. Document coverage expectations in CONTRIBUTING.md ## Acceptance Criteria - [ ] `npm test` fails when coverage drops below configured thresholds - [ ] CI workflow enforces coverage on every PR - [ ] Thresholds are set to realistic values based on current coverage levels
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
morluto/rea#2
No description provided.