Skip to content

[repo-assist] ci: raise coverage thresholds to match current levels - #551

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/eng-raise-coverage-thresholds-20260818-8878d17f7c384228
Draft

[repo-assist] ci: raise coverage thresholds to match current levels#551
github-actions[bot] wants to merge 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>
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.

0 participants