Skip to content

ci: exclude Drive state transition action boilerplate from coverage#3474

Closed
QuantumExplorer wants to merge 1 commit into
v3.1-devfrom
ci/exclude-drive-transition-action-boilerplate
Closed

ci: exclude Drive state transition action boilerplate from coverage#3474
QuantumExplorer wants to merge 1 commit into
v3.1-devfrom
ci/exclude-drive-transition-action-boilerplate

Conversation

@QuantumExplorer
Copy link
Copy Markdown
Member

@QuantumExplorer QuantumExplorer commented Apr 10, 2026

What was changed

Added codecov exclusions for Drive state transition action boilerplate files in packages/rs-drive/src/state_transition_action/.

These files contain:

  • mod.rs — Version dispatch enums with single-variant match arms delegating to V0 (match self { V0(v0) => v0.field })
  • v0/mod.rs — Struct definitions + getter/setter trait impls (pure field accessors)
  • transformer.rs (top-level) — Single-variant match delegating to V0::try_from(...)
  • *_action_type.rs — Type enum definitions

NOT excluded: v0/transformer.rs files which contain real conversion logic (300-580 lines each).

Affected paths

Category Files excluded
Token actions token_burn, token_mint, token_transfer, token_freeze, token_unfreeze, token_claim, token_config_update, token_destroy_frozen_funds, token_emergency_action, token_direct_purchase, token_set_price_for_direct_purchase, token_base
Document actions document_create, document_delete, document_replace, document_transfer, document_purchase, document_update_price, document_base
Identity actions identity_create, identity_topup, identity_update, identity_credit_withdrawal, identity_credit_transfer, etc.
Contract actions data_contract_create, data_contract_update
System actions bump_identity_nonce_action, bump_address_input_nonces_action, partially_use_asset_lock_action, etc.

These are tested through drive-abci integration/strategy tests, not individually unit-testable.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated code coverage tracking configuration.

The state_transition_action tree in rs-drive contains version dispatch
enums (single-variant match arms), getter/setter trait impls, struct
definitions, and top-level transformer delegation. These are mechanical
patterns tested through drive-abci integration tests, not unit-testable
logic.

Excludes mod.rs, v0/mod.rs, transformer.rs, and *_action_type.rs for
token, document, identity, contract, and system transition actions.
Does NOT exclude v0/transformer.rs which contains real conversion logic.

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 Apr 10, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 10, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: fe631ec1-2be6-4a15-b315-5e602a8b3606

📥 Commits

Reviewing files that changed from the base of the PR and between 9d799d3 and 306de9f.

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

📝 Walkthrough

Walkthrough

The pull request updates .codecov.yml to add ignore patterns for code coverage analysis, excluding various state transition action modules, transformer files, and enum definitions within the packages/rs-drive/src/state_transition_action/ directory structure from coverage reporting.

Changes

Cohort / File(s) Summary
Coverage Configuration
.codecov.yml
Added 24 lines of ignore patterns to exclude state transition action modules (token, document, base), their v0 submodules, transformer.rs files, transition action type enums, and identity/contract/system subtree module and transformer files from code coverage tracking.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

Poem

🐰 Hopping through configs with care and delight,
We mark what to skip, keeping coverage just right,
State transitions tucked in the ignore list with grace,
Coverage metrics now focus on the important place! ✨

🚥 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 accurately describes the main change: adding codecov exclusions for boilerplate files in the Drive state transition action directory.
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-drive-transition-action-boilerplate

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.

@thepastaclaw
Copy link
Copy Markdown
Collaborator

thepastaclaw commented Apr 10, 2026

Review Gate

Commit: 306de9f3

  • Debounce: 2m ago (need 30m)

  • CI checks: checks still running (1 pending)

  • CodeRabbit review: comment found

  • Off-peak hours: off-peak (01:46 AM PT Friday)

  • Run review now (check to override)

@QuantumExplorer
Copy link
Copy Markdown
Member Author

Closing — excluding boilerplate from coverage just hides the metric without adding value. The real fix is either testing through integration paths or generating these with derive macros.

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.

2 participants