Answer stability round 1: 0 🔴, 3 🟡 (0 misread); test that loop-inbox removes a killed loop's ask as it looks and that a loop leaves the ask of another that holds the session's lock

This commit is contained in:
2026-10-29 18:37:23 +01:00
parent bf78fedc54
commit 2f27e66f50
2 changed files with 18 additions and 0 deletions
+9
View File
@@ -744,6 +744,15 @@ class Interrupts(unittest.TestCase):
stop, _ = self.put(FakeEffects(inputs=["/talk"], on_terminal_claude=[0], git=[""]))
self.assertEqual(stop, Stop(2, "the human is needed to answer the question above, but the interrupt ended with nothing typed"))
def test_leaves_the_question_another_loop_lists_for_the_session_where_that_loop_holds_its_lock(self):
theirs = self.ask(question="Theirs?")
self.enterContext(session_lock.locked(self.paths.waiting, theirs.session))
waiting.publish(self.paths.waiting, theirs)
answer, said = self.put(FakeEffects(inputs=["Use B."]))
self.assertEqual(answer, "Use B.")
self.assertIn(f"loop-inbox cannot show this question: another process holds {session_lock.lock_file(self.paths.waiting, theirs.session)}", said)
self.assertEqual(self.asked(), [theirs])
def test_makes_way_for_the_claude_loop_inbox_opens_and_goes_on_once_the_human_typed_there(self):
def claude_ran(_):
# loop-inbox opens claude only once the loop lists it as open there.