Should I connect longer sequential edges first or group edges from same source node first as shown in cluster1 and cluster2 respectively?
The results are a bit different.
In cluster1, the node and edge order is different from the code but it has no edge crossing.
In cluster2, the node and edge order follows the code but there is edge crossing.
[this answer is going to be more convoluted than you probably want, sorry]
The key to the difference between the two graphs is the edge check → finish (surprised me)
Even though your input presents this edge in the same sequence of the four edges starting from check, dot considers the edges in different order. To see this, try dot -Tcanon myfile.gv. You will see that check → finish gets reordered.
This is important to your question because this edge causes a virtual node to be inserted into the nodes on this rank, which in-turn causes the other nodes to be slightly repositioned to the right and the edges to be drawn differently. Whew!
Back to the question of what should you do. Hmm.
It is pretty easy to identify virtual nodes programmatically. But then what? A large, complex graph can contain tens of thousands of virtual nodes. How many would be important to the layout?
This need more thought.