Skip to content

Draft: proper floating up of version#1081

Draft
stephen-derosa wants to merge 2 commits into
mainfrom
sderosa/BOT-348-ffi-lib-reporting
Draft

Draft: proper floating up of version#1081
stephen-derosa wants to merge 2 commits into
mainfrom
sderosa/BOT-348-ffi-lib-reporting

Conversation

@stephen-derosa
Copy link
Copy Markdown
Contributor

PR description

Report the corect client fclient_info_sdk_for_name

Breaking changes

I dont believe there are breaking changes

Testing

Unit tests inline

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

Changeset

The following package versions will be affected by this PR:

Package Bump
livekit patch
livekit-api patch
livekit-ffi patch

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

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 updates the signal client’s v1 join-request generation to report the correct SDK identity (and version) in ClientInfo, rather than always reporting Rust, which improves cross-language wrapper attribution while keeping the existing v0 query-param behavior intact.

Changes:

  • Added client_info_sdk_for_name() to map SDK name strings (e.g., "cpp", "C++", "react-native") into proto::client_info::Sdk.
  • Updated v1 JoinRequest construction to set client_info.sdk based on SignalOptions.sdk_options.sdk.
  • Added unit tests covering SDK-name mapping and verifying SDK/version reporting for both v0 URL params and v1 join_request payload.

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

"node" => proto::client_info::Sdk::Node,
"unreal" => proto::client_info::Sdk::Unreal,
"esp32" => proto::client_info::Sdk::Esp32,
_ => proto::client_info::Sdk::Unknown,
Copy link
Copy Markdown
Contributor

@ladvoc ladvoc May 11, 2026

Choose a reason for hiding this comment

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

suggestion: It might be a good idea to log a warning on _ => for visibility.

"flutter" => proto::client_info::Sdk::Flutter,
"go" => proto::client_info::Sdk::Go,
"unity" => proto::client_info::Sdk::Unity,
"react_native" | "react-native" | "reactnative" => proto::client_info::Sdk::ReactNative,
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.

suggestion: I would just match against the "canonical" string the SFU checks for when this is provided via URL parameter (for non-single peer connection).

Copy link
Copy Markdown
Contributor

@xianshijing-lk xianshijing-lk left a comment

Choose a reason for hiding this comment

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

some comments, lgtm after addressing them

---
livekit-api: patch
livekit: patch
livekit-ffi: patch
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.

I only see changes touching the livekit-api, but not other two crates

"node" => proto::client_info::Sdk::Node,
"unreal" => proto::client_info::Sdk::Unreal,
"esp32" => proto::client_info::Sdk::Esp32,
_ => proto::client_info::Sdk::Unknown,
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.

how about C# ? do we have something like proto::client_info::Sdk::CSharp ?

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.

Currently that is covered by proto::client_info::Sdk::Unity.

options
}

fn decode_join_request_param(param: &str) -> proto::JoinRequest {
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.

is this function used by test only ? any way to be more explicit if that is the case ?

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.

4 participants