Answer round seven: the judge's rules no longer contradict on a repeated question, QUOTE_SOURCES names README.md's Goals and Audience, the decision names its premise, file item 40
This commit is contained in:
@@ -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(QuotedAnswer("e", "Which one?", "A."), 1)),
|
||||
(states.Judging("/t", 2), answered, states.Working(QuotedAnswer("e", "Which one?", "A."), 3)),
|
||||
(states.Judging("/t", 3), answered, states.Interrupting("/t", "Which one?\n\nREADME.md, AGENTS.md or docs/decisions.md says:\nA.\n\nThey 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's Goals and Audience, AGENTS.md or docs/decisions.md says:\nA.\n\nThose files have answered 3 questions this cycle, the most allowed, 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, AGENTS.md or docs/decisions.md answers it:\n\nUse *A*.\n\nContinue the task.")
|
||||
self.assertEqual(resumed[resumed.index("-p") + 1], "Your question: Which one?\n\nREADME.md's Goals and Audience, AGENTS.md or docs/decisions.md answers 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 says:\nUse *A*.\n\nThey answered 3 questions this cycle", said.getvalue())
|
||||
self.assertEqual(printed.getvalue().count("=== README.md's Goals and Audience, AGENTS.md or docs/decisions.md answered: Which one? ===\nUse *A*."), 3)
|
||||
self.assertIn("Which one?\n\nREADME.md's Goals and Audience, AGENTS.md or docs/decisions.md says:\nUse *A*.\n\nThose files have 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("quoted", answer="Use B.")], on_terminal_claude=[0], git=[ran()])
|
||||
@@ -542,7 +542,7 @@ class ExitContract(unittest.TestCase):
|
||||
def test_every_exit_1_stop_has_its_clause_in_help(self):
|
||||
read, git, premises_ = "a transcript cannot be read or archived", "git cannot start or finds no checkout", "README.md holds no premises"
|
||||
models_ = "the models file cannot be read or written"
|
||||
unreadable = "README.md, or AGENTS.md or docs/decisions.md where they exist, cannot be read or is not UTF-8"
|
||||
unreadable = f"README.md, or {' or '.join(records.RECORD_FILES)} where they exist, cannot be read or is not UTF-8"
|
||||
# Every Stop whose code is not a literal 0, 2 or 130, in source order: path, function, code, start of reason, its --help clause.
|
||||
clauses = [
|
||||
("cycle/interrupt.py", "interrupt", "1", "entries.reason", read),
|
||||
|
||||
Reference in New Issue
Block a user