ci: run slow and history-dependent guards in parallel jobs
Summary
workflow-guard-tests sits on the critical path to every macOS job and took about 390 s (example). 104 s was a fetch-depth: 0 checkout. A shallow checkout of this repo takes 10 s, and only one step reads history: the SwiftPM lockfile policy, which diffs against the merge base. Four other steps took 170 s between them.
workflow-guard-testsnow uses a shallow checkout and keeps every step except the ones below. Expected about 120 s.workflow-guard-historykeepsfetch-depth: 0and runs the SwiftPM lockfile policy. It is the only guard job that fetches history.workflow-guard-cli-scriptsruns the cmux-tui client commit resolution (60 s) and profiling script (33 s) guards.workflow-guard-source-lintsruns the sidebar lazy-layout guard (55 s) and the DispatchWorkItem lint (20 s) with its Bonsplit init.linux-preflightrequires success from all four, so macOS still starts only after every guard passes.ci-statuslists them too.
The moved steps are unchanged. Each new job sets up Python 3.9 and the same pinned pip packages, because those steps ran after that setup before. No other guard script calls git against repo history (checked by grepping every script the job runs), and no test pins the moved steps to the old job.
This is step 2 of https://github.com/manaflow-ai/cmux/issues/13095. This PR edits tests/test_ci_change_areas.py, so the router runs every area for it.
Testing
actionlint .github/workflows/ci.ymlpython3 tests/test_ci_change_areas.pyon Python 3.9 and 3.12. New cases:linux-preflightfails when any of the four guard jobs is failed, cancelled or skipped, and onlyworkflow-guard-historyfetches full history.tests/test_ci_reusable_workflow_permissions.py,tests/test_ci_app_host_home_isolation.py,tests/test_ios_testflight_pro_distribution.py,tests/test_ci_self_hosted_guard.sh, which all parse theworkflow-guard-testsjob.- The real timing comes from this PR's own run.
Issues
- Related: https://github.com/manaflow-ai/cmux/issues/13095
- Related: https://github.com/manaflow-ai/cmux/issues/6134
🤖 Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.
Summary by cubic
Splits the slow and history-dependent guard steps out of workflow-guard-tests so macOS jobs no longer wait on one ~390s critical path. workflow-guard-tests now uses a shallow checkout; only the new workflow-guard-history job fetches full history.
workflow-guard-cli-scriptsruns the cmux-tui client commit resolution and profiling script guards.workflow-guard-source-lintsruns the sidebar lazy-layout and DispatchWorkItem lints.- Each new job sets up Python 3.9 and the same pinned pip dependencies as before.
linux-preflightandci-statusnow require all four guard jobs to succeed.- Updates
test_ci_change_areas.pyto enforce the new job requirements and the history-fetching split. - This is step 2 of #13095.