Require every verdict field, treat an interrupted handoff as unanswered, and tighten the --help contract
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user