feat(consensus): add session registration protocol with combined login+register#3108
Merged
numinnex merged 12 commits intoapache:masterfrom Apr 17, 2026
Merged
feat(consensus): add session registration protocol with combined login+register#3108numinnex merged 12 commits intoapache:masterfrom
numinnex merged 12 commits intoapache:masterfrom
Conversation
login+register command
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #3108 +/- ##
============================================
+ Coverage 72.62% 73.13% +0.51%
Complexity 943 943
============================================
Files 1117 1123 +6
Lines 96380 97892 +1512
Branches 73555 75082 +1527
============================================
+ Hits 69997 71595 +1598
+ Misses 23831 23682 -149
- Partials 2552 2615 +63
🚀 New features to boost your workflow:
|
Contributor
|
I've looked through this PR and I wonder how does it differ from the login and login with personal access token ? |
Contributor
Author
|
@numinnex I've only implemented login functionality with register but didn't implement login with personal access token. But its easily implementable because register doesn't care about how we logged in. |
atharvalade
suggested changes
Apr 14, 2026
numinnex
approved these changes
Apr 17, 2026
spetz
approved these changes
Apr 17, 2026
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
Operation::Registeras a VSR-level operation that goes through consensus to create durable client sessions, giving each client a deterministic session number (= commit op number) agreed upon by all replicas.sessionfield toRequestHeaderwith wire-layer validation: register requiressession=0, request=0; all other operations requiresession>0, request>0.ClientTableinto session-aware paths:check_register()/commit_register()for registration, andcheck_request()/commit_reply()with session + strict request monotonicity validation (NoSession,SessionMismatch, `RequestGap).ConsensusSession(SDK) for client-side session lifecycle andSessionManager(server-ng) for transport-to-consensus bridging.login_registerhandler: phase 1 verifies credentials locally, phase 2 submits register through consensus.RequestFrame2/ResponseFrame2withrequest_idfor request-response correlation and pipelining support.