Skip to content

ref(service): Standardize backend session token codecs - #616

Open
lcian wants to merge 1 commit into
ref/generalize-encryption-cipherfrom
ref/standardize-session-token-codecs
Open

ref(service): Standardize backend session token codecs#616
lcian wants to merge 1 commit into
ref/generalize-encryption-cipherfrom
ref/standardize-session-token-codecs

Conversation

@lcian

@lcian lcian commented Sep 8, 2026

Copy link
Copy Markdown
Member

Backends can now define a sized session-token representation and centralize its codec while the
object-safe resumable API continues passing an opaque BackendToken. GCS owns the first typed
implementation and decodes tokens at each resumable operation boundary; decorators and backends
without resumable support continue forwarding or rejecting opaque tokens as before.

BackendToken is now a serde-transparent newtype, so its JSON representation, encrypted session
envelope, and GCS total_length.session_uri encoding remain wire-compatible. This PR is stacked on
#615, which provides the generalized encryption boundary used by these tokens.

A disadvantage of this approach is that the backend-specific types need to become pub, as they become part of the Backend API which is pub itself.

Give concrete backends typed session-token codecs while keeping resumable methods object-safe and preserving the opaque wire format.
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 68.42105% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.15%. Comparing base (28141dd) to head (99c42b0).

Files with missing lines Patch % Lines
objectstore-service/src/backend/common.rs 0.00% 12 Missing ⚠️
Additional details and impacted files
@@                         Coverage Diff                          @@
##           ref/generalize-encryption-cipher     #616      +/-   ##
====================================================================
- Coverage                             89.20%   89.15%   -0.06%     
====================================================================
  Files                                   110      110              
  Lines                                 19036    19057      +21     
====================================================================
+ Hits                                  16981    16990       +9     
- Misses                                 2055     2067      +12     
Components Coverage Δ
Rust Backend 92.84% <68.42%> (-0.08%) ⬇️
Rust Client 81.97% <ø> (ø)
Python Client 93.56% <ø> (ø)

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lcian

lcian commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

bugbot run
@sentry review

@lcian

lcian commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

I'm not sure if this change is beneficial, wdyt @jan-auer?

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 99c42b0. Configure here.

@lcian
lcian marked this pull request as ready for review September 8, 2026 15:26
@lcian
lcian requested a review from a team as a code owner September 8, 2026 15:26
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.

1 participant