From d251d5047213437338406934aaf32422544daea3 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Thu, 19 Nov 2026 09:16:14 +0100 Subject: [PATCH] Kill the mutants of the evidence separator and the CPU sum --- bin/agent_cycle/test_stuck_workers.py | 3 ++- bin/loop_effects/test_effects.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/agent_cycle/test_stuck_workers.py b/bin/agent_cycle/test_stuck_workers.py index e2925e34..1883fc70 100644 --- a/bin/agent_cycle/test_stuck_workers.py +++ b/bin/agent_cycle/test_stuck_workers.py @@ -57,7 +57,8 @@ class StuckWorkers(unittest.TestCase): def test_a_shell_older_than_a_chunk_usually_runs_is_investigated_at_the_first_check(self): old = [shell(pid, started=NOW - stuck_workers.OLD, written=NOW + 290) for pid in (7, 10)] _, fake, said, _, _ = self.worker_with(ASSISTANT, None, held=old, replies=[verdict("working", 7, "the tests still print")]) - self.assertEqual(len(fake.made("claude")), 1) + [(_, prompt)] = fake.made("claude") + self.assertIn("collected 40 items\n\nShell 10: bin/run-tests\n", prompt) self.assertIn(f"stuck check: shell 7 has run {stuck_workers.OLD + 300} s, written nothing for 10 s: bin/run-tests; shell 10 has run {stuck_workers.OLD + 300} s, written nothing for 10 s: bin/run-tests; a headless claude judged the worker working, held by process 7: the tests still print", said) def test_a_worker_whose_shells_show_no_sign_is_not_investigated(self): diff --git a/bin/loop_effects/test_effects.py b/bin/loop_effects/test_effects.py index 966a0ee0..ffe4f71b 100644 --- a/bin/loop_effects/test_effects.py +++ b/bin/loop_effects/test_effects.py @@ -210,7 +210,8 @@ class ChildShells(unittest.TestCase): time.sleep(1) used = self.shell_of(busy).cpu - before self.assertGreater(used, 0.2 * (time.monotonic() - started)) - self.assertLess(used, 1.5 * (time.monotonic() - started)) + # Under 2 × the kernel's share alone, so a sum that counts one mode twice fails. + self.assertLess(used, 1.15 * (time.monotonic() - started)) processes = self.shell_of(busy).processes self.assertEqual([line.split(" ", 4)[4] for line in processes], ["dd if=/dev/zero of=/dev/null bs=1M", "sleep 60"]) self.assertEqual([line.split(" ")[1] for line in processes], ["R", "S"])