Skip to content

Commit e539c72

Browse files
committed
comment and test tidy
1 parent 05ed838 commit e539c72

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

internal/api/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func (c *Client) Run(ctx context.Context, model string, args []string, opts RunO
185185
}
186186

187187
// Parse args against the real schema so type coercion is schema-driven.
188-
// Protected fields (taskType, model, deliveryMethod) are rejected here.
188+
// Protected fields are rejected here.
189189
payload := make(map[string]any, len(args)+4)
190190
payload[fieldModel] = model
191191
for _, a := range args {

internal/api/run_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,11 @@ func TestClientRun_UserProvidedTaskUUID(t *testing.T) {
426426
if len(mock.captured) == 0 {
427427
t.Fatal("no transport calls captured")
428428
}
429-
taskBytes, err := json.Marshal(mock.captured[0][0])
429+
tasks := mock.captured[0]
430+
if len(tasks) == 0 {
431+
t.Fatal("submitted tasks slice is empty")
432+
}
433+
taskBytes, err := json.Marshal(tasks[0])
430434
if err != nil {
431435
t.Fatalf("marshal captured task: %v", err)
432436
}

0 commit comments

Comments
 (0)