Gate: a turn may end while only a lead-class node is ready

The lead's own join node no longer blocks the end of turn; worker nodes
ready and undispatched still block. The lead may be waiting on its own
background job.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
This commit is contained in:
swaitsandClaude Haiku 5.5 committed 2026-12-02 10:58:14 -07:00
1 parent 9ae16c17d0
commit caefb1eaa6
3 files changed
+15 -7

No files matched your search

+10 -2
View File
@@ -579,12 +579,20 @@ class Plan(unittest.TestCase):
self.assertEqual(self.decision(self.agent(m, self.pick_header(n))), {})
self.assertEqual(self.hook("gate")[1], "")
def test_gate_names_the_lead_join_when_only_it_is_ready(self):
def test_gate_lets_the_turn_end_when_only_the_lead_join_is_ready(self):
self.ready_plan()
for n in ("a", "b", "c"):
self.assertEqual(self.sisi("plan", "--done", n, "done by hand and tested", sid="s1")[0], 0)
out = self.hook("gate")[1]
self.assertIn("node join is yours and ready: full suite passes", out)
self.assertNotIn('"block"', out)
def test_gate_still_blocks_on_a_ready_worker_node_beside_a_ready_lead_node(self):
self.ready_plan()
self.assertEqual(self.sisi("plan", "--done", "c", "done by hand and tested", sid="s1")[0], 0)
self.assertEqual(self.sisi("plan", "--done", "a", "done by hand and tested", sid="s1")[0], 0)
out = self.hook("gate")[1]
self.assertIn('"block"', out)
self.assertIn("nodes b are ready and not started", out)
if __name__ == "__main__":