Skip to content

ci: exclude additional boilerplate from code coverage#3382

Merged
QuantumExplorer merged 2 commits into
v3.1-devfrom
ci/exclude-boilerplate-from-coverage
Mar 18, 2026
Merged

ci: exclude additional boilerplate from code coverage#3382
QuantumExplorer merged 2 commits into
v3.1-devfrom
ci/exclude-boilerplate-from-coverage

Conversation

@QuantumExplorer
Copy link
Copy Markdown
Member

@QuantumExplorer QuantumExplorer commented Mar 18, 2026

Issue being fixed or feature implemented

Code coverage metrics are skewed by untestable infrastructure, pure accessor boilerplate, and test-only scaffolding that cannot or should not carry meaningful test coverage.

What was done?

Added the following paths to the .codecov.yml ignore list:

  • packages/rs-dapi/src/services/core_service.rs — gRPC service handler that wraps Core RPC calls; requires a running Dash Core node, so it cannot be unit-tested (0% coverage, 265 lines)
  • packages/rs-drive-proof-verifier/src/types.rs — Response type constructors and conversion boilerplate for proof verification results (13.8% coverage, 193 lines)
  • packages/rs-drive-proof-verifier/src/unproved.rs — Unproved response handling boilerplate (0% coverage, 141 lines)
  • packages/rs-sdk/src/mock/** — Mock infrastructure for SDK testing, not production logic
  • packages/rs-dpp/src/data_contract/document_type/accessors/** — Pure getter/setter trait implementations, same category as the already-excluded state transition accessors (42.6% coverage, 296 lines)
  • packages/rs-dpp/src/core_types/** — Core chain type wrappers (masternode entries etc.) that are mostly deserialization boilerplate (42.6% coverage, 255 lines)

How Has This Been Tested?

This is a configuration-only change to .codecov.yml. The excluded paths were verified to exist in the repository and to match the rationale (boilerplate, untestable infrastructure, or test-only code).

Breaking Changes

None. This only affects coverage reporting, not any build or runtime behavior.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

Summary by CodeRabbit

  • Chores
    • Updated code coverage configuration to properly track test scaffolding and non-production files. No impact to product functionality.

Add the following to .codecov.yml ignore list:
- rs-dapi core_service.rs (gRPC handler requiring live Core node)
- rs-drive-proof-verifier types.rs and unproved.rs (response type boilerplate)
- rs-sdk mock infrastructure (test-only scaffolding)
- rs-dpp document_type accessors (getter/setter trait impls)
- rs-dpp core_types (chain type wrappers and deserialization boilerplate)

These files contain untestable infrastructure, pure accessor boilerplate,
or test-only scaffolding that skews coverage metrics without reflecting
meaningful gaps in test quality.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added this to the v3.1.0 milestone Mar 18, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 18, 2026

Warning

Rate limit exceeded

@QuantumExplorer has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 12 minutes and 1 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 18c317cc-7f23-477a-998f-99f7d1857846

📥 Commits

Reviewing files that changed from the base of the PR and between a51d356 and abf039e.

📒 Files selected for processing (1)
  • .codecov.yml
📝 Walkthrough

Walkthrough

Added ignore patterns to .codecov.yml for non-production test scaffolding and boilerplate code in Rust packages, including DAPI service handlers, proof verifiers, SDK mocks, document accessors, and DPP type wrappers. No functional code changes.

Changes

Cohort / File(s) Summary
Code Coverage Configuration
.codecov.yml
Expanded ignore list with 15 new lines to exclude test scaffolding, boilerplate implementations, and mock infrastructure from coverage metrics.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 The coverage scales climb ever high,
As test scaffolds we pass on by,
Mock whispers and boilerplate dreams,
Ignored with precision—our metrics gleam! ✨

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: exclude additional boilerplate from code coverage' directly and clearly describes the main change: updating CI configuration to exclude boilerplate code from coverage metrics.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/exclude-boilerplate-from-coverage
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.codecov.yml (1)

66-69: Consider narrowing broad excludes to reduce future coverage blind spots.

packages/rs-dpp/src/data_contract/document_type/accessors/** and especially packages/rs-dpp/src/core_types/** are broad. If new business logic lands there later, it will be silently excluded from coverage. Consider either file-level patterns or a periodic audit note to keep this safe over time.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.codecov.yml around lines 66 - 69, The coverage excludes for
"packages/rs-dpp/src/data_contract/document_type/accessors/**" and
"packages/rs-dpp/src/core_types/**" are too broad and may hide future business
logic; replace these glob-wide exclusions with tighter file-level patterns
(e.g., list specific generated files or exact filenames under
document_type/accessors and only exclude known generated or wrapper files under
core_types) or add a TODO/audit comment in .codecov.yml indicating these globs
must be reviewed periodically; update the exclude entries accordingly so only
truly non-testable/generated code is omitted and new business logic will remain
covered.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.codecov.yml:
- Around line 66-69: The coverage excludes for
"packages/rs-dpp/src/data_contract/document_type/accessors/**" and
"packages/rs-dpp/src/core_types/**" are too broad and may hide future business
logic; replace these glob-wide exclusions with tighter file-level patterns
(e.g., list specific generated files or exact filenames under
document_type/accessors and only exclude known generated or wrapper files under
core_types) or add a TODO/audit comment in .codecov.yml indicating these globs
must be reviewed periodically; update the exclude entries accordingly so only
truly non-testable/generated code is omitted and new business logic will remain
covered.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 758aeef5-60fd-4267-bb26-3021d7de03f8

📥 Commits

Reviewing files that changed from the base of the PR and between 94bdedf and a51d356.

📒 Files selected for processing (1)
  • .codecov.yml

@QuantumExplorer QuantumExplorer merged commit e1b0d5c into v3.1-dev Mar 18, 2026
6 checks passed
@QuantumExplorer QuantumExplorer deleted the ci/exclude-boilerplate-from-coverage branch March 18, 2026 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant