Complete artifact binary transfer streaming

This commit is contained in:
npc0-hue
2026-09-03 13:27:22 +08:00
parent fe09d21a56
commit ec2462a312
8 changed files with 178 additions and 35 deletions
@@ -33,7 +33,7 @@ func TestRunChannelAPIInterleavedRequestsMutateIndependentState(t *testing.T) {
openRecorder := performJSON(t, router, http.MethodPost, "/api/v1/run/artifacts/open", artifactOpenForChannelIsolation(hello.SessionToken, payload, 8))
assertStatus(t, openRecorder, http.StatusOK)
open := decodeBody[dto.ArtifactTransferOpenResponse](t, openRecorder)
firstChunkRecorder := performJSON(t, router, http.MethodPost, "/api/v1/run/artifacts/chunks", artifactChunkForChannelIsolation(hello.SessionToken, open.TransferID, payload, 0, 8))
firstChunkRecorder := performArtifactChunkUpload(t, router, artifactChunkForChannelIsolation(hello.SessionToken, open.TransferID, payload, 0, 8))
assertStatus(t, firstChunkRecorder, http.StatusOK)
firstChunk := decodeBody[dto.ArtifactChunkUploadResponse](t, firstChunkRecorder)
if !firstChunk.Accepted || firstChunk.NextMissingChunkIndex != 1 {