Give the judge what the project records and ten times more of the chunk's transcript

This commit is contained in:
2026-10-03 00:25:24 +02:00
parent 1568b3888d
commit 6d5d19bd69
10 changed files with 76 additions and 28 deletions
+5 -2
View File
@@ -323,6 +323,8 @@ class Cycles(unittest.TestCase):
def test_resumes_the_session_while_unfinished_and_starts_it_fresh_after_finishing(self):
checkout = Checkout(self)
(checkout.root / "sub").mkdir()
(checkout.root / "docs").mkdir()
(checkout.root / "docs" / "decisions.md").write_text("# Decisions\n")
run = checkout.run([
worker(say="started"), judge(evidence="started"),
worker(say="landed-it", siblings=True), judge(finished=True, evidence="landed-it"),
@@ -341,6 +343,7 @@ class Cycles(unittest.TestCase):
self.assertNotIn(TASK, argument(workers[1], "-p"))
self.assertEqual({call["cwd"] for call in run.calls}, {str(checkout.root)})
self.assertIn("1. Work.", run.calls[1]["stdin"])
self.assertIn("From docs/decisions.md:\n# Decisions", run.calls[1]["stdin"])
self.assertEqual({argument(call, "--model") for call in workers}, {"worker-model"})
self.assertEqual({argument(call, "--model") for call in run.calls if call["role"] == "judge"}, {"judge-model"})
self.assertIn("landed-it", run.calls[3]["stdin"])
@@ -428,9 +431,9 @@ class Cycles(unittest.TestCase):
def test_hands_the_judge_the_tail_of_a_long_transcript(self):
checkout = Checkout(self)
run = checkout.run([worker(say="early " * 20000 + "LATE")])
run = checkout.run([worker(say="early " * 80000 + "LATE")])
self.assertIn("LATE", run.calls[1]["stdin"])
self.assertLess(run.calls[1]["stdin"].count("early"), 20000)
self.assertEqual(run.calls[1]["stdin"].count("early"), (400000 - len("LATE")) // len("early "))
self.assertTrue(run.calls[1]["stdin"].rstrip().endswith("an open PR, a review not yet run, CI not yet reported."))
def test_skips_a_malformed_transcript_or_stream_line(self):