Declarative .mdcReguli Cursor/Claude/Windsurf și fluxuri de lucru n8nAbilitatea de agentScurgeri Zero-Secret auditate

Rust Tokio + Axum Abilități de inginerie a sistemelor în siguranță pentru anulare

CLAUDE.md declarativ și abilitate .mdc care previn panica .unwrap() în handlerele HTTP/MCP, protejând tokio::select! siguranța anulării și cozile de limitare a canalelor.

Agent declarativ și fișiere cu reguli IDE

---
description: Zero-panic Axum handlers, bounded Tokio mpsc channels, and cancellation-safe async Rust
globs: **/*.rs,Cargo.toml
alwaysApply: false
---

# Rust Tokio & Axum Production Reliability Skill

- Forbid `.unwrap()` and `.expect()` in request handlers and MCP tool loops; propagate typed errors via `thiserror` implementing `axum::response::IntoResponse`.
- Use bounded `tokio::sync::mpsc::channel(capacity)` exclusively — never `unbounded_channel` — to enforce deterministic backpressure.
- Offload CPU-bound parsing, hashing, or synchronous I/O > 500µs onto `tokio::task::spawn_blocking` so worker reactor threads never stall.
- Audit every `tokio::select!` branch for cancellation safety; avoid partial multi-frame writes inside cancellable futures.
- Instrument async handlers with `#[tracing::instrument(skip_all, fields(req_id))]` without logging secret headers.

## Verification Check
```bash
cargo clippy --all-targets -- -D warnings && cargo test
```

Note de configurare a comunității și recenzii de producție (0)

Încă nu există note ale comunității. Distribuiți mai jos sfatul de configurare a producției.

Postați o notă de configurare sau un sfat de verificare

Expunere MCP Instrumente și inspector de schemă de resurse

Identificator de instrumente/resurseParametrii de intrareComportamentul de execuție
forbid_handler_unwrapsrc/**/*.rsEnforces typed thiserror/IntoResponse error propagation instead of unwrap()/expect().