Ground the judge's quote with markdown emphasis and whitespace ignored

This commit is contained in:
2026-09-30 16:39:33 +02:00
parent 8e6b7239b3
commit 59ef9e209b
2 changed files with 13 additions and 2 deletions
+6
View File
@@ -348,6 +348,12 @@ class Grounded(unittest.TestCase):
self.assertFalse(loop.grounded({"interrupt": True, "evidence": ""}, "the transcript"))
self.assertFalse(loop.grounded({"interrupt": True, "evidence": " "}, "the transcript"))
def test_a_quote_may_drop_markdown_emphasis_and_reflow_whitespace(self):
transcript = "done.\n\n**Your step:**\n```\n./run.sh\n```\nRun it."
self.assertTrue(loop.grounded({"interrupt": True, "evidence": "Your step:\n```\n./run.sh\n```\nRun it."}, transcript))
self.assertTrue(loop.grounded({"interrupt": True, "evidence": "Your step: ``` ./run.sh ``` Run it."}, transcript))
self.assertFalse(loop.grounded({"interrupt": True, "evidence": "**"}, transcript))
class Verdict(unittest.TestCase):
def test_needs_every_field_the_schema_requires(self):