Pin an interrupt verdict without a question as incomplete, and one person in the empty-interrupt message

This commit is contained in:
2026-09-28 16:45:46 +02:00
parent b0afcfab57
commit 9bfb2fe173
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -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))