Repository navigation
Unify SDK ingestion upload orchestration - #120
Closed
Stephen Belanger (Qard) wants to merge 1 commit into
Closed
Stephen Belanger (Qard) wants to merge 1 commit into
Stephen Belanger (Qard) wants to merge 1 commit into
Conversation
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.
Queued logging and the standalone uploader previously owned separate capability discovery, direct uploads, overflow protocols, error classification, and retry loops. Route both through one SDK upload coordinator using the direct API's one-attempt logs3 methods and a separate signed-object transport. The standalone uploader is now a compatibility adapter.
The coordinator composes the shared encoder/planner and retry executor. Successful overflow grants and object uploads survive later-stage retries. A 413 replans instead of consuming retries on the same body. Braintrust credentials remain scoped to API requests, including the overflow grant; signed uploads receive only grant headers and fields. SDK transports reject redirects so requests cannot silently add attempts.
Existing queue and standalone delay schedules remain caller policy. Retry allowance is now shared across stages and replanned splits of each encoded batch instead of resetting per stage. Permanent errors terminate immediately. Failed-payload diagnostics occur only on terminal failure, after replanning has had a chance to succeed. Partial server effects remain possible when a logical upload fails; this does not introduce rollback or historical failure retention. Admission/completion tracking follows in the next layer.
Validation: 236 unit/integration tests and 7 doctests passed, with existing ignores unchanged. Strict clippy, rustdoc, formatting, and diff checks passed. New tests cover shared retry budgets and delay progression, stage reuse for both caller policies, permanent failures at each overflow stage, credential isolation, multipart boundaries and grant headers, request accounting, and redirect rejection. Existing direct API, HTTP flow, custom-CA, and uploader tests pass.
Stacked above #119. Planning documents remain outside version control.