ci: exclude DPP state transition boilerplate from coverage#3358
Conversation
Exclude ~3,900 lines of pure boilerplate from Codecov tracking in rs-dpp/src/state_transition/: - errors/: thiserror enum definitions - traits/: trait interfaces with no default implementations - accessors/: thin field getter/setter traits - fields.rs, common_fields.rs: constant definitions - types.rs: metadata trait impls (signature_property_paths, etc.) - version.rs: version dispatch match statements - state_transition_factory.rs, state_transition_types.rs: enum definitions This improves signal-to-noise in coverage reports by focusing on actual business logic (v0_methods, validation, serialization, signing). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the 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. 📝 WalkthroughWalkthroughThe pull request updates the Codecov configuration file to exclude additional state transition-related files from code coverage reporting, including error definitions, trait declarations, accessor modules, and various state transition implementation files. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.codecov.yml:
- Around line 30-31: The coverage exclusions are too broad—rules like excluding
"traits/**", "state_transitions/**/accessors/**", and the current exclusion for
state_transition_factory.rs are hiding logic (e.g.,
state_transition_witness_validation.rs, batch_transition/accessors/mod.rs,
state_transition_factory.rs). Tighten the .codecov.yml patterns to only omit
true boilerplate/generated files (for example exclude specific filenames like
mod.rs or a generated/ folder) and remove the broad "traits/**" and
"accessors/**" patterns so that files containing logic such as
state_transition_witness_validation, batch_transition/accessors/mod.rs, and
state_transition_factory.rs remain tracked.
| - "packages/rs-dpp/src/state_transition/traits/**" | ||
| - "packages/rs-dpp/src/state_transition/state_transitions/**/accessors/**" |
There was a problem hiding this comment.
Coverage exclusions are too broad and remove logic-heavy code from tracking.
Line 30 (traits/**), Line 31 (accessors/**), and Line 37 (state_transition_factory.rs) exclude files that contain executable logic (e.g., state_transition_witness_validation.rs:52-89, batch_transition/accessors/mod.rs:44-115, state_transition_factory.rs:8-20). This undermines coverage signal instead of only removing boilerplate.
Suggested config adjustment
- - "packages/rs-dpp/src/state_transition/traits/**"
- - "packages/rs-dpp/src/state_transition/state_transitions/**/accessors/**"
- "packages/rs-dpp/src/state_transition/state_transitions/**/fields.rs"
- "packages/rs-dpp/src/state_transition/state_transitions/**/common_fields.rs"
- "packages/rs-dpp/src/state_transition/state_transitions/**/types.rs"
- "packages/rs-dpp/src/state_transition/state_transitions/**/version.rs"
- "packages/rs-dpp/src/state_transition/state_transition_types.rs"
- - "packages/rs-dpp/src/state_transition/state_transition_factory.rs"
+ # Keep logic-bearing modules covered; if needed, exclude only explicit
+ # boilerplate trait/accessor files after listing them individually.Also applies to: 37-37
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.codecov.yml around lines 30 - 31, The coverage exclusions are too
broad—rules like excluding "traits/**", "state_transitions/**/accessors/**", and
the current exclusion for state_transition_factory.rs are hiding logic (e.g.,
state_transition_witness_validation.rs, batch_transition/accessors/mod.rs,
state_transition_factory.rs). Tighten the .codecov.yml patterns to only omit
true boilerplate/generated files (for example exclude specific filenames like
mod.rs or a generated/ folder) and remove the broad "traits/**" and
"accessors/**" patterns so that files containing logic such as
state_transition_witness_validation, batch_transition/accessors/mod.rs, and
state_transition_factory.rs remain tracked.
Summary
rs-dpp/src/state_transition/fields.rs,common_fields.rs— pureconstdefinitionstypes.rs—signature_property_paths(),identifiers_property_paths(), etc.version.rs— single-arm match statementsBusiness logic files (v0_methods, validation, serialization, signing, state_transition_like) remain tracked.
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit