ci: run slow and history-dependent guards in parallel jobs

Merged
TE
2mo ago
+128-28

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-tests now uses a shallow checkout and keeps every step except the ones below. Expected about 120 s.
  • workflow-guard-history keeps fetch-depth: 0 and runs the SwiftPM lockfile policy. It is the only guard job that fetches history.
  • workflow-guard-cli-scripts runs the cmux-tui client commit resolution (60 s) and profiling script (33 s) guards.
  • workflow-guard-source-lints runs the sidebar lazy-layout guard (55 s) and the DispatchWorkItem lint (20 s) with its Bonsplit init.
  • linux-preflight requires success from all four, so macOS still starts only after every guard passes. ci-status lists 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.yml
  • python3 tests/test_ci_change_areas.py on Python 3.9 and 3.12. New cases: linux-preflight fails when any of the four guard jobs is failed, cancelled or skipped, and only workflow-guard-history fetches 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 the workflow-guard-tests job.
  • The real timing comes from this PR's own run.

Issues

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
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-scripts runs the cmux-tui client commit resolution and profiling script guards.
  • workflow-guard-source-lints runs the sidebar lazy-layout and DispatchWorkItem lints.
  • Each new job sets up Python 3.9 and the same pinned pip dependencies as before.
  • linux-preflight and ci-status now require all four guard jobs to succeed.
  • Updates test_ci_change_areas.py to enforce the new job requirements and the history-fetching split.
  • This is step 2 of #13095.