When multiple git-clone modules exist and more than one have a post_clone_script defined, each instance uses the same hardcoded /tmp/post_clone.sh path in their internal run.sh script.
When they run concurrently (or overlap), they collide on the same temp file. This is a race condition bug in the git-clone module v1.2.2. The module should use unique temp filenames (e.g., /tmp/post_clone_${RANDOM}.sh or based on the repo name).
This condition results in a non-zero exit code causing the workspace to appear unhealthy:
rm: cannot remove '/tmp/post_clone.sh': No such file or directory
See the offending code here: https://github.com/coder/registry/blob/release/coder/git-clone/v1.2.2/registry/coder/modules/git-clone/run.sh#L61-L65
Adding a depends_on from one module to another does not appear to be an effective workaround.