Repository navigation
Refactor API client session handling - #63
Draft
Stephen Belanger (Qard) wants to merge 1 commit into
Draft
Stephen Belanger (Qard) wants to merge 1 commit into
Stephen Belanger (Qard) wants to merge 1 commit into
Conversation
Stephen Belanger (Qard)
force-pushed
the
api-client
branch
2 times, most recently
from
June 4, 2026 17:50
00d48f5 to
7b8553b
Compare
Stephen Belanger (Qard)
force-pushed
the
api-client
branch
8 times, most recently
from
June 11, 2026 16:36
c609bb4 to
f447823
Compare
Stephen Belanger (Qard)
force-pushed
the
api-client
branch
from
June 11, 2026 17:17
f447823 to
f9214ce
Compare
Stephen Belanger (Qard)
force-pushed
the
api-client
branch
from
July 13, 2026 15:58
38d6f99 to
f9214ce
Compare
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
Refactor the SDK API layer so login/session state, config defaults, HTTP client construction, request execution, and authenticated endpoint serialization live under
src/api.What changed
ApiClientconstruction fromLoginStateand moved login/session management into the API module.src/api, removing the old top-level config/transport exposure.LogQueueto acceptLoginState, lazily wait for login, and create itsApiClientonly when processing begins so events can be queued before login completes.Why
The HTTP layer should be isolated behind simple API contracts. Higher-level SDK components should not need to know about
reqwest, raw credentials, login notification plumbing, or endpoint base URL routing.Impact
This preserves queue-before-login behavior while reducing credential and HTTP client plumbing across logger, queue, logs3, dataset, span, and experiment flows.
Validation
cargo fmt --checkcargo check --all-targetscargo test --all-targetsRUSTDOCFLAGS='-D warnings' cargo doc --no-deps