From 9bfb2fe173b6fb71421413cbc3c8b43bb0b20290 Mon Sep 17 00:00:00 2001 From: Lilleman auf Larv Date: Mon, 28 Sep 2026 16:45:46 +0200 Subject: [PATCH] Pin an interrupt verdict without a question as incomplete, and one person in the empty-interrupt message --- bin/test_loop_claude.py | 3 ++- bin/test_loop_claude_black_box.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/test_loop_claude.py b/bin/test_loop_claude.py index a25565ea..a42fc5b1 100644 --- a/bin/test_loop_claude.py +++ b/bin/test_loop_claude.py @@ -278,7 +278,7 @@ class Interrupt(unittest.TestCase): unittest.mock.patch.multiple(interrupt, checkouts=unittest.mock.DEFAULT, trust=unittest.mock.DEFAULT) as mocks, unittest.mock.patch("subprocess.run") as run, ): - self.assertEqual(interrupt.interrupt(root, SESSION_ID, "m", transcript, "q?", paths_from(pathlib.Path(root), {})), Stop(2, "the human is needed to answer the question above, but the interrupt ended without you typing anything")) + self.assertEqual(interrupt.interrupt(root, SESSION_ID, "m", transcript, "q?", paths_from(pathlib.Path(root), {})), Stop(2, "the human is needed to answer the question above, but the interrupt ended with nothing typed")) mocks["checkouts"].assert_called_with(root) self.assertEqual(run.call_args.kwargs["cwd"], root) self.assertEqual(run.call_args.args[0][run.call_args.args[0].index("--model") + 1], "m") @@ -352,6 +352,7 @@ class Verdict(unittest.TestCase): self.assertFalse(judge.complete({"interrupt": "no", "evidence": "", "finished": True, "question": ""})) self.assertFalse(judge.complete({"interrupt": False, "evidence": None, "finished": True, "question": ""})) self.assertFalse(judge.complete({"interrupt": False})) + self.assertFalse(judge.complete({"interrupt": True, "evidence": "x", "finished": False, "question": " "})) self.assertFalse(judge.complete(None)) diff --git a/bin/test_loop_claude_black_box.py b/bin/test_loop_claude_black_box.py index 67e52a00..c46572a0 100644 --- a/bin/test_loop_claude_black_box.py +++ b/bin/test_loop_claude_black_box.py @@ -408,7 +408,7 @@ class Interrupt(unittest.TestCase): transcript.unlink() run = checkout.run([*asked, interrupt()], terminal_input="") self.assertEqual((run.code, run.roles()), (2, ["worker", "judge", "interrupt"])) - self.assertEqual(run.stderr.strip().splitlines()[-1], "the human is needed to answer the question above, but the interrupt ended without you typing anything") + self.assertEqual(run.stderr.strip().splitlines()[-1], "the human is needed to answer the question above, but the interrupt ended with nothing typed") run = checkout.run([worker(say="A or B?"), judge(interrupt=True, evidence="A or B?", question="A or B?", vanish=True)], terminal_input="") self.assertEqual((run.code, run.roles()), (1, ["worker", "judge"]))