Bats stalls before listing tests on macOS
Source: Troubleshooting reference
Symptom: Validation prints Fast Bats tests, then stops before the test
count. A bats-preprocess process remains idle.
Observed cause: On macOS with Homebrew Bash 5.3.15, a process sample showed
bats-preprocess blocked in heredoc_write → write while preparing a here-string.
This is a shell redirection stall before test execution; it does not indicate
a failing test.
Confirm: Inspect the command and sample the affected PID:
ps -axo pid,ppid,etime,command | rg bats-preprocessmacprof sample PID 2 -o - --keep-idleWorkaround: Use Bash’s temporary-file redirection behavior for this invocation:
BASH_COMPAT=50 bats --count tests/agents.batsBASH_COMPAT=50 ./tests/ci.sh full# Or apply the same setting to the required outgoing-commit gate:BASH_COMPAT=50 git push origin mainThe count returned 22 on the affected checkout. The full gate still must pass. Keep this setting local to the command; compatibility mode changes other Bash semantics too. See the Bash maintainer’s explanation of here-document compatibility.