Skip to content

ci: raise coverage thresholds to match current levels - #551

Merged
askpt merged 1 commit into
mainfrom
repo-assist/eng-raise-coverage-thresholds-20260818-8878d17f7c384228
Aug 20, 2026
Merged

ci: raise coverage thresholds to match current levels#551
askpt merged 1 commit into
mainfrom
repo-assist/eng-raise-coverage-thresholds-20260818-8878d17f7c384228

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This pull request was created by Repo Assist, an automated AI assistant.

Summary

The c8 coverage gate in .c8rc.json was left at 80% lines/statements, 88% branches, 95% functions, while actual coverage on the analyzer/factory source has been sitting at 98%+ for many runs. A gate this loose would let a real coverage regression slip through CI unnoticed until it had already grown large.

What changed

  • Raised thresholds to 95% lines/statements, 88% branches, 97% functions - just below current measured coverage (98.73% / 94.12% / 99.01%), leaving headroom for normal fluctuation while still catching meaningful regressions.
  • Excluded out/extension.js, out/configuration.js, and out/providers/** from coverage, matching the same VS Code-API exclusion already used by PR [repo-assist] feat: add cognitive complexity diagnostics provider #511 (diagnostics provider) - these files depend on the vscode API and cannot be exercised by the headless mocha/c8 unit test run; including them without a matching test harness would otherwise force thresholds back down to ~80%.

Why

A meaningful coverage gate is one of the cheapest ways to prevent silent regressions. No production code changes.

Trade-offs

  • If a future PR legitimately needs to touch providers/** logic that can be unit-tested (pure helper functions, etc.), consider moving that logic out of the excluded files rather than adding it to a file this config skips.

Test Status

npm run compile   ✅ (0 errors)
npm run lint      ✅ (0 warnings)
npm run test:unit ✅ 225 passing, 0 failing
Coverage: 98.73% stmts / 94.12% branch / 99.01% funcs / 98.73% lines (gate: 95/88/97/95)

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by 🌈 Repo Assist, see workflow run. Learn more.
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@42c2ab5b4e4c9273534c39259b2e0df7f20f07e9

Coverage on the analyzer/factory source (excluding VS Code-API-dependent
files not exercised by unit tests) has been at 98%+ for several runs while
the c8 gate was still set at 80/80/88/95. Raise thresholds to 95/95/88/97
so future coverage regressions are caught by CI instead of drifting
unnoticed, and exclude extension.js/configuration.js/providers/** (the
same VS-Code-API surface excluded by PR #511) since they cannot be
exercised in the headless unit test environment.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@askpt askpt changed the title [repo-assist] ci: raise coverage thresholds to match current levels ci: raise coverage thresholds to match current levels Aug 20, 2026
@codecov

codecov Bot commented Aug 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.89%. Comparing base (572f97d) to head (d728624).

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #551       +/-   ##
===========================================
+ Coverage   83.07%   97.89%   +14.82%     
===========================================
  Files          13       10        -3     
  Lines        4372     3710      -662     
  Branches      455      455               
===========================================
  Hits         3632     3632               
+ Misses        739       77      -662     
  Partials        1        1               

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@askpt
askpt marked this pull request as ready for review August 20, 2026 13:36
@askpt
askpt self-requested a review as a code owner August 20, 2026 13:36
Copilot AI balanced review requested due to automatic review settings August 20, 2026 13:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Raises c8 coverage gates to catch regressions while excluding VS Code-dependent modules from headless unit coverage.

Changes:

  • Raises line/statement thresholds to 95% and function coverage to 97%.
  • Excludes extension, configuration, and provider outputs from unit coverage.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@askpt
askpt merged commit 4a05683 into main Aug 20, 2026
25 checks passed
@askpt
askpt deleted the repo-assist/eng-raise-coverage-thresholds-20260818-8878d17f7c384228 branch August 20, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants