Repository navigation
Measure the 95% coverage gate on extension code only - #11
Merged
Merged
Conversation
The gate counted src/test/ (tests, the fake server and recorder) toward the total, which raised it. Exclude test code from coverage and include source files no test loads, so 95% has to come from the extension itself. Extension-only coverage today: 98.6% lines and statements, 100% functions, 95.7% branches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NcUyc2475ugBRGPm7yQMzy
Merged
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.
The CI job Tests (coverage >= 95%) already fails below 95% (
scripts/check-coverage.mjs 95, checking lines, statements, functions and branches). But the total it checked includedsrc/test/: the tests themselves, the fake whisper-flow server and the fake recorder. Test code is nearly 100% covered by definition, so it inflated the number.Change
.vscode-test.mjsnow configures coverage:exclude: ["**/test/**"], so only extension code countsincludeAll: true, so a source file that no test imports counts as 0% instead of being left outThe 95% threshold, the CI job and
npm run test:coverageare unchanged.CLAUDE.mddocuments what's measured.Coverage without test code
All 74 tests pass. Branches have the least headroom, so new code with untested branches will fail the gate. That's the point. The lowest file is
workspaceVocabulary.tsat 83% branches (the scan time budget and unreadable-file paths); the gate checks the total, not each file.Not in this PR: making the check required
mainhas no branch protection in this repo or in whisper-flow, so a failing coverage job shows a red X but doesn't block merging. Requiring the check is a repository setting (a branch protection rule or ruleset), not a file, so it can't be part of a PR.🤖 Generated with Claude Code
https://claude.ai/code/session_01NcUyc2475ugBRGPm7yQMzy