ci: exclude more non-unit-testable code from coverage#3451
ci: exclude more non-unit-testable code from coverage#3451QuantumExplorer merged 1 commit intov3.1-devfrom
Conversation
📝 WalkthroughWalkthroughUpdated Codecov ignore rules: removed a broad "infrastructure and glue code" ignore and added multiple specific path-based ignores covering rs-dpp random generators and tests, batched transition resolvers, rs-drive-abci subtrees (RPC, metrics, logging, mimic, abci handlers), rs-drive-proof-verifier proof implementations, drive integration tests, and versioned rs-dpp dispatch methods. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
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 docstrings
🧪 Generate unit tests (beta)
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 |
Review GateCommit:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.codecov.yml (1)
123-132: Verify scope of proof implementation exclusion.The directory exclusions match:
rpc/**: 3 files (RPC interface code) — appropriate for exclusionabci/handler/**: 12 files (ABCI protocol handlers) — appropriate for exclusionproof/**: 9 files (token_balance, token_contract_info, token_status, and others) — these are proof implementations containing business logicThe first two exclusions are reasonable for interface and handler code. However, the
proof/**exclusion excludes all proof implementations. Consider whether these should have coverage, or confirm they are test/example proofs rather than production logic.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.codecov.yml around lines 123 - 132, Confirm whether the "packages/rs-drive-proof-verifier/src/proof/**" exclusion in .codecov.yml should remain broad: inspect the proof implementations (files like token_balance, token_contract_info, token_status) under packages/rs-drive-proof-verifier/src/proof and decide if they contain production business logic that needs coverage; if they do, narrow or remove the exclusion so those files are tracked by Codecov, otherwise add a short comment in .codecov.yml clarifying these are test/example proofs to justify excluding the entire proof/** directory.
🤖 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 123-132: Confirm whether the
"packages/rs-drive-proof-verifier/src/proof/**" exclusion in .codecov.yml should
remain broad: inspect the proof implementations (files like token_balance,
token_contract_info, token_status) under
packages/rs-drive-proof-verifier/src/proof and decide if they contain production
business logic that needs coverage; if they do, narrow or remove the exclusion
so those files are tracked by Codecov, otherwise add a short comment in
.codecov.yml clarifying these are test/example proofs to justify excluding the
entire proof/** directory.
f998d07 to
788ebad
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.codecov.yml (1)
133-134: Comment/path wording is slightly misleading.Line 133 says “Drive extra tests,” but Line 134 points to an
rs-dpppath. Consider renaming the comment to avoid future confusion.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.codecov.yml around lines 133 - 134, The comment "Drive extra tests" in .codecov.yml is misleading for the referenced path packages/rs-dpp/src/data_contract/extra/drive_api_tests.rs; update the comment text to clearly indicate the repository and test purpose (e.g., "rs-dpp Drive API extra tests" or "rs-dpp extra Drive API tests") so the comment matches the file path and intent.
🤖 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 113-136: The .codecov.yml contains an unmatched glob
"packages/rs-dpp/src/**/random_*.rs" that matches zero files; remove this
redundant pattern or replace it with the correct glob (for example adjust to
"packages/rs-dpp/src/**/random*.rs" or the specific filenames you intended) so
that only valid/needed patterns remain—update the list where the other related
pattern "packages/rs-dpp/src/**/random.rs" appears to avoid duplication and
ensure coverage exclusions are accurate.
---
Nitpick comments:
In @.codecov.yml:
- Around line 133-134: The comment "Drive extra tests" in .codecov.yml is
misleading for the referenced path
packages/rs-dpp/src/data_contract/extra/drive_api_tests.rs; update the comment
text to clearly indicate the repository and test purpose (e.g., "rs-dpp Drive
API extra tests" or "rs-dpp extra Drive API tests") so the comment matches the
file path and intent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
Additional exclusions for code requiring full platform context or representing test-only/infrastructure code: - State transition action transformers (~3,700 lines) - Random data generators (~2,500 lines) - Batch transition resolvers (~250 lines) - Drive-ABCI infrastructure: RPC, metrics, logging, ABCI handlers - Proof verifier proof implementations - DPP signing tests, drive API tests, versioned dispatch methods Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
788ebad to
aa2a1d2
Compare
Add comprehensive unit tests for all seven identity state transition modules that had the lowest coverage. Tests cover construction, accessors, StateTransitionLike/Owned/SingleSigned trait impls, IdentitySigned trait impls, value conversion roundtrips, serialization roundtrips, estimated fee validation, and error paths for unknown versions. Also adds thorough tests for public key structure validation including duplicate key detection, master key requirements, and security level enforcement. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Additional
.codecov.ymlexclusions for code that is test-only infrastructure or pure boilerplate. Config-only change.New exclusions
**/random.rs,**/random_*.rs(dpp)resolvers.rs(batch transition)rpc/**,metrics.rs,logging/**(drive-abci)mimic/**(drive-abci)signing_tests.rs(dpp)drive_api_tests.rs(dpp)versioned_methods.rs(dpp)NOT excluded (kept in coverage)
Test plan
🤖 Generated with Claude Code