Skip to content

test(rustls): cover default-provider mTLS config builders#712

Merged
EffortlessSteven merged 1 commit into
mainfrom
claude/coverage-rustls-Xmgd3
May 16, 2026
Merged

test(rustls): cover default-provider mTLS config builders#712
EffortlessSteven merged 1 commit into
mainfrom
claude/coverage-rustls-Xmgd3

Conversation

@EffortlessSteven

Copy link
Copy Markdown
Member

Summary

Tests-only PR closing a coverage gap in crates/uselesskey-rustls/src/config.rs. The non-mTLS default-provider builders (server_config_rustls, client_config_rustls) were already inline-tested, but the default-provider mTLS variants on X509Chain had no direct inline coverage — they were only exercised indirectly through workspace-level integration tests.

The four public-config-method punchlist items from the task brief (X509Chain/X509Cert server_config_rustls/client_config_rustls) turned out to already have inline tests on origin/main, so this PR pivots to the genuinely-uncovered surface: RustlsMtlsExt::{server_config_mtls_rustls, client_config_mtls_rustls} for X509Chain.

  • server_config_mtls_from_chain_default_provider — builds the default-provider mTLS ServerConfig and sanity-checks a known default.
  • client_config_mtls_from_chain_default_provider — builds the default-provider mTLS ClientConfig and sanity-checks a known default.
  • mtls_default_provider_pair_completes_handshake — drives a full mTLS handshake between a default-provider server and client to lock in interop without an explicit CryptoProvider argument.

All three new tests use uselesskey-test-support's TestResult / ensure! / require_ok helpers and return TestResult<()>, so they add zero panic-family debt (cargo xtask check-no-panic-family reports 0 new-debt). uselesskey-test-support was added to dev-dependencies.

Test plan

  • cargo test -p uselesskey-rustls --all-features (24 lib tests pass; previously 21 with --all-features)
  • cargo clippy -p uselesskey-rustls --all-targets --all-features -- -D warnings clean
  • cargo fmt -p uselesskey-rustls clean
  • cargo xtask check-no-panic-family0 new-debt
  • CI green on PR

https://claude.ai/code/session_TODO


Generated by Claude Code

- Add inline tests pinning X509Chain::server_config_mtls_rustls() and
  X509Chain::client_config_mtls_rustls() — the default-provider mTLS
  variants were previously only exercised through cross-crate
  integration tests.
- Add a default-provider mTLS handshake roundtrip to lock in that a
  pair of default-provider mTLS configs interoperate without an
  explicit CryptoProvider argument.
- Use uselesskey-test-support TestResult/ensure!/require_ok helpers so
  the new tests add zero panic-family debt (verified via
  `cargo xtask check-no-panic-family`: 0 new-debt).
- Add uselesskey-test-support to dev-dependencies.

https://claude.ai/code/session_TODO

Co-authored-by: Claude <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@coderabbitai

coderabbitai Bot commented May 16, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@EffortlessSteven has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 23 minutes and 58 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 80e5311b-8f1e-48b3-8fa0-47018df55ecd

📥 Commits

Reviewing files that changed from the base of the PR and between 5be9464 and 603d6ae.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • crates/uselesskey-rustls/Cargo.toml
  • crates/uselesskey-rustls/src/config.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/coverage-rustls-Xmgd3

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 and usage tips.

@EffortlessSteven EffortlessSteven marked this pull request as ready for review May 16, 2026 07:48
@EffortlessSteven EffortlessSteven merged commit c183a5c into main May 16, 2026
6 checks passed
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

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