Skip to content

test(rs-sdk): expect network floor in mock sdk seed test#3938

Open
thepastaclaw wants to merge 1 commit into
dashpay:v3.1-devfrom
thepastaclaw:fix/sdk-builder-floor-test
Open

test(rs-sdk): expect network floor in mock sdk seed test#3938
thepastaclaw wants to merge 1 commit into
dashpay:v3.1-devfrom
thepastaclaw:fix/sdk-builder-floor-test

Conversation

@thepastaclaw

Copy link
Copy Markdown
Collaborator

Issue being fixed or feature implemented

Fixes #3933.

The sdk_builder_default_seeds_atomic_to_floor rs-sdk integration test
still expected the raw DEFAULT_INITIAL_PROTOCOL_VERSION, but mock SDK
construction defaults to mainnet and seeds the effective protocol floor as
max(DEFAULT_INITIAL_PROTOCOL_VERSION, mainnet network floor).

What was done?

  • Updated the test expectation to use
    DEFAULT_INITIAL_PROTOCOL_VERSION.max(PROTOCOL_VERSION_11).
  • Adjusted the nearby comment to describe the effective floor rather than only
    the initial floor.
  • Left production SDK behavior unchanged.

How Has This Been Tested?

  • cargo fmt --all
  • cargo test -p dash-sdk --all-features --test main fetch::document_query_v0_v1::sdk_builder_default_seeds_atomic_to_floor -- --exact --nocapture
  • Pre-PR code review gate: ship

Breaking Changes

None.

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

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@thepastaclaw, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 39 minutes and 20 seconds. Learn how PR review limits work.

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits.

🚦 How do rate limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, the refill rate gradually slows as usage increases. The highest same-day bursts are limited more strictly.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 783822d1-8734-4b3d-bc9a-fca17a12bb1f

📥 Commits

Reviewing files that changed from the base of the PR and between e1ce320 and 985b4a5.

📒 Files selected for processing (1)
  • packages/rs-sdk/tests/fetch/document_query_v0_v1.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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 Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@thepastaclaw thepastaclaw marked this pull request as ready for review June 18, 2026 17:38
@thepastaclaw

thepastaclaw commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator Author

✅ Review complete (commit 985b4a5)

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

The PR is a single test-only correction in packages/rs-sdk/tests/fetch/document_query_v0_v1.rs. Source verification confirms SdkBuilder::new_mock() defaults to mainnet and build() clamps the initial protocol version to max(DEFAULT_INITIAL_PROTOCOL_VERSION, min_protocol_version(Network::Mainnet)), so expecting max(DEFAULT_INITIAL_PROTOCOL_VERSION, PROTOCOL_VERSION_11) matches the actual SDK behavior. The targeted Cargo test could not complete because the build script needed to download Tenderdash sources and network escalation was not approved.

No active findings.

Review coverage note: Claude reviewer/verifier were unavailable due the ACP Claude limit, so this used Codex general review plus Codex verifier. The verifier inspected the pinned SHA and relevant SDK floor logic. The focused Cargo test began compiling but could not complete because the build wanted to download Tenderdash sources and network escalation was not approved.

@codecov

codecov Bot commented Jun 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.18%. Comparing base (e1ce320) to head (985b4a5).

Additional details and impacted files
@@              Coverage Diff              @@
##           v3.1-dev    #3938       +/-   ##
=============================================
+ Coverage     52.54%   87.18%   +34.63%     
=============================================
  Files            11     2632     +2621     
  Lines          1707   327563   +325856     
=============================================
+ Hits            897   285592   +284695     
- Misses          810    41971    +41161     
Components Coverage Δ
dpp 87.70% <ø> (∅)
drive 86.14% <ø> (∅)
drive-abci 89.45% <ø> (∅)
sdk ∅ <ø> (∅)
dapi-client ∅ <ø> (∅)
platform-version ∅ <ø> (∅)
platform-value 92.20% <ø> (∅)
platform-wallet ∅ <ø> (∅)
drive-proof-verifier 49.55% <ø> (∅)
🚀 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.

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.

test(rs-sdk): sdk_builder_default_seeds_atomic_to_floor expects pre-floor protocol version

1 participant