Skip to content

test(drive): improve coverage for tokens subtree#3503

Merged
QuantumExplorer merged 2 commits into
v3.1-devfrom
test/rs-drive-tokens-coverage
Apr 21, 2026
Merged

test(drive): improve coverage for tokens subtree#3503
QuantumExplorer merged 2 commits into
v3.1-devfrom
test/rs-drive-tokens-coverage

Conversation

@QuantumExplorer
Copy link
Copy Markdown
Member

@QuantumExplorer QuantumExplorer commented Apr 21, 2026

Issue being fixed or feature implemented

The packages/rs-drive/src/drive/tokens/ subtree is currently at ~75% coverage, with three modules near or at zero: mint_many (0%), burn (29%), and unfreeze (39%). The larger mid-tier system (68%) and info (73%) modules together account for another ~660 uncovered lines. This PR addresses all five.

What was done?

Added 86 new tests — 65 unit tests inline in rs-drive, 21 integration tests in drive-abci:

Module Before New tests Location
mint_many 0% 13 rs-drive unit (not reachable via a user-facing state transition — only TokenOperationType)
unfreeze 39% 11 drive-abci integration
burn 29% 21 (on top of 6) drive-abci integration
system/* 68% 21 across 5 submodules rs-drive unit
info/* 73% 20 across 4 submodules rs-drive unit

Specific paths now exercised:

mint_many — proportional weight distribution via div_ceil, u32::MAX weight saturation clamp (lines 102-104), last-recipient remainder absorption, total-supply update conservation, allow_first_mint: false with pre-existing supply, mint amount 0, zero-weight recipients.

unfreeze — authorized/unauthorized actors, IdentityTokenAccountNotFrozenError on never-frozen identity, already-unfrozen rejection, multi-sig group flows (single-member sufficient, two-member with/without history), verifying unfrozen state truly allows subsequent transfers, public-note attachment.

burn — supply-update read-back assertion (was only balance-side before), public note happy path + too-large rejection, zero-amount InvalidTokenAmountError, explicit ContractOwner / Identity(_) / NoOne / MainGroup authorization rules, Identity(other) rejecting the owner, sequential balance+supply depletion, multi-holder supply aggregation, group action error branches (AlreadySignedByIdentity, AlreadyCompleted, ModificationOfGroupActionMainParameters, IdentityNotMemberOfGroup on propose/confirm, TokenNoteOnlyAllowedWhenProposer).

systemadd_to_token_total_supply_v0 replace vs first-insert, allow_first_mint + amount > i64::MAX error, non-existent-token-without-first-mint CriticalCorruptedState, saturation to i64::MAX, non-saturating overflow; remove_from_token_total_supply_v0 normal + exact-zero + checked_sub underflow + missing-supply CorruptedDriveState; fetch_token_total_supply_v0 None/Some + with_cost fee path; fetch_token_total_aggregated_identity_balances_v0 one/multi/zero-holders; create_token_trees_v0 creation + allow_already_exists duplicate error + idempotent no-op + start_as_paused flag.

infofetch_identity_token_info_v0 Some/None/PathKeyNotFound→None coercion + apply=true stateful path + _with_costs; fetch_identity_token_infos_v0 and fetch_identities_token_infos_v0 partial-hit map branches + empty-list edge case; all 8 public query constructors in queries.rs covering all four ascending/descending × inclusive/exclusive range branches plus start_at = None full-range branches.

How Has This Been Tested?

  • cargo test -p drive --lib 'drive::tokens::'96 passed
  • cargo test -p drive-abci --lib 'token_burn_tests'27 passed
  • cargo test -p drive-abci --lib 'token_unfreeze_tests'11 passed
  • cargo check --tests -p drive and cargo check --tests -p drive-abci — clean (no new warnings)
  • cargo fmt -p drive -p drive-abci — clean

No production bugs were surfaced during the coverage work. One note: the allow_first_mint insert-only branch in add_to_token_total_supply_v0 is technically only reachable when the supply entry is missing — in the normal flow create_token_trees_v0 seeds it as SumItem(0), so code paths that run the documented setup sequence always take the replace branch. The test should_error_when_first_mint_amount_exceeds_i64_max reaches the insert branch by skipping create_token_trees.

Breaking Changes

None. Tests only.

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

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

Summary by CodeRabbit

  • Tests
    • Expanded test coverage for token operations including burn, mint, unfreeze, and freeze/unfreeze state transitions with comprehensive scenario validation.
    • Added test coverage for token information retrieval and query builders.
    • Added test coverage for token supply management and account state operations.

Add 86 new tests targeting the lowest-coverage modules under
packages/rs-drive/src/drive/tokens/ and their dispatch paths:

- mint_many (0% → covered): 13 unit tests in rs-drive exercising the
  proportional weight distribution, u32::MAX weight clamp, last-recipient
  remainder, and total-supply update. Placed in rs-drive because
  TokenMintMany is only reachable internally via TokenOperationType, not
  via a user-facing state transition.
- unfreeze (39% → covered): 11 drive-abci integration tests covering
  authorized/unauthorized actors, non-frozen-identity rejection, group
  multi-sig flows, and verifying the unfrozen state allows subsequent
  transfers.
- burn (29% → covered): 21 new drive-abci integration tests added on top
  of the existing 6 — exercising supply-update read-back, public notes,
  zero-amount rejection, specific-identity/ContractOwner/NoOne/MainGroup
  authorization rules, sequential depletion, and several group-action
  error branches (already-signed, already-completed, modified-main-params,
  non-member proposer/confirmer, confirmer-with-note).
- system (68% → covered): 21 inline unit tests across
  add_to_token_total_supply, remove_from_token_total_supply,
  fetch_token_total_supply, fetch_token_total_aggregated_identity_balances,
  and create_token_trees covering happy paths, overflow/underflow,
  saturation, first-mint semantics, corrupted-state errors, and
  idempotence.
- info (73% → covered): 20 inline unit tests across
  fetch_identity_token_info, fetch_identity_token_infos,
  fetch_identities_token_infos, and queries.rs covering
  PathKeyNotFound→None coercion, partial-hit map branches, with_costs
  fee paths, and all four range-query branches.

All 165 touched tests pass; no production bugs surfaced during coverage
work.

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

coderabbitai Bot commented Apr 21, 2026

Warning

Rate limit exceeded

@QuantumExplorer has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 44 minutes and 45 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 44 minutes and 45 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: 95c14f42-9dc0-48fe-8edf-18a6c488143c

📥 Commits

Reviewing files that changed from the base of the PR and between afabf86 and e7ecf09.

📒 Files selected for processing (4)
  • packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/v0/mod.rs
  • packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs
  • packages/rs-drive/src/drive/tokens/info/queries.rs
  • packages/rs-drive/src/drive/tokens/system/create_token_trees/v0/mod.rs
📝 Walkthrough

Walkthrough

This pull request adds comprehensive test coverage for token-related state transitions and operations across the Dash blockchain codebase. New test modules cover token burn, unfreeze, and mint-many operations, along with unit tests for token info fetching, supply management, and system operations. No production logic is modified.

Changes

Cohort / File(s) Summary
Batch State Transition Tests
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/burn/mod.rs
Added 2,694 lines of burn-related tests covering successful burns, balance/supply updates, public notes, input validation, authorization rules (contract owner, specific identity, NoOne rules), frozen accounts, insufficient balances, group authorization flows, MainGroup authorization, depletion scenarios, and cross-identity independence.
Batch State Transition Tests
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/unfreeze/mod.rs
Added 1,857 lines of unfreeze tests covering successful unfreezing, failures for never-frozen/already-unfrozen accounts, authorization validation, post-unfreeze behavior changes, public notes, non-existent identifiers, group-based authorization with proof generation/verification, proposer confirmation flows, and restricted identity unfreezing.
Batch State Transition Tests
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/mint_many/mod.rs
Added documentation comments explaining test coverage scope and reachability for the TokenMintMany operation; no executable code.
Module Organization
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/mod.rs
Added module declarations for mint_many and unfreeze submodules to extend test suite coverage.
Token Info Fetch Tests
packages/rs-drive/src/drive/tokens/info/fetch_identity_token_info/v0/mod.rs, fetch_identity_token_infos/v0/mod.rs, fetch_identities_token_infos/v0/mod.rs
Added unit tests validating fetch_identity_token_info* functions across non-existent tokens, missing identity records, frozen state detection, and cost calculations; combined coverage totals 700 lines.
Token Query Tests
packages/rs-drive/src/drive/tokens/info/queries.rs
Added test coverage for query builder functions validating correct path construction, limit settings, and QueryItem variants for identity info and range queries; 206 lines.
Token Mint-Many Tests
packages/rs-drive/src/drive/tokens/mint_many/v0/mod.rs
Added 673 lines of integration tests covering weight distribution with rounding, zero-weight recipients, recipient clamping, multi-call supply updates, zero issuance, unknown recipients, pending operations without mutations, and fee calculations.
Token System Operation Tests
packages/rs-drive/src/drive/tokens/system/create_token_trees/v0/mod.rs, add_to_token_total_supply/v0/mod.rs, remove_from_token_total_supply/v0/mod.rs, fetch_token_total_supply/v0/mod.rs, fetch_token_total_aggregated_identity_balances/v0/mod.rs
Added unit tests for token tree initialization, idempotent creation, supply addition with overflow/saturation handling, supply removal with underflow detection, and aggregated balance fetching; combined coverage totals 834 lines.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Poem

🐰 Hop, hop, our tests now bloom so bright,
Token burns and freezes held just right,
Mints and supplies, all verified true,
Seven thousand lines of rabbits' review! 🥕✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the primary change: adding test coverage for the tokens subtree in rs-drive, which is precisely what the PR accomplishes across multiple token-related modules.
Docstring Coverage ✅ Passed Docstring coverage is 94.39% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ 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 test/rs-drive-tokens-coverage

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 21, 2026

Review Gate

Commit: e7ecf09e

  • Debounce: 12m ago (need 30m)

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

  • CodeRabbit review: comment found

  • Off-peak hours: off-peak (04:44 AM PT Tuesday)

  • Run review now (check to override)

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.

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/burn/mod.rs (1)

610-632: ⚠️ Potential issue | 🟡 Minor

Misleading inline comments contradict the assertions.

The assertions expect identity1 to retain 98,663 tokens and recipient to hold 1,337, but the comments on lines 631–632 claim the original identity should have "no tokens" and that the recipient "should not keep transferred tokens if burn was enforced" — which would be the behavior of a failing scenario, not this one. These comments look copy-pasted from the "not enough balance" sibling test and will mislead readers. Same issue exists at line 874 ("Validate the burn still succeeded...") in test_token_burn_group_action_tokens_transferred_before_completion_not_enough_balance where the burn actually fails.

✏️ Proposed fix
-        assert_eq!(balance1, Some(98663)); // Original identity should have no tokens
-        assert_eq!(balance2, Some(1337)); // Recipient should not keep transferred tokens if burn was enforced
+        // Proposer had base_supply 100000, transferred 1337 away, then the
+        // group-finalized burn removed 100000 - 1337 = 98663 (capped by
+        // remaining balance). So the proposer ends at 98663 and the recipient
+        // keeps the 1337 that was transferred before the confirmation.
+        assert_eq!(balance1, Some(98663));
+        assert_eq!(balance2, Some(1337));

Also please fix the analogous misleading comment at line 874 in the _not_enough_balance variant.

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

In
`@packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/burn/mod.rs`
around lines 610 - 632, Update the misleading inline comments to match the
assertions and actual test behavior: in the test where balances assert balance1
== Some(98663) and balance2 == Some(1337) (e.g.,
test_token_burn_group_action_tokens_transferred_before_completion) replace the
comments that say "Original identity should have no tokens" and "Recipient
should not keep transferred tokens if burn was enforced" with ones stating the
original identity retains 98,663 tokens and the recipient holds 1,337 because
the burn succeeded; likewise, in the sibling test
test_token_burn_group_action_tokens_transferred_before_completion_not_enough_balance
update the comment at the analogous location (around line 874) to reflect that
the burn failed and expected balances reflect that failure. Ensure you edit the
comments near the fetch_identity_token_balance assertions to accurately describe
the expected outcomes.
🧹 Nitpick comments (2)
packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/burn/mod.rs (1)

3482-3589: Test name does not match what it exercises.

test_token_burn_by_one_then_by_another_both_independent implies two identities each perform a burn, but the body only executes a single burn from ownerholder is merely seeded with a balance and never burns (the default ContractOwner rule would forbid it anyway, as the inline comment acknowledges). Consider renaming to something like test_token_burn_only_affects_burner_balance_and_aggregates_in_total_supply so the name reflects the actual behavior under test.

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

In
`@packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/burn/mod.rs`
around lines 3482 - 3589, Rename the test function
test_token_burn_by_one_then_by_another_both_independent to a name that reflects
the actual behavior (e.g.
test_token_burn_only_affects_burner_balance_and_aggregates_in_total_supply) by
updating the fn identifier and any references to it in this module; keep the
test body unchanged (it seeds a second holder but only owner performs the burn),
and update any inline comment or test description to match the new name so the
test name accurately describes that only the burner’s balance is reduced and
total supply changes accordingly.
packages/rs-drive/src/drive/tokens/mint_many/v0/mod.rs (1)

563-572: Use assert_eq! for clearer failure messages.

assert!(x == y) loses the actual-vs-expected diagnostic that assert_eq! provides on failure. Since Option<u64> implements PartialEq, you can assert the optional directly (or unwrap to 0).

♻️ Proposed fix
-        assert!(balance_a.unwrap_or(0) == 0);
-        assert!(balance_b.unwrap_or(0) == 0);
+        assert_eq!(balance_a.unwrap_or(0), 0);
+        assert_eq!(balance_b.unwrap_or(0), 0);
@@
-        assert!(supply.unwrap_or(0) == 0);
+        assert_eq!(supply.unwrap_or(0), 0);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/rs-drive/src/drive/tokens/mint_many/v0/mod.rs` around lines 563 -
572, Replace the three equality assertions that use assert!(x == y) with
assert_eq! for better diagnostics: change the checks on balance_a and balance_b
(currently using balance_a.unwrap_or(0) == 0 and balance_b.unwrap_or(0) == 0) to
assert_eq!(balance_a.unwrap_or(0), 0) and assert_eq!(balance_b.unwrap_or(0), 0),
and change the token supply check that compares supply.unwrap_or(0) == 0 (from
drive.fetch_token_total_supply) to assert_eq!(supply.unwrap_or(0), 0); keep the
same unwrap_or(0) semantics so failures print expected vs actual values.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/v0/mod.rs`:
- Around line 225-235: The test currently only asserts that any values present
in the returned map are None, which misses missing keys; update the assertion
after calling fetch_identities_token_infos_v0(token_id, &identity_ids, ...) to
ensure every requested identity is present and mapped to None by either
asserting infos.len() == identity_ids.len() or iterating over identity_ids and
for each id doing assert!(infos.get(id).is_some() &&
infos.get(id).unwrap().is_none(), ...) so that fetch_identities_token_infos_v0,
token_id, identity_ids, and infos are validated fully.

In
`@packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs`:
- Around line 227-239: The test currently only asserts that returned values are
None but doesn't verify that every requested token ID is present in the map;
update the check after calling fetch_identity_token_infos_v0 so you iterate over
the original token_ids and assert infos.contains_key(id) and that
infos.get(id).unwrap().is_none() for each id — referencing the variables
token_ids and infos and the call to fetch_identity_token_infos_v0 to ensure the
function returns an entry (Some(None)) per requested ID rather than dropping
missing IDs.

In `@packages/rs-drive/src/drive/tokens/info/queries.rs`:
- Around line 201-214: The test
token_infos_for_range_query_ascending_with_no_start_uses_range_full currently
only asserts that the single QueryItem is RangeFull, but doesn't check its
direction; update the assertion to pattern-match QueryItem::RangeFull(range) and
assert range.ascending == true (since the test calls
Drive::token_infos_for_range_query with ascending=true) so the test fails if the
ascending flag is ignored; make the analogous change in the other test mentioned
(the one around the 290-301 range) to assert range.ascending == false for the
descending case.

In `@packages/rs-drive/src/drive/tokens/system/create_token_trees/v0/mod.rs`:
- Around line 392-436: The test currently only checks supply; update
should_respect_start_as_paused_flag to also fetch and assert each token's stored
paused status: after calling create_token_trees_v0 for token_id_active and
token_id_paused, call drive.fetch_token_status(token_id_active, None,
platform_version).expect(...) and assert the returned status has paused ==
false, and similarly call drive.fetch_token_status(token_id_paused, None,
platform_version).expect(...) and assert paused == true; reference the
create_token_trees_v0, fetch_token_total_supply, and fetch_token_status helpers
and the TokenStatus.paused field when adding these assertions.

---

Outside diff comments:
In
`@packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/burn/mod.rs`:
- Around line 610-632: Update the misleading inline comments to match the
assertions and actual test behavior: in the test where balances assert balance1
== Some(98663) and balance2 == Some(1337) (e.g.,
test_token_burn_group_action_tokens_transferred_before_completion) replace the
comments that say "Original identity should have no tokens" and "Recipient
should not keep transferred tokens if burn was enforced" with ones stating the
original identity retains 98,663 tokens and the recipient holds 1,337 because
the burn succeeded; likewise, in the sibling test
test_token_burn_group_action_tokens_transferred_before_completion_not_enough_balance
update the comment at the analogous location (around line 874) to reflect that
the burn failed and expected balances reflect that failure. Ensure you edit the
comments near the fetch_identity_token_balance assertions to accurately describe
the expected outcomes.

---

Nitpick comments:
In
`@packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/burn/mod.rs`:
- Around line 3482-3589: Rename the test function
test_token_burn_by_one_then_by_another_both_independent to a name that reflects
the actual behavior (e.g.
test_token_burn_only_affects_burner_balance_and_aggregates_in_total_supply) by
updating the fn identifier and any references to it in this module; keep the
test body unchanged (it seeds a second holder but only owner performs the burn),
and update any inline comment or test description to match the new name so the
test name accurately describes that only the burner’s balance is reduced and
total supply changes accordingly.

In `@packages/rs-drive/src/drive/tokens/mint_many/v0/mod.rs`:
- Around line 563-572: Replace the three equality assertions that use assert!(x
== y) with assert_eq! for better diagnostics: change the checks on balance_a and
balance_b (currently using balance_a.unwrap_or(0) == 0 and
balance_b.unwrap_or(0) == 0) to assert_eq!(balance_a.unwrap_or(0), 0) and
assert_eq!(balance_b.unwrap_or(0), 0), and change the token supply check that
compares supply.unwrap_or(0) == 0 (from drive.fetch_token_total_supply) to
assert_eq!(supply.unwrap_or(0), 0); keep the same unwrap_or(0) semantics so
failures print expected vs actual values.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a8889973-8bc2-47f1-affb-0f625cd6ab68

📥 Commits

Reviewing files that changed from the base of the PR and between bc21822 and afabf86.

📒 Files selected for processing (14)
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/burn/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/mint_many/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/mod.rs
  • packages/rs-drive-abci/src/execution/validation/state_transition/state_transitions/batch/tests/token/unfreeze/mod.rs
  • packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/v0/mod.rs
  • packages/rs-drive/src/drive/tokens/info/fetch_identity_token_info/v0/mod.rs
  • packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs
  • packages/rs-drive/src/drive/tokens/info/queries.rs
  • packages/rs-drive/src/drive/tokens/mint_many/v0/mod.rs
  • packages/rs-drive/src/drive/tokens/system/add_to_token_total_supply/v0/mod.rs
  • packages/rs-drive/src/drive/tokens/system/create_token_trees/v0/mod.rs
  • packages/rs-drive/src/drive/tokens/system/fetch_token_total_aggregated_identity_balances/v0/mod.rs
  • packages/rs-drive/src/drive/tokens/system/fetch_token_total_supply/v0/mod.rs
  • packages/rs-drive/src/drive/tokens/system/remove_from_token_total_supply/v0/mod.rs

Comment thread packages/rs-drive/src/drive/tokens/info/fetch_identities_token_infos/v0/mod.rs Outdated
Comment thread packages/rs-drive/src/drive/tokens/info/fetch_identity_token_infos/v0/mod.rs Outdated
Comment thread packages/rs-drive/src/drive/tokens/info/queries.rs
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 21, 2026

Codecov Report

❌ Patch coverage is 97.46835% with 40 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.05%. Comparing base (bc21822) to head (e7ecf09).
⚠️ Report is 1 commits behind head on v3.1-dev.

Files with missing lines Patch % Lines
packages/rs-drive/src/drive/tokens/info/queries.rs 85.60% 19 Missing ⚠️
...ages/rs-drive/src/drive/tokens/mint_many/v0/mod.rs 98.87% 5 Missing ⚠️
...tokens/info/fetch_identities_token_infos/v0/mod.rs 98.23% 3 Missing ⚠️
...e/tokens/info/fetch_identity_token_infos/v0/mod.rs 98.10% 3 Missing ⚠️
.../tokens/system/add_to_token_total_supply/v0/mod.rs 98.00% 3 Missing ⚠️
...c/drive/tokens/system/create_token_trees/v0/mod.rs 97.58% 3 Missing ⚠️
...ns/system/remove_from_token_total_supply/v0/mod.rs 97.67% 2 Missing ⚠️
...ve/tokens/info/fetch_identity_token_info/v0/mod.rs 99.28% 1 Missing ⚠️
...e/tokens/system/fetch_token_total_supply/v0/mod.rs 98.79% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           v3.1-dev    #3503      +/-   ##
============================================
+ Coverage     84.84%   85.05%   +0.21%     
============================================
  Files          2476     2476              
  Lines        267915   269313    +1398     
============================================
+ Hits         227303   229062    +1759     
+ Misses        40612    40251     -361     
Components Coverage Δ
dpp 82.00% <ø> (+<0.01%) ⬆️
drive 84.71% <97.46%> (+0.50%) ⬆️
drive-abci 87.49% <ø> (+0.01%) ⬆️
sdk ∅ <ø> (∅)
dapi-client ∅ <ø> (∅)
platform-version ∅ <ø> (∅)
platform-value 92.10% <ø> (ø)
platform-wallet ∅ <ø> (∅)
drive-proof-verifier 55.66% <ø> (ø)
🚀 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.

- fetch_identities_token_infos: assert the full expected map so missing
  identity IDs are caught, not just that returned values are None.
- fetch_identity_token_infos: same — assert missing-token entries via
  full-map equality.
- queries.rs: assert left_to_right direction in the two RangeFull tests
  so regressions that ignore the ascending flag get caught.
- create_token_trees should_respect_start_as_paused_flag: actually fetch
  and assert TokenStatus.paused for both tokens — the old assertion was
  identical to should_create_token_trees_and_initialize_supply_to_zero
  and would pass even if start_as_paused were ignored.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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