Found while working #2473. Separate from that issue and not fixed in #2497 or #2498.
$ cargo clippy -p aprender-test-lib --all-targets \
--features browser,docker,llm,proptest,derive,compute-blocks -- -D warnings
rc=101
Five distinct violations, all in files neither open PR touches:
| site |
lint |
src/tui/brick.rs:209 |
only a panic! in if-then statement |
src/tui/compute_block.rs:171 |
only a panic! in if-then statement |
src/docker.rs:161 |
from_str can be confused for std::str::FromStr::from_str |
src/llm/report.rs:96 |
redundant closure |
src/llm/score.rs:229 |
clamp-like pattern without using clamp |
plus an unsafe block missing a safety comment in the test targets.
Why nobody noticed
Without the feature flags, the same command is clean. This is the trap already
recorded as project_theater_triage_dark_targets: "clippy --all-targets -p X is
CLEAN while X is broken behind a non-default feature." browser, docker, llm,
proptest, derive and compute-blocks are all off by default in
aprender-test-lib, and nothing in CI turns them on for a lint pass.
It is the same root cause as the probar findings themselves: code that no
configuration compiles is code nothing checks. ProbarDriver had only
MockDriver and ActionExecutor had no production impl at all, for years, behind
a feature flag CI never enabled.
Worth noting how this was measured, because it nearly went the other way: my first
run reported 0 errors and I was about to record the finding as unreproducible.
The difference was -- -D warnings. Without it clippy exits 0 and prints warnings;
the repo's actual gate uses -D warnings. A "clean" clippy run that omits the flag
the gate uses is not evidence of anything.
Suggested fix
- Fix the five sites — all mechanical, none behavioural.
- Add a lint pass over
aprender-test-lib with its features enabled to CI, or
the same five will come back and the next mock-only trait will hide just as
long.
Related: #2473 (what the dark feature hid), #2495, #2496 (same family — targets
and scans that nothing exercises).
Found while working #2473. Separate from that issue and not fixed in #2497 or #2498.
Five distinct violations, all in files neither open PR touches:
src/tui/brick.rs:209panic!inif-then statementsrc/tui/compute_block.rs:171panic!inif-then statementsrc/docker.rs:161from_strcan be confused forstd::str::FromStr::from_strsrc/llm/report.rs:96src/llm/score.rs:229clampplus an
unsafe block missing a safety commentin the test targets.Why nobody noticed
Without the feature flags, the same command is clean. This is the trap already
recorded as
project_theater_triage_dark_targets: "clippy --all-targets -p XisCLEAN while X is broken behind a non-default feature."
browser,docker,llm,proptest,deriveandcompute-blocksare all off by default inaprender-test-lib, and nothing in CI turns them on for a lint pass.It is the same root cause as the probar findings themselves: code that no
configuration compiles is code nothing checks.
ProbarDriverhad onlyMockDriverandActionExecutorhad no production impl at all, for years, behinda feature flag CI never enabled.
Worth noting how this was measured, because it nearly went the other way: my first
run reported 0 errors and I was about to record the finding as unreproducible.
The difference was
-- -D warnings. Without it clippy exits 0 and prints warnings;the repo's actual gate uses
-D warnings. A "clean" clippy run that omits the flagthe gate uses is not evidence of anything.
Suggested fix
aprender-test-libwith its features enabled to CI, orthe same five will come back and the next mock-only trait will hide just as
long.
Related: #2473 (what the dark feature hid), #2495, #2496 (same family — targets
and scans that nothing exercises).