Add Rust session store identity support - #2547
Open
gimenete wants to merge 2 commits into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new public struct needs non-exhaustive construction to preserve future API compatibility.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Review tier: Balanced
Findings: 1
New issues introduced by this change (1)
| Severity | Finding |
|---|---|
rust/src/types.rs — This new public struct can be constructed with a literal, so adding any protocol field later would… |
What changed in this PR
Adds Rust SDK support for account-scoped session-store identities.
Changes:
- Adds the public identity type and create/resume configuration.
- Implements the set/clear JSON-RPC API.
- Tests serialization and wire requests.
| File | Description |
|---|---|
rust/src/types.rs |
Defines identity and configuration support. |
rust/src/wire.rs |
Serializes identity into create/resume payloads. |
rust/src/lib.rs |
Adds the client identity setter. |
rust/tests/session_test.rs |
Verifies set and clear requests. |
💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
SessionStoreIdentitywith canonicalauthorityandaccount_idfieldssessionStoreIdentitypayloads on session create and resumeClient::set_session_store_identityfor the server-scopedsessionStore.setIdentityset/clear contractValidation
cargo +nightly-2026-04-14 fmt --checkcargo test --lib session_store_identitycargo test --features test-support --test session_test set_session_store_identitycargo clippy --all-features --all-targets -- -D warnings