fix(ingester): silence unused_async on authenticate without oidc - #563
Conversation
The only .await is oidc-gated; the async signature is the cross-feature API. Per-package clippy without the feature tripped on it (#558 review noted it twice). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthrough
ChangesAuthentication lint handling
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Pull request overview
This PR fixes a latent clippy::unused_async lint in the ingester when the oidc feature is disabled, while preserving the required async API shape for callers across feature configurations.
Changes:
- Adds a targeted
cfg_attrto allowclippy::unused_asynconly whenoidcis not enabled. - Documents why the lint allow is necessary (the only
.awaitis behind#[cfg(feature = "oidc")]but callers must stillawait).
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
What
AuthResolver::authenticateispub asyncwhose only.awaitsits behind#[cfg(feature = "oidc")]— so any per-package clippy run without that feature (e.g.cargo clippy -p ourios-benchpulling the default-feature ingester) dies onclippy::unused_async. The workspace-wide--all-featuresCI gate masks it, which is why it's latent. Surfaced twice during the #558 review rounds.Fix:
#[cfg_attr(not(feature = "oidc"), allow(clippy::unused_async))]with the why-comment (§6.1 allow-in-crate rule). The signature must stay async across feature configs — callers await it either way.Verified:
cargo clippy -p ourios-ingester --all-targets -- -D warnings(the failing shape) now clean;--all-featuresstill clean; fmt clean. Lint-only — no behavior change, no test obligation.Invariants / hazards
None — attribute + comment only.
🤖 Generated with Claude Code
https://claude.ai/code/session_01WQY9wfrfRggqSpMLH8Xj3Y
Summary by CodeRabbit