Repository navigation
fix(database): the database crate compiles and tests on its own, and lint checks every crate alone - #347
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 15 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Its own tests called a helper gated only on its `test-util` feature, so `cargo clippy -p piquel-repository --all-targets` failed to compile. The workspace build hid it because auth-service's dev-dependency enables `test-util` and Cargo unifies features. Every `test-util` gate in the crate now reads `any(test, feature = "test-util")`, like piquel-auth and piquel-telemetry, and `just rust lint` also lints each crate alone, so CI catches this class of bug.
PiquelChips
force-pushed
the
fix/crate-test-util-gating
branch
from
November 4, 2026 15:09
25a82c9 to
3cf0497
Compare
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.
piquel-repositorydidn't compile on its own:cargo clippy -p piquel-repository --all-targetsandcargo test -p piquel-repositoryboth failed.The crate's own OIDC test calls
EventRepository::history_for_client, which was gated only onfeature = "test-util". The crate'scfg(test)build doesn't turn that feature on. Workspace builds hid the problem becauseauth-servicedev-depends on the crate withtest-util, and Cargo unifies features.Fix: every
test-utilgate in the database crate now uses#[cfg(any(test, feature = "test-util"))], which is whatpiquel-authandpiquel-telemetryalready do. Converting all 13 gates, not just the broken one, means the next helper a test reaches for can't break the build the same way. No other crate had the problem: I ran clippy-p <crate> --all-targetson each of the 8 members and only this one failed.CI:
just rust lintstill runs the workspace pass, then also lints each crate alone with--manifest-path. This needs no workflow change because CI already runsjust rust lint. It's cheap: about 30s extra on a warm cache, and only the workspace crates get rechecked. The workspace pass still matters because it is the only one that lints a crate's library with features its dependents enable.Proof
Before, with only the
history_for_clientgate reverted:After:
just rust lintexits 0. So docargo clippy --locked -p piquel-repository --all-targets -- -D warnings, the same command without--all-targets, and the same command with--features test-util.just db scratch cargo nextest run --locked -p piquel-repository --run-ignored allruns the crate's tests withoutauth-servicein the build: 70/70 pass.Reviewed with review-loop: 1 round with 2× GPT 6.1 Sol and Claude Opus 5.5. Verdict: approved
Note
Written by Claude Opus 5.5 in Claude Code and reviewed by GPT 6.1 Sol and Claude Opus 5.5 (via T3 Code)
🤖 Generated with Claude Code