Skip to content

Coverage floors: add per-file thresholds for critical modules and tools #302

Closed

Description

@TMHSDigital

Summary

The only threshold is an aggregate src/utils/** 90% lines, so recorder.ts (61.8%) and events.ts (70%) pass; src/tools/**, src/index.ts and src/wgcRecorder.ts have no floor.

Where

  • vitest.config.ts:16-21
  • .github/workflows/ci.yml:127-152

Impact

Coverage can drop on the most critical files while CI stays green.

Suggested fix

  • perFile: true floors for src/utils/{recorder,lifecycle,sessions,events}.ts (raise as the related test issues land)
  • A src/tools/** line floor at today's measured level
  • src/index.ts and src/wgcRecorder.ts once they have tests (need NODE_V8_COVERAGE on the child process)

Acceptance criteria

  • Per-file floors configured and enforced in CI

Getting started

  • Relevant files: vitest.config.ts, .github/workflows/ci.yml
  • How to run tests: npm run build && npm test (also npm run typecheck and npm run lint)
  • Related docs: CONTRIBUTING.md, AGENTS.md

Filed by repo-audit/full-audit at f2fda28. Severity: low. Effort: S. audit-key: testing|vitest.config.ts|coverage.thresholds

Activity

  1. added
    good first issue
    priority: low
    testing
    on Nov 9, 2026
  2. TMHSDigital commented on Nov 10, 2026

    @TMHSDigital
    OwnerAuthor

    Fixed in 265975b: vitest.config.ts now enforces line floors for src/utils/recorder.ts (58), lifecycle.ts (77), sessions.ts (88), events.ts (66) and src/tools/** (77), about 4 points under a local Windows run. src/index.ts and src/wgcRecorder.ts need child-process coverage, so their floors belong with #295 and #296. Verified: npm run test:coverage passes, and a deliberately high floor fails the run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    good first issuepriority: lowtesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions