This may not respect dependencies very well, as I don’t think
glob makes any order guarantees. As a quick hack, you could do:
reports = sorted(glob(workdir), key=os.path.getmtime)
A more reliable (albeit more complicated) approach would be to recreate the execution graph, and walk the working directory according to a topological sort. Probably the easiest way to do that would be to copy the
Linear plugin, but instead of running just print or otherwise save the commands.