Skip to content

Unify SDK ingestion upload orchestration - #120

Closed
Stephen Belanger (Qard) wants to merge 1 commit into
refactor/upload-planningfrom
refactor/upload-coordinator
Closed

Stephen Belanger (Qard) wants to merge 1 commit into
refactor/upload-planningfrom
refactor/upload-coordinator

Conversation

@Qard

Copy link
Copy Markdown
Contributor

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.

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