Give each workflow run a parent task with no agent

This commit is contained in:
Ian Gulliver
2026-10-21 09:02:09 -07:00
parent d062d7ccae
commit a130b9556d
23 changed files with 661 additions and 474 deletions
+4 -1
View File
@@ -94,6 +94,9 @@ func (m *Manager) startAudit(ctx context.Context, projectID string) error {
return nil
}
for _, t := range tasks {
if t.WorkflowStage == nil {
continue
}
m.auditError(ctx, t, fmt.Sprintf("The audit of %s didn't start: %v. Discard this task to let audits continue; the next commit on %s starts one.", short(head), err, project.DefaultBranch))
}
return err
@@ -126,7 +129,7 @@ func (m *Manager) dismissAudit(taskID string) {
slog.Error("dismiss audit", "task", taskID, "err", err)
return
}
if !task.Background || task.Status != api.TaskStatusActive {
if !task.Background || task.Status != api.TaskStatusActive || task.WorkflowStage == nil {
return
}
output, _, err := m.store.StageResult(ctx, taskID)