rust-testing-code-review
Rust Testing Code Review
Review Workflow
- Check Rust edition — Note edition in
Cargo.toml(2021 vs 2024). Edition 2024 changes temporary scoping inif letand tail expressions, and makes#[expect]the preferred lint suppression - Check test organization — Unit tests in
#[cfg(test)]modules, integration tests intests/directory - Check async test setup —
#[tokio::test]for async tests, proper runtime configuration. Check forasync-traiton mocks that could use nativeasync fnin traits - Check assertions — Meaningful messages, correct assertion type. Review
if letassertions for edition 2024 temporary scope changes - Check test isolation — No shared mutable state between tests, proper setup/teardown. Prefer
LazyLockoverlazy_static!/once_cellfor shared fixtures - 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).
- Edition recorded — Open the target crate’s
Cargo.toml(or workspace[workspace.package]/ inherited edition) and note theeditionvalue. Pass: you can quoteedition = "…"(or document “inherited from workspace”) before citing Rust 2024–specific behavior (if let/ tail temporary drops,#[expect]vs#[allow]migration, nativeasync fnin traits as default). If edition is not2024, do not report those items as edition-2024 regressions; at most Informational if still useful. dynvs static async mocks — Before suggesting nativeasync fnin traits instead ofasync-trait, check whether the mock is used asdyn Trait. Pass: ifdynis required, you either skip that suggestion or align with Valid Patterns (async-traitstill needed).- Verification protocol — Pass: steps from
beagle-rust:review-verification-protocolare done before any finding is listed (see Before Submitting Findings).
More from existential-birds/beagle
langgraph-code-review
Reviews LangGraph code for bugs, anti-patterns, and improvements. Use when reviewing code that uses StateGraph, nodes, edges, checkpointing, or other LangGraph features. Catches common mistakes in state management, graph structure, and async patterns.
827react-flow
React Flow (@xyflow/react) for workflow visualization with custom nodes and edges. Use when building graph visualizations, creating custom workflow nodes, implementing edge labels, or controlling viewport. Triggers on ReactFlow, @xyflow/react, Handle, NodeProps, EdgeProps, useReactFlow, fitView.
772tailwind-v4
Tailwind CSS v4 with CSS-first configuration and design tokens. Use when setting up Tailwind v4, defining theme variables, using OKLCH colors, or configuring dark mode. Triggers on @theme, @tailwindcss/vite, oklch, CSS variables, --color-, tailwind v4.
596react-flow-advanced
Advanced React Flow patterns for complex use cases. Use when implementing sub-flows, custom connection lines, programmatic layouts, drag-and-drop, undo/redo, or complex state synchronization.
427python-code-review
Reviews Python code for type safety, async patterns, error handling, and common mistakes. Use when reviewing .py files, checking type hints, async/await usage, or exception handling.
426docling
Docling document parser for PDF, DOCX, PPTX, HTML, images, and 15+ formats. Use when parsing documents, extracting text, converting to Markdown/HTML/JSON, chunking for RAG pipelines, or batch processing files. Triggers on DocumentConverter, convert, convert_all, export_to_markdown, HierarchicalChunker, HybridChunker, ConversionResult.
378