Skip to content

feat(sdk): implement vsr header framing#3254

Open
numinnex wants to merge 15 commits into
masterfrom
integration_tests
Open

feat(sdk): implement vsr header framing#3254
numinnex wants to merge 15 commits into
masterfrom
integration_tests

Conversation

@numinnex
Copy link
Copy Markdown
Contributor

Adds Vsr feature flag in the sdk crate that introduces the consensus header required by the requests.
Additionally adds one hello_world test that tests the login command using the new integration test suite adapted to server-ng binary.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 14, 2026

Codecov Report

❌ Patch coverage is 24.04810% with 379 lines in your changes missing coverage. Please review.
✅ Project coverage is 70.93%. Comparing base (b03978e) to head (a2dac46).
⚠️ Report is 4 commits behind head on master.

Files with missing lines Patch % Lines
core/server-ng/src/bootstrap.rs 0.00% 298 Missing ⚠️
core/metadata/src/stm/user.rs 0.00% 32 Missing ⚠️
core/sdk/src/tcp/tcp_client.rs 60.00% 5 Missing and 3 partials ⚠️
core/metadata/src/impls/metadata.rs 0.00% 7 Missing ⚠️
core/server-ng/src/session_manager.rs 53.33% 7 Missing ⚠️
core/message_bus/src/client_listener/quic.rs 66.66% 0 Missing and 6 partials ⚠️
core/message_bus/src/socket_opts.rs 81.25% 0 Missing and 6 partials ⚠️
core/message_bus/src/replica/io.rs 0.00% 0 Missing and 5 partials ⚠️
core/sdk/src/websocket/websocket_client.rs 88.57% 2 Missing and 2 partials ⚠️
core/sdk/src/quic/quic_client.rs 86.95% 1 Missing and 2 partials ⚠️
... and 1 more

❌ Your patch check has failed because the patch coverage (24.04%) is below the target coverage (50.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3254      +/-   ##
============================================
- Coverage     73.80%   70.93%   -2.88%     
  Complexity      943      943              
============================================
  Files          1200     1200              
  Lines        109116   104565    -4551     
  Branches      86006    81472    -4534     
============================================
- Hits          80535    74175    -6360     
- Misses        25853    27458    +1605     
- Partials       2728     2932     +204     
Components Coverage Δ
Rust Core 71.31% <24.04%> (-3.64%) ⬇️
Java SDK 58.44% <ø> (ø)
C# SDK 69.18% <ø> (-0.26%) ⬇️
Python SDK 81.43% <ø> (ø)
Node SDK 91.41% <ø> (-0.13%) ⬇️
Go SDK 39.91% <ø> (ø)
Files with missing lines Coverage Δ
.../src/traits/binary_impls/personal_access_tokens.rs 100.00% <ø> (ø)
core/common/src/traits/binary_impls/users.rs 100.00% <ø> (ø)
core/message_bus/src/client_listener/tcp.rs 78.26% <100.00%> (-1.74%) ⬇️
core/message_bus/src/client_listener/tcp_tls.rs 83.78% <100.00%> (-0.84%) ⬇️
core/message_bus/src/client_listener/ws.rs 79.16% <100.00%> (-1.61%) ⬇️
core/message_bus/src/client_listener/wss.rs 83.78% <100.00%> (-0.84%) ⬇️
core/message_bus/src/replica/listener.rs 84.41% <100.00%> (-0.40%) ⬇️
core/message_bus/src/transports/quic.rs 91.76% <100.00%> (-0.25%) ⬇️
core/server-ng/src/server_error.rs 0.00% <ø> (ø)
core/sdk/src/quic/quic_client.rs 73.07% <86.95%> (+0.12%) ⬆️
... and 10 more

... and 113 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hubcio
Copy link
Copy Markdown
Contributor

hubcio commented May 14, 2026

/ready

@github-actions github-actions Bot added the S-waiting-on-review PR is waiting on a reviewer label May 14, 2026
Copy link
Copy Markdown
Contributor

@hubcio hubcio left a comment

Choose a reason for hiding this comment

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

notes on items that did not fit a line range:

  • the IggyNamespace::new masking issue (namespace.rs:108-113) is upstream and not touched by this PR, but the SDK now feeds raw wire u32s straight into it (vsr.rs:187), so the silent-collision blast radius lands inside this PR. would be good to range-check at the SDK boundary even if the namespace fix lands separately.
  • send_raw_with_response retry at tcp_client.rs:136-148 is pre-existing, but the new reset_vsr_session() calls at lines 548/567 turn the retry path into a silent recovery failure when auto_login=Disabled: reset clears the bound session, connect() skips re-login, next send_raw encodes with session=None and returns Unauthenticated for what looks like a transient transport error. consider gating retry on session.is_bound() under vsr, or forcing auto_login on under vsr.
  • #[cfg(feature = "vsr")] is interleaved per-line across core/sdk/src/{tcp,quic,websocket}/*.rs (8 separate gates in tcp_client.rs alone). consider extracting send_legacy / send_vsr helpers per transport, or splitting the vsr framing into its own module, to reduce mis-edit hazard.

Comment thread core/sdk/src/vsr.rs Outdated
Comment thread core/sdk/src/vsr.rs Outdated
Comment thread core/sdk/src/vsr.rs
Comment thread core/sdk/src/vsr.rs Outdated
Comment thread core/sdk/src/vsr.rs
Comment thread core/server-ng/src/session_manager.rs Outdated
Comment thread core/server-ng/src/session_manager.rs
Comment thread core/server-ng/src/server_error.rs
Comment thread core/message_bus/src/socket_opts.rs
Comment thread core/integration-vsr/src/lib.rs Outdated
@github-actions github-actions Bot added S-waiting-on-author PR is waiting on author response and removed S-waiting-on-review PR is waiting on a reviewer labels May 20, 2026
@numinnex
Copy link
Copy Markdown
Contributor Author

@hubcio made a commit that addresses issues from those comments

@numinnex
Copy link
Copy Markdown
Contributor Author

/review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author PR is waiting on author response

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants