Skip to content

test(platform): coverage round 3 — replace, index, bytes, distribution encode + exclusions#3431

Merged
QuantumExplorer merged 4 commits into
v3.1-devfrom
test/coverage-round3
Apr 3, 2026
Merged

test(platform): coverage round 3 — replace, index, bytes, distribution encode + exclusions#3431
QuantumExplorer merged 4 commits into
v3.1-devfrom
test/coverage-round3

Conversation

@QuantumExplorer
Copy link
Copy Markdown
Member

Summary

Adds 218 tests across 5 files covering real logic, plus 3 codecov exclusions for accessor-only files.

Tests added

File Tests What's covered
replace.rs (platform-value) 42 Recursive path-based type replacement, clean_recursive null removal, all ReplacementType/IntegerReplacementType variants, prefix matching
index.rs (platform-value) 32 Index/IndexMut for usize and &str, auto-map creation from Null, nested access, should_panic cases
bytes_20.rs (platform-value) 41 From/Into/TryFrom conversions, Hash equality, Ord/PartialOrd, Display (Base58), String encoding, serde round-trips
bytes_32.rs (platform-value) 44 Same as bytes_20 plus Identifier interop, random_with_rng determinism
distribution_function/encode.rs (dpp) 59 All 9 DistributionFunction variants encode/decode round-trip, zero/max values, truncated input errors, invalid tags, determinism, double round-trip stability

Codecov exclusions added

File Reason
token_configuration/v0/accessors.rs Pure getters/setters
document/v0/accessors.rs Pure getters/setters
platform_state/accessors.rs Pure getters/setters

Test plan

  • cargo test -p platform-value --lib — 776 passed
  • cargo test -p dpp --lib -- distribution_function::encode — 59 passed
  • cargo fmt --all clean

🤖 Generated with Claude Code

…n encode + exclusions

Add 218 tests across 5 files covering real logic:
- replace.rs: recursive path-based type replacement, clean_recursive
- index.rs: Index/IndexMut for Value, auto-map creation, nested access
- bytes_20.rs: conversions, hashing, ordering, string encoding
- bytes_32.rs: conversions, hashing, ordering, identifier interop
- distribution_function/encode.rs: all 9 variants encode/decode,
  edge cases, truncated input, tag validation, determinism

Exclude 3 accessor-only files from coverage:
- token_configuration/v0/accessors.rs
- document/v0/accessors.rs
- platform_state/accessors.rs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 3, 2026

Warning

Rate limit exceeded

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

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 11 minutes and 38 seconds.

⌛ 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: 4b905490-ce07-4a22-820d-f08737e109ad

📥 Commits

Reviewing files that changed from the base of the PR and between 7969880 and aab73a5.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (7)
  • .codecov.yml
  • packages/rs-dpp/src/data_contract/associated_token/token_perpetual_distribution/distribution_function/encode.rs
  • packages/rs-platform-value/src/index.rs
  • packages/rs-platform-value/src/replace.rs
  • packages/rs-platform-value/src/types/bytes_20.rs
  • packages/rs-platform-value/src/types/bytes_32.rs
  • packages/rs-scripts/Cargo.toml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch test/coverage-round3

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.

@github-actions github-actions Bot added this to the v3.1.0 milestone Apr 3, 2026
@thepastaclaw
Copy link
Copy Markdown
Collaborator

thepastaclaw commented Apr 3, 2026

Review Gate

Commit: aab73a5d

  • Debounce: 16m ago (need 30m)

  • CI checks: builds passed, 0/2 tests passed

  • CodeRabbit review: comment found

  • Off-peak hours: off-peak (11:34 AM PT Friday)

  • Run review now (check to override)

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 3, 2026

Codecov Report

❌ Patch coverage is 99.39577% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.55%. Comparing base (7011b62) to head (aab73a5).
⚠️ Report is 3 commits behind head on v3.1-dev.

Files with missing lines Patch % Lines
...etual_distribution/distribution_function/encode.rs 99.09% 8 Missing ⚠️
packages/rs-platform-value/src/types/bytes_20.rs 99.20% 2 Missing ⚠️
packages/rs-platform-value/src/types/bytes_32.rs 99.23% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           v3.1-dev    #3431      +/-   ##
============================================
+ Coverage     80.22%   80.55%   +0.32%     
============================================
  Files          2855     2852       -3     
  Lines        281685   283778    +2093     
============================================
+ Hits         225983   228596    +2613     
+ Misses        55702    55182     -520     
Components Coverage Δ
dpp 73.70% <99.09%> (+0.69%) ⬆️
drive 82.35% <ø> (ø)
drive-abci 86.73% <ø> (+0.06%) ⬆️
sdk 36.55% <ø> (ø)
dapi-client 79.06% <ø> (ø)
platform-version ∅ <ø> (∅)
platform-value 88.44% <99.63%> (+4.20%) ⬆️
platform-wallet 76.09% <ø> (ø)
drive-proof-verifier 55.26% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

QuantumExplorer and others added 2 commits April 3, 2026 21:01
Fixes cargo-machete CI failure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@QuantumExplorer QuantumExplorer merged commit daae16c into v3.1-dev Apr 3, 2026
38 checks passed
@QuantumExplorer QuantumExplorer deleted the test/coverage-round3 branch April 3, 2026 18:39
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