Skip to content

feat(faucet): integrate reliakit-primitives + reliakit-validate#771

Merged
github-actions[bot] merged 1 commit into
mainfrom
feat/faucet-reliakit-primitives
Jun 3, 2026
Merged

feat(faucet): integrate reliakit-primitives + reliakit-validate#771
github-actions[bot] merged 1 commit into
mainfrom
feat/faucet-reliakit-primitives

Conversation

@satyakwok
Copy link
Copy Markdown
Collaborator

Integrates two published Rust crates from the same author into the testnet faucet.

What changed

reliakit-primitives = "0.2" (crates.io)

  • validate_address(): replaced manual .chars().all(|c| c.is_ascii_hexdigit()) with HexString::new() — same semantics, uses the typed primitive.
  • main(): PositiveInt::new(cli.drip_amount) rejects drip_amount=0 at startup before any I/O. NonEmptyStr::new(&cli.rpc_url) rejects empty RPC URL.

reliakit-validate = "0.1" (crates.io)

  • DripRequest now implements Validate — address format rules are expressed once at the type level.
  • handle_drip() calls Valid::new(req) as the first operation, rejecting invalid addresses before any rate-limit state mutation or RPC call.

No behavior change

The same address format is accepted/rejected. The change is structural: validation is now in one place (the Validate impl) and enforced at the type boundary rather than scattered through the handler.

- Add reliakit-primitives = "0.2" and reliakit-validate = "0.1" from
  crates.io (both published crates by the same author).
- validate_address(): use HexString::new() for hex-char validation instead
  of manual .chars().all(|c| c.is_ascii_hexdigit()) — same semantics,
  more expressive.
- DripRequest: implement Validate (from reliakit-validate) so address
  correctness is enforced at the type level. handle_drip() now calls
  Valid::new(req) before any state mutation or RPC call.
- main(): use PositiveInt::new(drip_amount) and NonEmptyStr::new(rpc_url)
  to reject misconfigured values at startup before any I/O.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 3, 2026

Warning

Review limit reached

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

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

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ 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.

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 include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: cfbc59a2-ddbb-49fc-b84b-7362e2182f57

📥 Commits

Reviewing files that changed from the base of the PR and between d7f0d50 and c9a22e7.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock, !**/*.lock
📒 Files selected for processing (2)
  • bin/sentrix-faucet/Cargo.toml
  • bin/sentrix-faucet/src/main.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/faucet-reliakit-primitives

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 enabled auto-merge (squash) June 3, 2026 06:27
@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 3, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot merged commit a3e0d7a into main Jun 3, 2026
17 checks passed
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.

1 participant