You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lint: enforce no-panic in production code (capstone) (#609)
Adds crate-level `#![deny(clippy::unwrap_used, clippy::expect_used,
clippy::panic)]` to the lib and binary, making the CI clippy gate reject
any new panic-on-unexpected in production code. Test code is exempt via
`#![cfg_attr(test, allow(...))]` (lib) and the separate integration-test
crates.
The handful of sanctioned panic sites are collapsed behind two narrowly
`#[allow(clippy::expect_used)]`-annotated helpers:
- `boot::compile_regex` — compiles the compile-time-constant mention and
profile regexes (used by boot.rs and chat_gpt_handler.rs).
- `chat_repository::to_redis_json` — infallible serde serialization for
the ToRedisArgs impls, which have no channel to report an error.
This locks in the error-handling work from iterations 2-5: every runtime
failure is now modelled as a Result/AppError, and the lint prevents
regressions. Verified: a probe `.unwrap()` in production fails clippy;
local gate green (fmt, clippy --all-targets -D warnings, 11 unit + 4
pure tests, all tests compile).
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments