CI linted only non-test code, and compliance-core not at all: clippy -p compliance-agent doesn't lint its dependencies. Test code therefore collected lint errors unnoticed: 142 in the agent, 17 in core, 18 in control-map, and hundreds in the dashboard's test builds. compliance-core/tests/models.rs did not even compile. It still used TrackedRepository, a type that no longer exists, and CI never ran it.
Changes
clippy.toml:allow-unwrap-in-tests and allow-expect-in-tests. A panic is how a test fails. Production code keeps the workspace-wide deny on unwrap_used / expect_used.
Test crates (tests/*.rs, tests/common, tests/e2e.rs) get the file-level allow the other test files already have.
Remaining lint fixes:
explicit lifetimes elided in test helpers;
two test modules moved to the end of their files (scheduler.rs, models/scan.rs);
.err().expect() replaced by a let … else;
clippy --fix removed needless borrows in the e2e tests;
the embedding batch-size test is now a compile-time check next to the constant (const _: () = assert!(EMBED_BATCH_SIZE <= 25)).
compliance-core/tests/models.rs: the TrackedRepository test is removed (the type is gone). The other 42 tests run again.
CI (.gitea/workflows/ci.yml):
every clippy step uses --all-targets;
a new "Clippy (core)" step;
a new "Tests (core integration)" step, cargo test -p compliance-core --tests, which needs no services.
Checked
cargo clippy --all-targets -- -D warnings is clean for core, agent, mcp, werkbank-exec, control-map and the dashboard (server, web).
Closes #379.
CI linted only non-test code, and `compliance-core` not at all: `clippy -p compliance-agent` doesn't lint its dependencies. Test code therefore collected lint errors unnoticed: 142 in the agent, 17 in core, 18 in control-map, and hundreds in the dashboard's test builds. `compliance-core/tests/models.rs` did not even compile. It still used `TrackedRepository`, a type that no longer exists, and CI never ran it.
## Changes
- **`clippy.toml`:** `allow-unwrap-in-tests` and `allow-expect-in-tests`. A panic is how a test fails. Production code keeps the workspace-wide deny on `unwrap_used` / `expect_used`.
- **Test crates** (`tests/*.rs`, `tests/common`, `tests/e2e.rs`) get the file-level allow the other test files already have.
- **Remaining lint fixes:**
- explicit lifetimes elided in test helpers;
- two test modules moved to the end of their files (`scheduler.rs`, `models/scan.rs`);
- `.err().expect()` replaced by a `let … else`;
- `clippy --fix` removed needless borrows in the e2e tests;
- the embedding batch-size test is now a compile-time check next to the constant (`const _: () = assert!(EMBED_BATCH_SIZE <= 25)`).
- **`compliance-core/tests/models.rs`:** the `TrackedRepository` test is removed (the type is gone). The other 42 tests run again.
- **CI (`.gitea/workflows/ci.yml`):**
- every clippy step uses `--all-targets`;
- a new "Clippy (core)" step;
- a new "Tests (core integration)" step, `cargo test -p compliance-core --tests`, which needs no services.
## Checked
- `cargo clippy --all-targets -- -D warnings` is clean for core, agent, mcp, werkbank-exec, control-map and the dashboard (`server`, `web`).
- Tests: agent 447, core 99 + 42 integration, control-map 12, dashboard 52 / 36.
- `ci.yml` parses.
Test code from PRs merged after this one is linted too, so a later rebase may surface a lint or two.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Test code was never linted and compliance-core not at all; its
integration tests did not compile (TrackedRepository no longer
exists). Tests may now unwrap (clippy.toml), the remaining lints are
fixed, CI runs clippy with --all-targets on every crate including
core, and core's integration tests run.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #379.
CI linted only non-test code, and
compliance-corenot at all:clippy -p compliance-agentdoesn't lint its dependencies. Test code therefore collected lint errors unnoticed: 142 in the agent, 17 in core, 18 in control-map, and hundreds in the dashboard's test builds.compliance-core/tests/models.rsdid not even compile. It still usedTrackedRepository, a type that no longer exists, and CI never ran it.Changes
clippy.toml:allow-unwrap-in-testsandallow-expect-in-tests. A panic is how a test fails. Production code keeps the workspace-wide deny onunwrap_used/expect_used.tests/*.rs,tests/common,tests/e2e.rs) get the file-level allow the other test files already have.scheduler.rs,models/scan.rs);.err().expect()replaced by alet … else;clippy --fixremoved needless borrows in the e2e tests;const _: () = assert!(EMBED_BATCH_SIZE <= 25)).compliance-core/tests/models.rs: theTrackedRepositorytest is removed (the type is gone). The other 42 tests run again..gitea/workflows/ci.yml):--all-targets;cargo test -p compliance-core --tests, which needs no services.Checked
cargo clippy --all-targets -- -D warningsis clean for core, agent, mcp, werkbank-exec, control-map and the dashboard (server,web).ci.ymlparses.Test code from PRs merged after this one is linted too, so a later rebase may surface a lint or two.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
314d319b99to812ebe3c54