Files
zerokit/.github/PULL_REQUEST_TEMPLATE.md
Ekaterina Broslavskaya 3d9ff51d93 feat(docs): provide pull request template (#377)
## Description

Updated PR template

## Testing

<!-- Describe the testing done for this PR -->


## Checklist

- [ ] I have run the CI coverage report. Add the `run-coverage` label to
this PR to enable it.
2026-02-16 19:10:15 +07:00

3.1 KiB

Description

Changes

Testing


PR Lifecycle

Important

Draft PRs signal that work is still in progress and will not trigger CI. Only mark your PR as Ready for review when you believe it is complete. All CI checks must pass before requesting a review.

Code Guidelines

Please keep the following in mind (see CONTRIBUTING.md for full details):

Commits

  • Follow Conventional Commits (feat(rln):, fix(utils):, chore:, etc.)
  • Use the appropriate scope: rln, rln-cli, rln-wasm, utils, ci
  • GPG-sign your commits

Error Handling

  • No panics in library code. Do not use unwrap(), expect(), or panic!() in production paths inside rln/src/ or utils/src/. The only acceptable exception is an internal invariant that is statically guaranteed — and even then, prefer returning an error.
  • Use the project's thiserror-based error types (RLNError, ProtocolError, UtilsError, etc.) and propagate errors with ?.
  • Provide context in error variants (e.g., InsufficientData { expected, actual }).
  • unwrap() is fine in tests.

Code Style

  • Run cargo fmt --all -- --check to verify formatting (CI enforces this on stable).
  • Group imports: std first, then external crates, then local modules (see rustfmt.toml).
  • Use pub(crate) for items that should not be part of the public API.
  • Apply Zeroize / ZeroizeOnDrop to any struct holding secret material.

Linting (mirrors CI)

CI runs clippy across multiple crate/feature combinations. Run the relevant checks locally before pushing:

# Default features — workspace root (rln + utils)
cargo clippy --all-targets --tests --release -- -D warnings

# Stateless feature — from rln/
cd rln && cargo clippy --all-targets --tests --release \
  --features=stateless --no-default-features -- -D warnings

# WASM target — from rln-wasm/
cd rln-wasm && cargo clippy --target wasm32-unknown-unknown \
  --tests --release -- -D warnings

At minimum, run the default-features check. If your changes touch stateless or rln-wasm, run those checks as well.

Checklist

  • My PR title follows Conventional Commits format
  • I have linked the related issue(s)
  • cargo fmt --all -- --check produces no changes
  • Clippy passes for all affected crate/feature combinations (see Linting above)
  • make test passes locally
  • No new unwrap() / expect() / panic!() in library code
  • New code includes appropriate tests (unit / integration / WASM where applicable)
  • I have run the CI coverage report — add the run-coverage label to enable it
  • All CI checks pass and the PR is marked Ready for review