rust-testing-code-review

Installation
SKILL.md

Rust Testing Code Review

Review Workflow

  1. Check Rust edition — Note edition in Cargo.toml (2021 vs 2024). Edition 2024 changes temporary scoping in if let and tail expressions, and makes #[expect] the preferred lint suppression
  2. Check test organization — Unit tests in #[cfg(test)] modules, integration tests in tests/ directory
  3. Check async test setup#[tokio::test] for async tests, proper runtime configuration. Check for async-trait on mocks that could use native async fn in traits
  4. Check assertions — Meaningful messages, correct assertion type. Review if let assertions for edition 2024 temporary scope changes
  5. Check test isolation — No shared mutable state between tests, proper setup/teardown. Prefer LazyLock over lazy_static!/once_cell for shared fixtures
  6. Check coverage patterns — Error paths tested, edge cases covered

Gates (hard)

Do not advance to Output Format until each pass condition is satisfied (yes/no with a concrete artifact).

  1. Edition recorded — Open the target crate’s Cargo.toml (or workspace [workspace.package] / inherited edition) and note the edition value. Pass: you can quote edition = "…" (or document “inherited from workspace”) before citing Rust 2024–specific behavior (if let / tail temporary drops, #[expect] vs #[allow] migration, native async fn in traits as default). If edition is not 2024, do not report those items as edition-2024 regressions; at most Informational if still useful.
  2. dyn vs static async mocks — Before suggesting native async fn in traits instead of async-trait, check whether the mock is used as dyn Trait. Pass: if dyn is required, you either skip that suggestion or align with Valid Patterns (async-trait still needed).
  3. Verification protocolPass: steps from beagle-rust:review-verification-protocol are done before any finding is listed (see Before Submitting Findings).
Related skills

More from existential-birds/beagle

Installs
22
GitHub Stars
57
First Seen
Mar 16, 2026