Skip to content

fix(ingester): silence unused_async on authenticate without oidc - #563

Merged
jensholdgaard merged 1 commit into
mainfrom
fix-unused-async-no-oidc
Jul 20, 2026
Merged

fix(ingester): silence unused_async on authenticate without oidc#563
jensholdgaard merged 1 commit into
mainfrom
fix-unused-async-no-oidc

Conversation

@jensholdgaard

@jensholdgaard jensholdgaard commented Jul 20, 2026

Copy link
Copy Markdown
Owner

What

AuthResolver::authenticate is pub async whose only .await sits behind #[cfg(feature = "oidc")] — so any per-package clippy run without that feature (e.g. cargo clippy -p ourios-bench pulling the default-feature ingester) dies on clippy::unused_async. The workspace-wide --all-features CI 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-features still 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

  • Chores
    • Improved build-time lint handling for authentication across different configuration options.
    • Preserved consistent authentication behavior regardless of enabled features.

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
@jensholdgaard
jensholdgaard requested a review from Copilot July 20, 2026 05:49
@coderabbitai

coderabbitai Bot commented Jul 20, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 646dc2ab-0ab6-4708-9fee-d8856aa50f3c

📥 Commits

Reviewing files that changed from the base of the PR and between 0979d14 and 9cc202b.

📒 Files selected for processing (1)
  • crates/ourios-ingester/src/receiver/auth.rs

📝 Walkthrough

Walkthrough

AuthResolver::authenticate now conditionally suppresses Clippy’s unused_async warning when OIDC is disabled, while comments document its required async signature across feature configurations.

Changes

Authentication lint handling

Layer / File(s) Summary
Conditional async lint suppression
crates/ourios-ingester/src/receiver/auth.rs
AuthResolver::authenticate uses cfg_attr to allow clippy::unused_async without OIDC and documents its async contract.

Estimated code review effort: 1 (Trivial) | ~2 minutes

Possibly related PRs

  • jensholdgaard/ourios#424: Introduced the async OIDC-capable AuthResolver authentication flow that this lint adjustment supports.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the lint-only ingester change and stays concise.
Description check ✅ Passed The description covers the summary, related lint issue, and verification, though it doesn't follow the template headings exactly.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix-unused-async-no-oidc

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_attr to allow clippy::unused_async only when oidc is not enabled.
  • Documents why the lint allow is necessary (the only .await is behind #[cfg(feature = "oidc")] but callers must still await).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jensholdgaard
jensholdgaard merged commit 50339e9 into main Jul 20, 2026
27 checks passed
@jensholdgaard
jensholdgaard deleted the fix-unused-async-no-oidc branch July 20, 2026 05:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants