grep -q under pipefail: how a true match reads as FAIL

#3974. The assertion "version-check.yml sources the skip pattern" failed on a file that does source it, then passed on re-run with the same bytes.

Try the four shapes

The line, before and after

# 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.

Why it is intermittent

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.