Component
bombay-core/src/mailbox.rs #[cfg(test)] module (lines ~429–678). Pre-existing on main (landed with #133); surfaced while implementing #113.
What
cargo clippy --all-targets reports 11 errors, all in the mailbox test module — invisible to the CI gate, which deliberately scopes clippy to lib + bins, not --all-targets (flake.nix:113; test code gets clippy.toml's allow-unwrap-in-tests/allow-expect-in-tests). So --all-targets is stricter than the gate.
The lints:
panic in production code (×2) — panic! in test helpers
- silent
as conversions (×4)
- shadowed bindings (×3) —
tx / start / capacity
- large size difference between variants (×1) — a test-only enum
- item in documentation missing backticks (×1)
The decision
The project bills itself "god-level bar from line one," yet test code is exempt from --all-targets lints. Two ways to make it consistent:
- Fix them and flip the gate to
--all-targets (holds tests to the bar too).
- Extend the test-allows in
clippy.toml (codify that tests may use panic!/as/shadowing).
Recommend (1) — the bar should mean what it says; test code that needs panic!/as usually has a cleaner form. Whichever is chosen, apply it workspace-wide, not just to mailbox.
Not in scope of
#113 (error module) — kept separate to keep that diff focused. Related: #61 (clippy ratchet), #133 (mailbox).
Component
bombay-core/src/mailbox.rs#[cfg(test)]module (lines ~429–678). Pre-existing onmain(landed with #133); surfaced while implementing #113.What
cargo clippy --all-targetsreports 11 errors, all in the mailbox test module — invisible to the CI gate, which deliberately scopes clippy to lib + bins, not--all-targets(flake.nix:113; test code getsclippy.toml'sallow-unwrap-in-tests/allow-expect-in-tests). So--all-targetsis stricter than the gate.The lints:
panicin production code (×2) —panic!in test helpersasconversions (×4)tx/start/capacityThe decision
The project bills itself "god-level bar from line one," yet test code is exempt from
--all-targetslints. Two ways to make it consistent:--all-targets(holds tests to the bar too).clippy.toml(codify that tests may usepanic!/as/shadowing).Recommend (1) — the bar should mean what it says; test code that needs
panic!/asusually has a cleaner form. Whichever is chosen, apply it workspace-wide, not just to mailbox.Not in scope of
#113 (error module) — kept separate to keep that diff focused. Related: #61 (clippy ratchet), #133 (mailbox).