Parallelize template Justfile recipes with mprocs - #327
Draft
Nicolapps wants to merge 4 commits into
Draft
Conversation
Drive the per-template loops in `install-all`, `_install-all-clean`, `regenerate-codegen`, and `update-ai-files` through `npx mprocs@latest` via a shared `_run-parallel` recipe. It falls back to sequential execution when there is no TTY (e.g. CI), where mprocs would hang. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Use mprocs's `--on-all-finished` (>= 0.9) so the interactive TUI quits on its own once every command finishes. Replace the sequential non-TTY fallback with parallel background jobs that capture per-command output and propagate a non-zero exit code, so CI runs in parallel and still fails when a template command fails (mprocs itself is unfit for CI: it needs a TTY and always exits 0). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the hand-rolled background-jobs fallback with `concurrently`, a documented tool built for non-interactive parallel execution: it prefixes each command's output and, with the default `--success all`, exits non-zero if any command failed. mprocs is still used for the interactive (TTY) path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Nicolapps
marked this pull request as draft
July 2, 2026 18:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The per-template loops in
install-all,_install-all-clean,regenerate-codegen, andupdate-ai-filesnow run in parallel via a shared_run-parallelrecipe instead of iterating sequentially. In an interactive terminal it launches everything at once in anmprocslive TUI, using--on-all-finished(mprocs >= 0.9) so it quits automatically when every command finishes. Sincemprocsis unfit for CI — it refuses to start without a TTY and always exits 0 regardless of failures — the non-interactive path usesconcurrently, which runs the commands in parallel with prefixed output and exits non-zero if any command failed. So both local and CI runs are parallelized while CI still fails loudly when a template command breaks.