# Build
cargo build
# Run all tests
cargo nextest run --workspace
# Run doc tests
cargo test --all --doc
# Lint
cargo fmt --all --check
cargo clippy --all-targets -- -D warnings
# Security audit
cargo audit
# License and ban check
cargo deny checkEvery public function, struct, trait, and enum must have a rustdoc comment. Follow the format from CLAUDE.md:
/// Short description.
///
/// Args:
/// * `param_name`: What this parameter represents and its constraints.
///
/// Usage:
/// ```ignore
/// let result = my_function("example", 42)?;
/// ```
pub fn my_function(param_name: &str, count: usize) -> Result<Output, MyError> {
// implementation
}Rules:
- Private functions do not require doc comments unless the logic is non-obvious.
- Do not add comments that explain what the code does — name the function and its parts clearly instead.
- Do add comments that explain why a particular decision was made (opinionated choices, non-obvious tradeoffs).
- Broken intra-doc links are a compile error (
#![deny(rustdoc::broken_intra_doc_links)]).
- No
println!oreprintln!in library crates (#![deny(clippy::print_stdout, clippy::print_stderr)]). - No
Utc::now()orSystemTime::now()in domain logic — injectClockProvider(see ARCHITECTURE.md). - No
std::env::var()in domain logic — useEnvironmentConfigabstraction. - Domain errors use
thiserrorenums.anyhowis only for CLI and server crates. - All new port traits live in
src/ports/with a fake inauths-test-utils/src/fakes/and a mock inauths-test-utils/src/mocks/.
See RELEASES.md. For changes to auths-verifier, auths-core, or auths-sdk:
- Additive changes (new public items, new optional fields): minor version bump.
- Breaking changes (removed/renamed items, changed signatures): major version bump (or
0.(x+1).0while in pre-release). - CI enforces this via
cargo-semver-checkson all pull requests.
Follow the test pyramid (see ARCHITECTURE.md):
- Unit tests — use
auths-test-utils::mocks(mockall). No I/O. - Integration boundary tests — use
auths-test-utils::fakes+ contract macros. No disk or network. - E2E tests — use
auths-test-utils::git::init_test_repo()for real Git I/O.
All unit tests must pass with network blocked (cargo test --lib --workspace behind iptables in CI).
-
cargo fmt --allpasses -
cargo clippy --all-targets -- -D warningsclean -
cargo nextest run --workspacegreen -
cargo test --all --docgreen - Public API changes documented with
Args:andUsage:blocks - New port traits have a fake and/or mock in
auths-test-utils - Breaking changes bumped version per
RELEASES.md - If you touched
crates/auths-pairing-daemon/src/{handlers,router,error}.rs, updatedocs/api-spec.yamlin the same PR (per ADR 004). Theapi-specCI job enforces this; labelapi-no-spec-changecan be applied by a reviewer when a change is provably spec-invariant.