一键导入
review-and-fix
// Deep analysis and iterative fixing of a Rust source file. Finds logic errors, lock/concurrency issues, and simplification opportunities, then fixes them one by one until the file is clean.
// Deep analysis and iterative fixing of a Rust source file. Finds logic errors, lock/concurrency issues, and simplification opportunities, then fixes them one by one until the file is clean.
7×24 chaos testing for RobustMQ. Injects broker-kill and network-delay faults, validates SDK client resilience across Python/Go/Rust/Java, and publishes a Markdown + JSON report to GitHub after each run.
Audit and update the HTTP API documentation under docs/zh/Api/ and docs/en/Api/ against the actual route definitions in src/admin-server/src/. Uses path.rs as the single source of truth. Fixes wrong URI prefixes, non-existent routes, wrong request/response fields, and syncs the English docs to match the Chinese ones.
Complete step-by-step guide for implementing a new protocol Broker in RobustMQ. Use when the user asks to add a new broker, implement a new protocol, or scaffold a new broker crate.
Implements new RobustMQ MQTT connector integrations end-to-end using project conventions. Use when the user asks to add, implement, or support a new connector type such as webhook, opentsdb, clickhouse, influxdb, cassandra, mqtt bridge, or protocol-compatible targets.
Designs and implements minimal, high-value metrics for RobustMQ services and dashboards. Use when the user asks to add metrics, improve observability, or update Grafana panels for core processing pipelines.
Create GitHub issues for the RobustMQ project. Use when the user asks to create an issue, file a bug, propose a feature, or track a task.
| name | review-and-fix |
| description | Deep analysis and iterative fixing of a Rust source file. Finds logic errors, lock/concurrency issues, and simplification opportunities, then fixes them one by one until the file is clean. |
Deep-analyze the specified file, find logic errors, memory/lock issues, and simplification opportunities, and fix them iteratively until no problems remain.
/review-and-fix <file_path>
Examples
/review-and-fix src/mqtt-broker/src/subscribe/buckets.rs
/review-and-fix src/mqtt-broker/src/subscribe/directly_push.rs
Each round follows this sequence until nothing left to fix:
Fully read the target file. Read related files as needed (callers, struct definitions it depends on) to understand context.
Check in priority order:
Logic Errors (must fix)
add writes N indexes, remove only cleans N-1Concurrency/Lock Issues (must fix)
entry(), get(), get_mut() return Ref/RefMut that hold shard locks — not released during .awaitRwLock read lock held during .await blocks write lock.clone() the data to drop the guard before awaiting; or store Arc<T>Simplification (apply judiciously)
get_mut + else { insert } → entry().or_default()else { return x } → remove the elselet x = ...; let x = match x { Some(v) => v, None => return } → let Some(x) = ... else { return }if !condition { ... } → if condition { continue }let mut failed = false; ... if !failed { commit() }) → early returnWhat NOT to do
cargo check -p <crate> to verify compilationAfter each round of fixes, re-analyze the file to confirm nothing was missed. Stop only when you can clearly state: "no logic errors, no lock issues, no worthwhile simplification remaining."