Yes I understand that, and its valid implementation, but its not an ideal one, as not everyone would like to use .less files in live environment unless they have a strong reason to use it, most ideal situation usage is in development environment where developer don't want to recompile files himself (want auto mode), and less files have more reasonable usage in development then live site. Anyway.
Yes I noticed you let it pass, as your logic is users will be using it to output in uploads dir, but and that make sense for the output path as in uploads path appended with extra path which points out less file makes sense but when user manually configure the desired output path / uri then its not picking the requirements properly. Anyway here is the culprit code,
public function computeTargetPath();
$this->stylesheet->src (this is the culprit) as it picks the input less file path and replaced the initial path with which matches
get_theme_root_uri() and leaves
$target_path = preg_replace('#^'.get_theme_root_uri().'#U', '', $this->stylesheet->src);
$target_path = preg_replace('/.less$/U', '', $target_path);
and which being appended to output path as bellow
protected function configurePath();
$this->target_path = self::$upload_dir.$target_file;
$this->target_uri = self::$upload_uri.$target_file;
actually its appending the partial path of input less file (the starts after /my-theme/less/theme-main-%s.css ) instead it should be just doing something like this
inside function computeTargetPath();
$target_path = preg_replace('#^'.get_theme_root_uri().'#U', '', basename($this->stylesheet->src));
getting the file name instead of its full uri, and ofcourse do it for cases when user manually set the output path, so you will have to put somekind of flag variable to check against whether user manually configures output path or not???
make sense????? let me know if not.