@@ -151,7 +151,7 @@ func newJobCreateCommand() *cobra.Command {
151151
152152 if localInputCount > 0 {
153153 fmt .Println ("| Step 2: Uploading input data..." )
154- for name , input := range jobDef .Inputs {
154+ for inputName , input := range jobDef .Inputs {
155155 if input .Path == "" || ! service .IsLocalPath (input .Path ) {
156156 continue
157157 }
@@ -162,35 +162,35 @@ func newJobCreateCommand() *cobra.Command {
162162 }
163163
164164 // Content-scoped naming: input-{inputName}. Dedupe will be handled by version, name can be same.
165- assetName := fmt .Sprintf ("input-%s" , name )
166- fmt .Printf (" ├─ %s: uploading %s...\n " , name , input .Path )
165+ assetName := fmt .Sprintf ("input-%s" , inputName )
166+ fmt .Printf (" ├─ %s: uploading %s...\n " , inputName , input .Path )
167167
168168 result , err := uploadSvc .UploadDirectory (
169169 ctx , inputPath , assetName ,
170- fmt .Sprintf ("Input %s for project %s" , name , projectName ),
170+ fmt .Sprintf ("Input %s for project %s" , inputName , projectName ),
171171 )
172172 if err != nil {
173- return fmt .Errorf ("failed to upload input %s: %w" , name , err )
173+ return fmt .Errorf ("failed to upload input %s: %w" , inputName , err )
174174 }
175175
176176 // Hash collision fallback: use job-scoped naming without dedup
177177 if result .Collision {
178- fallbackName := fmt .Sprintf ("input-%s-%s" , jobDef .Name , name )
178+ fallbackName := fmt .Sprintf ("input-%s-%s" , jobDef .Name , inputName )
179179 fmt .Printf (" (hash collision on %s, falling back to %s)\n " , assetName , fallbackName )
180180 result , err = uploadSvc .UploadDirectoryNoDedup (
181181 ctx , inputPath , fallbackName , "1" ,
182- fmt .Sprintf ("Input %s for job %s" , name , jobDef .Name ),
182+ fmt .Sprintf ("Input %s for job %s" , inputName , jobDef .Name ),
183183 )
184184 if err != nil {
185- return fmt .Errorf ("failed to upload input %s (fallback): %w" , name , err )
185+ return fmt .Errorf ("failed to upload input %s (fallback): %w" , inputName , err )
186186 }
187187 }
188188
189- resolvedInputs [name ] = result .DatasetResourceID
189+ resolvedInputs [inputName ] = result .DatasetResourceID
190190 if result .Skipped {
191- fmt .Printf (" ✓ %s unchanged, reusing existing upload (version: %s)\n " , name , result .DatasetVersion )
191+ fmt .Printf (" ✓ %s unchanged, reusing existing upload (version: %s)\n " , inputName , result .DatasetVersion )
192192 } else {
193- fmt .Printf (" ✓ %s uploaded (dataset: %s, version: %s)\n " , name , result .DatasetName , result .DatasetVersion )
193+ fmt .Printf (" ✓ %s uploaded (dataset: %s, version: %s)\n " , inputName , result .DatasetName , result .DatasetVersion )
194194 }
195195 }
196196 fmt .Println ()
0 commit comments