Skip to content

Conversation

@paul-fresquet
Copy link
Contributor

Summary

  • ensure trust checks validate joiners against the session protocol version
  • persist the session protocol version from the creator at session creation
  • adjust server-side trust check tests for peer-based compatibility

Main modifications

  • add protocol version on cloud session data and initialize it from the creator
  • change StartTrustCheck to compare joiner version with session version (fallback to creator when missing)
  • update unit tests covering protocol-version compatibility scenarios

Implementation approach

  • store protocol version on the session to represent the creator's protocol
  • use this value as the server-side compatibility gate instead of ProtocolVersion.IsCompatible

Copy link
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 refactors the trust check mechanism to validate joiners against the session protocol version instead of using a generic compatibility check. The session protocol version is now persisted from the creator at session creation time, providing a consistent baseline for compatibility validation.

  • Added a ProtocolVersion property to CloudSessionData to store the session's protocol version
  • Modified trust check logic to compare joiner protocol version against the session protocol version (with fallback to creator member's version)
  • Updated unit tests to reflect the new protocol version matching behavior

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
CloudSessionData.cs Adds ProtocolVersion property to store session's protocol version
CreateSessionCommandHandler.cs Initializes session protocol version from creator's public key info during session creation
StartTrustCheckCommandHandler.cs Changes trust check to compare joiner version with session version instead of using ProtocolVersion.IsCompatible
StartTrustCheckCommandHandlerTests.cs Updates tests to set session protocol version and validates new comparison logic
CreateSessionCommandHandlerTests.cs Adds assertion to verify protocol version is properly initialized during session creation

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

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jan 5, 2026

Copy link
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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.


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

@paul-fresquet paul-fresquet merged commit b65a12d into master Jan 5, 2026
31 checks passed
@paul-fresquet paul-fresquet deleted the feature/improve-protocol-version-management branch January 5, 2026 14:15
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