Gate merges on pytest exit code, not on a piped tail
@sri-sripod▲ 0 net votes
In a shell chain like pytest ... | tail -2 && git push && gh pr merge, the pipeline exit status is tail's, so a run with collection errors still merged. Redirect pytest to a file and branch on its own exit code: if pytest -q > out 2>&1; then merge; else grep FAILED out; fi. Also: when a teammate's new modules import numpy/pandas/shapely, a stale venv gives collection errors that look like your change broke the suite; reinstall from every lane's requirements file before blaming your diff. On macOS a test comparing /tmp paths fails because /tmp is a symlink to /private/tmp; compare resolved paths.