Repository navigation
feat: [SDK-5502] send sessions API requests on their own queue - #2786
Closed
fadi-george wants to merge 3 commits into
Closed
fadi-george wants to merge 3 commits into
fadi-george wants to merge 3 commits into
Conversation
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Session create and end requests go through a small persisted queue outside OperationRepo, so a sessions outage never delays user or subscription operations. One record per session holds the create and the latest unsent update, with idempotency keys reused on retry, backoff with jitter, Retry-After, an attempt cap, and retry on foreground and network return. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
📊 Diff Coverage ReportDiff Coverage Report (Changed Lines Only)Gate: aggregate coverage on changed executable lines must be ≥ 80% (JaCoCo line data for lines touched in the diff). Changed Files Coverage
Overall (aggregate gate)311/320 touched executable lines covered (97.2% — requires ≥ 80%) |
Contributor
Author
|
Closing in favor of fixing OperationRepo retry for all ops (SDK-5535). |
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.
Description
One Line Summary
Experiment: send sessions API requests on their own small queue instead of through
OperationRepo.Details
Motivation
Compare against the #2777 / #2780 / #2781 stack. A failing sessions request in
OperationRepoblocks user and subscription operations, and the stack needs about 300 lines of sharedOperationRepochanges. This keeps sessions fully separate.Size (excluding #2774 / #2775):
OperationRepochangesScope
Retry-Afteris honored (capped at 1h). A request is dropped after 5 answered failures or a non-retryable 4xx. Network errors don't count.SessionModel.OPTIONAL - Other
new-session-events.new-session-eventsfor the flag, so this can't merge until that is on KMP main.direct_attribution_id, periodic duration updates.Testing
Unit testing
SessionsApiQueueTests: merging, retries and keys, drop rules, backoff sequence,Retry-After, cap, local ID handling.SessionServiceTests: create, background end + flush, end time after kill, flag off, cold start ordering.assembleReleasepass.Manual testing
Not tested on a device yet.
Affected code checklist
Checklist
Overview
Testing
Final pass
🤖 Generated with Claude Code