Skip to content

fix(moq-native): keep has_peer_certificate as deprecated, release 0.17.3#1790

Merged
kixelated merged 1 commit into
mainfrom
claude/hungry-davinci-677906
Jun 19, 2026
Merged

fix(moq-native): keep has_peer_certificate as deprecated, release 0.17.3#1790
kixelated merged 1 commit into
mainfrom
claude/hungry-davinci-677906

Conversation

@kixelated

Copy link
Copy Markdown
Collaborator

Summary

#1789 renamed Request::has_peer_certificate to peer_identity (returning Option<PeerIdentity> instead of bool). cargo-semver-checks flagged the rename as a breaking change, so release-plz proposed bumping moq-native to 0.18.0 in the release PR #1774.

That bump is heavier than it needs to be, and a plain rename is also a compatibility hazard: moq-relay (and other in-tree crates) depend on moq-native via a caret "0.17" range. An older moq-relay that still calls has_peer_certificate would resolve forward to a freshly published 0.17.x and fail to compile if the method were gone. So restoring the method is what makes a patch release legitimate.

This PR:

  • Re-adds Request::has_peer_certificate(&self) -> bool as a #[deprecated(note = "use peer_identity instead")] shim that delegates to self.peer_identity().is_some(), preserving the original behavior and API surface.
  • Bumps moq-native 0.17.2 -> 0.17.3 (+ matching Cargo.lock).

With the method restored, cargo-semver-checks no longer sees a breaking change, so this ships as a clean 0.17.3 patch. Once merged, release-plz will regenerate #1774 with 0.17.3 instead of 0.18.0.

Nothing outside the repo consumes this API (no external consumers yet), and the only in-tree caller, moq-relay, already migrated to peer_identity(), so it won't trigger the deprecation warning.

Test plan

  • cargo check -p moq-native passes
  • Repo-wide grep confirms no remaining has_peer_certificate callers in-tree (shim is purely for external/older pins)

(Written by Claude)

#1789 renamed Request::has_peer_certificate to peer_identity, which
cargo-semver-checks flagged as a breaking change and bumped moq-native
to 0.18.0. Nothing outside the repo consumes it, and the only in-tree
caller (moq-relay) already migrated, but moq-relay pins moq-native via a
caret "0.17" range. An older moq-relay would resolve forward to a fresh
0.17.x and fail to compile if the method were gone, so a patch release
must keep it.

Re-add has_peer_certificate as a #[deprecated] shim delegating to
peer_identity().is_some(), which restores API compatibility and lets
this ship as a 0.17.3 patch instead of 0.18.0.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9f3e6c99-735c-4738-a961-55206a0b6881

📥 Commits

Reviewing files that changed from the base of the PR and between ff6d554 and b065a46.

⛔ Files ignored due to path filters (1)
  • Cargo.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • rs/moq-native/Cargo.toml
  • rs/moq-native/src/server.rs

Walkthrough

A deprecated convenience method has_peer_certificate(&self) -> bool is added to the Request struct in rs/moq-native/src/server.rs. The method returns whether peer_identity() yields Some, indicating that the peer presented a valid client certificate during the TLS handshake. The crate version in rs/moq-native/Cargo.toml is bumped from 0.17.2 to 0.17.3.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: restoring the deprecated has_peer_certificate method and releasing version 0.17.3.
Description check ✅ Passed The description is comprehensive and directly related to the changeset, explaining the rationale for re-adding the deprecated method and the version bump.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch claude/hungry-davinci-677906

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.

@kixelated kixelated merged commit 2caa732 into main Jun 19, 2026
1 check passed
@kixelated kixelated deleted the claude/hungry-davinci-677906 branch June 19, 2026 05:22
@moq-bot moq-bot Bot mentioned this pull request Jun 19, 2026
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.

1 participant