Appearance
date: 2026-06-05 tags: [ci, github-actions, grep, change-detection] status: active graduated_to:
grep -qE can't exclude one path from a directory arm — POSIX ERE has no negative-lookahead
Symptom — Narrowing the tests.yml change-detector so config/harness.php rides only the harness axis (not the heavy backend test/mutate axis) looked like a one-character regex tweak, but there's no way to write "match config/ except this one file" inside the single grep -qE '^(...|config|...)/...' pattern.
Root cause — The change-detector matches with grep -qE (POSIX extended regex). ERE has no negative-lookahead (?!…), so a directory arm can't carve out a sub-path inline.
Fix — Pre-filter the file list, then match: backend_changed=$(echo "$changed" | grep -v '^config/harness\.php$') and run the existing pattern against $backend_changed (leave the harness arm matching the full $changed). Commit aae1b9f.
Guard — The backend_changed pre-filter line + its why-comment in .github/workflows/tests.yml. Anyone next editing the change-detector sees the pattern in place.