Answer the prose pass's third round: name the three files in the worker's prompt, say They once named

This commit is contained in:
2026-10-03 01:53:58 +02:00
parent 45b4030347
commit fdc3bc38d4
4 changed files with 6 additions and 6 deletions
+3 -3
View File
@@ -135,7 +135,7 @@ class Transitions(unittest.TestCase):
(states.Judging("/t", 3), states.Ruled(Interrupt("e", "Which one?")), states.Interrupting("/t", "Which one?", 3)),
(states.Judging("/t"), answered, states.Working(AnsweredFromRecords("e", "Which one?", "A."), 1)),
(states.Judging("/t", 2), answered, states.Working(AnsweredFromRecords("e", "Which one?", "A."), 3)),
(states.Judging("/t", 3), answered, states.Interrupting("/t", "Which one?\n\nREADME.md, AGENTS.md or docs/decisions.md say:\nA.\n\nREADME.md, AGENTS.md or docs/decisions.md answered 3 questions this cycle, so this one comes to you.", 3)),
(states.Judging("/t", 3), answered, states.Interrupting("/t", "Which one?\n\nREADME.md, AGENTS.md or docs/decisions.md say:\nA.\n\nThey answered 3 questions this cycle, so this one comes to you.", 3)),
(states.Judging("/t"), states.Ruled(Finished("e")), states.Closing("/t", Finished("e"))),
(states.Judging("/t", 3), states.Ruled(Finished("e")), states.Closing("/t", Finished("e"))),
(states.Judging("/t"), states.Ruled(Unfinished("e")), states.Closing("/t", Unfinished("e"))),
@@ -250,10 +250,10 @@ class Cycles(unittest.TestCase):
with contextlib.redirect_stderr(io.StringIO()) as said, contextlib.redirect_stdout(io.StringIO()) as printed:
self.assertEqual(run.run_cycle(self.cycle(fake, records="From AGENTS.md:\nUse A.")), Stop(2, "the human is needed to answer the question above, but the interrupt ended with nothing typed"))
resumed = fake.made("stream_claude")[1]
self.assertEqual(resumed[resumed.index("-p") + 1], "Your question: Which one?\n\nREADME.md or the project's records answer it:\n\nUse *A*.\n\nContinue the task.")
self.assertEqual(resumed[resumed.index("-p") + 1], "Your question: Which one?\n\nREADME.md, AGENTS.md or docs/decisions.md answer it:\n\nUse *A*.\n\nContinue the task.")
self.assertEqual(len(fake.made("stream_claude")), 4)
self.assertEqual(printed.getvalue().count("=== README.md, AGENTS.md or docs/decisions.md answered: Which one? ===\nUse *A*."), 3)
self.assertIn("Which one?\n\nREADME.md, AGENTS.md or docs/decisions.md say:\nUse *A*.\n\nREADME.md, AGENTS.md or docs/decisions.md answered 3 questions this cycle", said.getvalue())
self.assertIn("Which one?\n\nREADME.md, AGENTS.md or docs/decisions.md say:\nUse *A*.\n\nThey answered 3 questions this cycle", said.getvalue())
def test_an_answer_the_records_do_not_hold_is_dropped_and_the_question_goes_to_the_human(self):
fake = FakeEffects(streams=[Worker(self.paths.claude_code_transcripts.parent)], claude=[judged("interrupt", answer="Use B.")], on_terminal_claude=[0], git=[ran()])