chore(lint): restore god-level clippy bar as a ratchet (#61)#111
Merged
Conversation
Re-adopt nexus's elite clippy config over the vendored kameo fork. The full god-level bar is DENY workspace-wide, so all NEW production code is held to it from line one. The 38 vendored lib/bin files that predate the bar carry a documented per-file `#![allow(..., reason = "…#61")]` quarantine header, removed file-by-file as the code is cleaned or deleted under M1/M7. - clippy.toml: disallowed_methods (process::exit, thread::spawn) + brain-capacity thresholds + test escape hatches. DEVIATION from nexus-verbatim: the disallowed_types std::sync::Mutex/RwLock ban is dropped — the real rule is "no lock held across .await", a per-site call (#52), not a type ban; production has zero std::sync::Mutex today. - Cargo.toml [workspace.lints.clippy]: all/pedantic/nursery + the restriction wall at deny (minus disallowed_types). - flake.nix: re-enable the bombay-clippy gate, scoped to default targets (lib + bins), NOT --all-targets. Test/example/bench code stays on the lighter bar (consistent with clippy.toml allow-unwrap/expect-in-tests) — gating that surface is a separate #61-tail decision. No `-- --deny warnings`: the deny bar itself gates; rust-level warnings stay non-blocking. - src/lib.rs, actors/src/lib.rs: crate-root fixes (a reason on the test-surface allow; doc backticks) rather than blanket-quarantining the crate root. Deferred to the #61 tail: the optional [workspace.lints.rust] tightening (unsafe_code — kameo's error.rs transmute — dead_code, unreachable_pub), gating the test/example surface, and de-quarantining files as M1/M7 rewrite them. nix flake check green (all 14 gates, incl. the restored clippy).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the config half of #61 (the bar is live); #61 stays open for the de-quarantine tail.
What this does
Re-adopts nexus's elite clippy config over the vendored kameo fork as a lint ratchet: the full god-level bar is
denyworkspace-wide, so all new production code is held to it from line one. The 38 vendored lib/bin files that predate the bar each carry a documented per-file quarantine header:These headers leave the tree file-by-file as M1/M7 rewrite or delete the code.
Key decisions
disallowed_typesstd::sync::Mutex/RwLockban (deviation from nexus-verbatim). The real invariant is "no lock held across.await" — a per-site call (cleanup: parking_lot for the supervision link graph #52), not a type rule. Production has zerostd::sync::Mutextoday, so the ban would only forbid a future-correct use. Documented inclippy.toml.--all-targets. The ~60 BDD-wiring/example/bench files trip 2,000+ pedantic/nursery style findings whose cleanup buys nothing on code whose job is test clarity — and the project already declares a lighter test bar viaallow-unwrap-in-tests/allow-expect-in-tests. Gating the test surface is a separate chore: god-level clippy — adopt nexus elite lint config #61-tail decision.-- --deny warnings. Thedeny-level[workspace.lints.clippy]bar itself fails the build on any violation; rust-level warnings (unused/dead-code in vendored kameo) stay non-blocking until the rust-lints tightening in the tail.src/lib.rs,actors/src/lib.rs) rather than blanket-quarantined (a crate-root#![allow]would un-lint future core/M1 code).Deferred to the #61 tail
[workspace.lints.rust]tightening:unsafe_code(kameo'serror.rstransmuteneeds a per-site allow),dead_code,unreachable_pub,missing_docs.Verification
nix flake checkgreen — all 14 gates including the restoredbombay-clippy, plus the full BDD/propertynextestsuite (unchanged by the allow-only headers), doctest, taplo, fmt, audit, deny.