Require every verdict field, treat an interrupted handoff as unanswered, and tighten the --help contract

This commit is contained in:
2026-09-24 20:42:51 +02:00
parent 15bbae8a4e
commit 09339f694b
4 changed files with 24 additions and 12 deletions
+8
View File
@@ -48,6 +48,7 @@ class HumanTurns(unittest.TestCase):
human([{"type": "tool_result", "content": "not typed"}]),
human("<command-name>/model</command-name>"),
{**human("peer message"), "isMeta": True},
human([{"type": "text", "text": "[Request interrupted by user]"}]),
assistant({"type": "text", "text": "said"}),
]), 2)
@@ -122,5 +123,12 @@ class Grounded(unittest.TestCase):
self.assertFalse(loop.grounded({"ask": True, "evidence": ""}, "the transcript"))
class Verdict(unittest.TestCase):
def test_needs_every_field_the_schema_requires(self):
self.assertTrue(loop.complete({"ask": False, "evidence": "", "finished": True, "question": ""}))
self.assertFalse(loop.complete({"ask": False}))
self.assertFalse(loop.complete(None))
if __name__ == "__main__":
unittest.main()