Skip to content

test(coverage): add 9 test modules for contract test coverage push#53

Closed
Josue19-08NC wants to merge 1 commit into
boundlessfi:testnetfrom
Josue19-08NC:feat/issue-25-contract-test-coverage-push
Closed

test(coverage): add 9 test modules for contract test coverage push#53
Josue19-08NC wants to merge 1 commit into
boundlessfi:testnetfrom
Josue19-08NC:feat/issue-25-contract-test-coverage-push

Conversation

@Josue19-08NC

Copy link
Copy Markdown

Description

Implements the full test coverage matrix described in #25. Adds 9 new test modules (6 for boundless-events, 3 for boundless-profile) covering every pillar, the paged cancel flow, escrow/fee math, the token whitelist, and all three profile operation surfaces. All tests use the native Soroban test harness with no mocks beyond mock_all_auths.

Changes

boundless-events:

  • token_whitelistregister_supported_token, deregister_supported_token, create_event rejection of unsupported/deregistered tokens
  • cancel_refund — paged cancel flow: OwnerOnly, FullPartnerThenResidual, ProRata, pagination across batches, all error variants
  • escrow_fee_math — default fee, per-event override, add_funds rate snapshot, waiver (0 bps), MAX_FEE_BPS guard, single/60-40 payout math, admin fee update
  • grant_pillarMulti release required, fixed-split milestone math, last-milestone dust sweep, credit/rep side-effects, all error variants
  • bounty_pillarSingle release required, apply/withdraw/submit gate, credit charge + 50% refund, select_winners pay+profile, all error variants
  • hackathon_pillarSingle+deadline required, open submit model, multi-recipient distribution, cancel refund, all error variants

boundless-profile:

  • creditsbootstrap, spend/earn/refund/admin_grant, all error variants + op replay + auth
  • reputationbump/slash/admin_slash, saturation, all error variants + op replay + auth
  • earningsregister_earnings, zero/negative guard, multi-user/token tracking, i128::MAX saturation, op replay guard

Result: 203 tests passing (146 events + 57 profile), zero warnings, snapshots regenerated and committed.

Closes

Closes #25

Notes

  • soroban_sdk::Vec shadows std::vec::Vec in test scope — array literals are used instead of .collect() to avoid the name collision.
  • bump_saturates_at_max_u64 was renamed to bump_large_values_accumulate_without_overflow; since bump_reputation accepts u32, reaching u64::MAX would require 2^32 calls — the test instead verifies two u32::MAX bumps accumulate without integer overflow.

@coderabbitai

coderabbitai Bot commented Jun 24, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Josue19-08NC, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 49 minutes and 53 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 review availability.

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, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 678378a1-dfc6-42c1-a426-9b672316c0d1

📥 Commits

Reviewing files that changed from the base of the PR and between b80f064 and 9856ab4.

📒 Files selected for processing (11)
  • contracts/events/src/tests/bounty_pillar.rs
  • contracts/events/src/tests/cancel_refund.rs
  • contracts/events/src/tests/escrow_fee_math.rs
  • contracts/events/src/tests/grant_pillar.rs
  • contracts/events/src/tests/hackathon_pillar.rs
  • contracts/events/src/tests/mod.rs
  • contracts/events/src/tests/token_whitelist.rs
  • contracts/profile/src/tests/credits.rs
  • contracts/profile/src/tests/earnings.rs
  • contracts/profile/src/tests/mod.rs
  • contracts/profile/src/tests/reputation.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.

@Josue19-08NC Josue19-08NC force-pushed the feat/issue-25-contract-test-coverage-push branch 2 times, most recently from bdf0b11 to efec66a Compare June 24, 2026 22:05
…coverage push

Implements the full test coverage matrix from issue boundlessfi#25:

events:
- token_whitelist: register/deregister token support + create_event gate
- cancel_refund: paged cancel flow (OwnerOnly, FullPartnerThenResidual,
  ProRata, pagination, all error variants)
- escrow_fee_math: fee override, waiver, add_funds rate snapshot,
  MAX_FEE_BPS guard, single/split payout math
- grant_pillar: Multi release required, fixed-split milestone math,
  last-milestone dust sweep, credit/rep side-effects, all errors
- bounty_pillar: Single release required, apply/withdraw/submit gate,
  credit charge and 50% refund, select_winners pay+profile, all errors
- hackathon_pillar: Single+deadline required, open submit model,
  multi-recipient distribution, cancel refund, all errors

profile:
- credits: bootstrap, spend/earn/refund/admin_grant, all error variants
- reputation: bump/slash/admin_slash, saturation, all error variants
- earnings: register, zero/negative guard, multi-user/token tracking,
  i128::MAX saturation, op replay guard

203 tests passing (146 events + 57 profile). Snapshots regenerated.

Closes boundlessfi#25
@Josue19-08NC Josue19-08NC force-pushed the feat/issue-25-contract-test-coverage-push branch from efec66a to 9856ab4 Compare June 24, 2026 22:14
@Josue19-08NC

Josue19-08NC commented Jun 24, 2026

Copy link
Copy Markdown
Author

Replaced by #54, opened from the correct account (Josue19-08). It was a mistake, as I had submitted it using my work account instead of my personal account.

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.

Epic: contract test-coverage push (events + profile)

2 participants