Kill the endless-wait message mutants
CI / tests (pull_request) Successful in 3m5s

This commit is contained in:
2026-11-18 20:39:10 +01:00
parent a25b346ccb
commit 39de100a34
2 changed files with 7 additions and 6 deletions
+3 -3
View File
@@ -158,9 +158,9 @@ class CommandBreaches(unittest.TestCase):
for command in ["pgrep -f chunk-pr", "pkill -f 'loop-claude'", "pgrep -fa chunk-pr", "pgrep -u me -f chunk-pr", "pgrep --full chunk-pr", "pkill -9 -f loop-claude", "pkill -KILL -f loop-claude", "pgrep -f chunk-pr -u", "pkill --full chunk-pr --signal", "pgrep -f -", "if pgrep -f loop-claude; then echo up; fi", "until ! pgrep -f \"chunk-pr merg\" || [ $SECONDS -gt 600 ]; do sleep 15; done", "pgrep -U me -f chunk-pr", "pgrep -fUME chunk-pr", "pgrep -f9 chunk-pr", "pgrep --signal TERM --full chunk-pr", "pgrep -f 'chunk[pr'", "pgrep -f 'chunk-pr .*merg'", "nice pgrep -f chunk-pr", "bash -c 'pgrep -f chunk-pr'"]:
with self.subTest(command):
self.assertEqual(checked(command), ["endless-wait"])
self.assertIn("pgrep -x", breaches("pgrep -f chunk-pr")[0].detail)
self.assertIn("pkill -x", breaches("pkill -f chunk-pr")[0].detail)
self.assertNotIn("wait-for", breaches("pkill -f chunk-pr")[0].detail)
ending = ", or a pattern the command doesn't contain, such as `[c]hunk` for `chunk`"
self.assertEqual(breaches("pgrep -f chunk-pr")[0].detail, "`chunk-pr` matches the command line that holds this `pgrep -f`, so `pgrep` finds the shell that runs the command; use `~/.claude/bin/wait-for <file> [<pattern>] --timeout <seconds>`, a `pgrep -x` on the process name" + ending)
self.assertEqual(breaches("pkill -f chunk-pr")[0].detail, "`chunk-pr` matches the command line that holds this `pkill -f`, so `pkill` finds the shell that runs the command; use a `pkill -x` on the process name" + ending)
def test_an_endless_wait_names_its_loop_and_the_directory_it_runs_in(self):
head = "until [ -s /tmp/a-file-whose-name-takes-the-head-past-sixty-characters-by-itself ]"