Resuming one agent under a later 'stop everyone' works even when its own flag is already off: the human's resume records its time

This commit is contained in:
KeelrLeek committed 2026-10-06 09:25:32 -05:00
1 parent 440f148c87
commit d755ab8a76
2 files changed
+20 -1

No files matched your search

+13
View File
@@ -225,6 +225,19 @@ class Review(HarborCase):
class Control(HarborCase):
def test_resume_one_agent_under_stop_all(self):
"""Resuming one agent whose own flag is already off still overrides a later 'stop everyone'."""
self.h.set_flag("stop:Claude", "off", "User", "web")
self.clock.t += 60
self.h.set_flag("stop:all", "on", "User", "web")
self.assertTrue(self.h.stopped("Claude"))
self.clock.t += 60
self.h.set_flag("stop:Claude", "off", "User", "web")
self.assertFalse(self.h.stopped("Claude"))
self.assertTrue(self.h.stopped("Codex"))
with self.assertRaises(HarborError):
self.h.set_flag("stop:Codex", "off", "Claude", "cli") # still the human's alone
def test_stop_and_resume_rules(self):
with self.assertRaises(HarborError):
self.h.set_flag("stop:all", "on", "User", "cli")