Adopt nexus's elite ("god-level") clippy config verbatim so Bombay holds the same hygiene bar as nexus/agency. It is two cooperating files: clippy.toml (thresholds + banned methods/types) and [workspace.lints.clippy] in the root Cargo.toml (the 5-group ruthless block). Every member crate opts in with [lints] workspace = true.
clippy.toml (Bombay)
# Bombay — Elite Clippy Configuration (from nexus)
allow-unwrap-in-tests = true
allow-expect-in-tests = true
# 1. BRAIN-CAPACITY LIMITS
cognitive-complexity-threshold = 9
too-many-arguments-threshold = 5
too-many-lines-threshold = 80
# 2. BAN DANGEROUS METHODS
[[disallowed-methods]]
path = "std::process::exit"
reason = "Return a `Result` or `ExitCode` from main instead."
[[disallowed-methods]]
path = "std::thread::spawn"
reason = "Use `std::thread::scope` or an async runtime like Tokio."
# 3. BAN DANGEROUS TYPES
[[disallowed-types]]
path = "std::sync::Mutex"
reason = "Use `tokio::sync::Mutex` or `parking_lot::Mutex`."
[[disallowed-types]]
path = "std::sync::RwLock"
reason = "Use `tokio::sync::RwLock` or `parking_lot::RwLock`."
Root Cargo.toml
[workspace.lints.clippy]
# 1. THE FOUNDATION
all = { level = "deny", priority = -1 }
pedantic = { level = "deny", priority = -1 }
nursery = { level = "deny", priority = -1 }
# 2. THE RUTHLESS RESTRICTIONS
unwrap_used = "deny"
expect_used = "deny"
panic = "deny"
todo = "deny"
unimplemented = "deny"
dbg_macro = "deny"
print_stdout = "deny"
print_stderr = "deny"
disallowed_methods = "deny"
disallowed_types = "deny"
# 3. MEMORY & PERFORMANCE STRICTNESS
clone_on_ref_ptr = "deny"
as_conversions = "deny"
str_to_string = "deny"
implicit_clone = "deny"
# 4. VARIABLE HYGIENE
shadow_reuse = "deny"
shadow_same = "deny"
shadow_unrelated = "deny"
# 5. THE "NO CHEATING" RULE
allow_attributes_without_reason = "deny"
Every member crate
Optional: also adopt agency's [workspace.lints.rust]
nexus ships clippy-only; agency additionally denies rust lints. Recommended for Bombay too, but unsafe_code is the catch (see below):
[workspace.lints.rust]
unsafe_code = "deny" # see phasing note — kameo uses unsafe transmute
missing_docs = "warn"
unreachable_pub = "deny"
dead_code = "deny"
CRITICAL: phasing (do NOT apply atomically to the fork)
Forked kameo will fail thousands of these immediately. Concretely:
Phasing plan:
- Land
clippy.toml + [workspace.lints.clippy] with the foundation groups at warn first (all/pedantic/nursery = warn), get a baseline count.
- Flip the ruthless restrictions (
unwrap/expect/panic/dbg) to deny as the code is cleaned crate-by-crate.
- Flip
all/pedantic/nursery to deny last, once the fork compiles clean.
- Track allow-with-reason exceptions;
allow_attributes_without_reason = deny forces every #[allow] to justify itself.
Cross-links
Acceptance
clippy.toml + [workspace.lints.clippy] (+ optional rust lints) checked in; every crate has [lints] workspace = true; nix flake check clippy step is green at the current phase; no blanket #[allow] without a reason.
Adopt nexus's elite ("god-level") clippy config verbatim so Bombay holds the same hygiene bar as nexus/agency. It is two cooperating files:
clippy.toml(thresholds + banned methods/types) and[workspace.lints.clippy]in the rootCargo.toml(the 5-group ruthless block). Every member crate opts in with[lints] workspace = true.clippy.toml(Bombay)Root
Cargo.tomlEvery member crate
Optional: also adopt agency's
[workspace.lints.rust]nexus ships clippy-only; agency additionally denies rust lints. Recommended for Bombay too, but
unsafe_codeis the catch (see below):CRITICAL: phasing (do NOT apply atomically to the fork)
Forked kameo will fail thousands of these immediately. Concretely:
unsafe_code = "deny"— kameo hasstd::mem::transmuteinerror.rs(the error-hook fn-ptr). Either keepunsafe_code = "warn"initially, or#[allow(unsafe_code, reason="…")]that one site.disallowed_types std::sync::Mutex— kameo uses it inlinks.rs:38. This lint is the M7 cleanup: parking_lot for the supervision link graph #52 migration (swap to parking_lot). The linter enforces the de-handroll.unwrap_used/expect_used/panic = deny— many call sites; aligns with adopting thiserror (cleanup: adopt thiserror for local error enums #50) and terrors (cleanup: terrors OneOf for nested error unions #53).as_conversions,too_many_lines = 80,cognitive_complexity = 9— will flag large files likeactor_ref.rs(2,980 LOC) andsupervision.rs(1,976 LOC) heavily.Phasing plan:
clippy.toml+[workspace.lints.clippy]with the foundation groups atwarnfirst (all/pedantic/nursery = warn), get a baseline count.unwrap/expect/panic/dbg) todenyas the code is cleaned crate-by-crate.all/pedantic/nurserytodenylast, once the fork compiles clean.allow_attributes_without_reason = denyforces every#[allow]to justify itself.Cross-links
nix flake checkrunscargo clippy --deny warnings).Acceptance
clippy.toml+[workspace.lints.clippy](+ optional rust lints) checked in; every crate has[lints] workspace = true;nix flake checkclippy step is green at the current phase; no blanket#[allow]without areason.