# tests/unit/test-pre-push-hook.sh, Test 4c - if grep -v '^[[:space:]]*#' "$consumer" | grep -qE '...version-skip-pattern\.sh'; then + if grep -v '^[[:space:]]*#' "$consumer" | grep -E '...version-skip-pattern\.sh' >/dev/null; then # -q made the reader exit on the first match; the producer's next write got SIGPIPE (141); # under pipefail the if saw 141 and took the else branch: "does not source", on a file that does.
Whether the producer has a write pending when the reader closes depends on scheduling and pipe buffer fill. Same bytes, different timing, different verdict. Run 34092215151 attempt 1 failed; attempt 2 on the same head passed. Lines 90 and 100 of the same file also pipe into grep -q but on a short echo that has finished writing before grep reads, and they deliberately capture the status; they are untouched. 132 more | grep -q sites exist under pipefail across tests/; they are counted, not classified, and left for a follow-up.