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
{{ message }}
Repository navigation
clippy -D warnings fails on aprender-serve on main (1280 excessive_precision in IQ tables, 5 deny-level undocumented unsafe) — no gate lints it: Makefile clippy is facade-only and serve doesn't inherit workspace lints #4152
Measured 2026-09-24 on lambda, toolchain 1.93.0 (the pin), with #3606's branch at 9f60249. Every file listed is byte-identical to main (49fe19c), so this is main's state:
other lints in src/lib.rs, src/format_detect.rs, src/api/tests/cancel_scope_2376.rs (all byte-identical to main).
Why no gate sees it
Scope. The Makefile's clippy gates (Makefile:161,230,246: cargo clippy -- -D warnings) lint the ROOT FACADE package only. CLAUDE.md warns about exactly this ("Bare cargo clippy only lints the ROOT FACADE package, which is nearly empty").
Lint table.crates/aprender-serve/Cargo.toml declares its own [lints.clippy] (undocumented_unsafe_blocks = "deny") and has no [lints] workspace = true. So the workspace's excessive_precision = "allow" (Cargo.toml:536, "ML test data needs precise values") never reaches it. The IQ tables are exactly the data that allow was written for.
Done when
cargo clippy -p aprender-serve --all-targets --no-deps -- -D warnings exits 0 on main. That means either aprender-serve inherits the workspace lints (keeping its deny for unsafe blocks) or it allows excessive_precision locally, and the 5 unsafe blocks get // SAFETY: comments.
A gate lints every workspace member, not the facade. It gets a first-green proof on main, and a planted undocumented unsafe {} in aprender-serve must turn it RED.
Found while adopting #3606 (aprender-30); filed at the cop's (aprender-cf) request.
Soundness fix. In crates/aprender-serve/tests/falsification_tests.rs, the simd_axpy call guarded a #[target_feature(enable = "avx2,fma")] function with is_x86_feature_detected!("avx2") only, which is UB on a CPU that has avx2 but not fma. It now checks both.
SAFETY comments on the 5 undocumented_unsafe_blocks.
excessive_precision (1280 findings): scoped #[allow] on the five iq* ggml %.9e reference consts. The values are exact in f32 and stay byte-for-byte diffable against ggml. A Cargo.toml [lints] allow does not work here, because the crate-level #![deny(clippy::all)] overrides it.
Held for cop quorum (workflow edit): fd5ec460e on PMAT-4152-clippy-ratchet:
scripts/check_clippy_members.sh keys findings as <pkg>/<kind>:<target>/<lint> against a shrink-only baseline (scripts/clippy_members_baseline.txt, keyed in check_baseline_ratchets). The baseline has 102 keys and 3277 findings, pinned to rustc 1.93.0.
The default mode lints only the packages the diff touches; --full lints the whole workspace.
Self-test: on an unchanged tree it goes green; with a needless_return planted in aprender-build-sha it goes RED. Measured locally: both pass.
The self-test caught a real bug on its first run. compare() used awk's NR == FNR, which is also true on the current file when the baseline is empty, so a clean package could never go RED. It now uses FILENAME == ARGV[1].
Wiring: a new clippy-members job in guards-nightly.yml. A cold workspace clippy takes about 20 min on lambda, and guards-nightly already runs 32–55 of its 60 min. guard-cargo is at its budget, so PR-path wiring waits until the job has been measured on a runner.
Folded into #5307 as a checklist row (TRIAGE-100, 2026-10-14): the open-ticket cap is 100, so this ticket is now tracked on that master and closed as not planned. Nothing is lost: reopen it when its work resumes, and an open PR for it reopens it. Pushed branch: evidence/4152-serve-clippy-green, PMAT-4152-clippy-ratchet.
Activity
fix(b1): clear the six fold defects #4311's CI named
fix(b1): guard-tree — a guard run by an explicit-test-command fragmen…
fix(serve): simd_axpy check required avx2 only for an avx2+fma fn; do…
Merge #4152 serve lint/soundness fixes + #4351 lean_has_sorry complex…
noahgift commentedon Sep 25, 2026
Status (aprender-a2):
batch/0.70.0@4c50f7277:crates/aprender-serve/tests/falsification_tests.rs, thesimd_axpycall guarded a#[target_feature(enable = "avx2,fma")]function withis_x86_feature_detected!("avx2")only, which is UB on a CPU that has avx2 but not fma. It now checks both.undocumented_unsafe_blocks.#[allow]on the five iq* ggml%.9ereference consts. The values are exact in f32 and stay byte-for-byte diffable against ggml. ACargo.toml [lints]allow does not work here, because the crate-level#![deny(clippy::all)]overrides it.fd5ec460eonPMAT-4152-clippy-ratchet:scripts/check_clippy_members.shkeys findings as<pkg>/<kind>:<target>/<lint>against a shrink-only baseline (scripts/clippy_members_baseline.txt,keyedin check_baseline_ratchets). The baseline has 102 keys and 3277 findings, pinned to rustc 1.93.0.--fulllints the whole workspace.needless_returnplanted in aprender-build-sha it goes RED. Measured locally: both pass.compare()used awk'sNR == FNR, which is also true on the current file when the baseline is empty, so a clean package could never go RED. It now usesFILENAME == ARGV[1].clippy-membersjob inguards-nightly.yml. A cold workspace clippy takes about 20 min on lambda, and guards-nightly already runs 32–55 of its 60 min. guard-cargo is at its budget, so PR-path wiring waits until the job has been measured on a runner.fix(guard): clippy-members self-test compared one path to itself; no-…
noahgift commentedon Oct 14, 2026
Folded into #5307 as a checklist row (TRIAGE-100, 2026-10-14): the open-ticket cap is 100, so this ticket is now tracked on that master and closed as not planned. Nothing is lost: reopen it when its work resumes, and an open PR for it reopens it. Pushed branch:
evidence/4152-serve-clippy-green,PMAT-4152-clippy-ratchet.Agent: aprender-clerk
noahgift commentedon Oct 14, 2026
Row moved: #5307 was split into named masters (TRIAGE-100 master naming), so this ticket's checklist row is now on #5331.
Agent: aprender-clerk