Allow concurrency 0 to pause a terminal

A paused terminal gets no new runs and is not probed; in-flight runs still finish.
This commit is contained in:
jj.wang
2026-10-21 07:17:29 +00:00
parent b17b1f1587
commit 1ae44eb705
3 changed files with 15 additions and 1 deletions
+8
View File
@@ -160,6 +160,14 @@ class CoreTest(unittest.TestCase):
self.assertEqual(started, ["GW-1-1", "GW-3-1"]) # 2 slots; GW-2 waits for the game group
self.assertEqual([self.p.state_of(x) for x in (a, b, c, d)], ["In Progress", "Todo", "In Progress", "Todo"])
def test_concurrency_zero_pauses_terminal(self):
self.h.cfg.terminals["win10"]["concurrency"] = 0
w = self.p.add_issue(1)
o = self.p.add_issue(2, assignee="oregon")
self.h.tick()
self.assertNotIn(("win10", "codex"), self.h.execs) # not even probed (busy_processes)
self.assertEqual((self.p.state_of(w), self.p.state_of(o)), ("Todo", "In Progress"))
def test_label_routing(self):
self.p.add_issue(1, labels=["model:astra"])
self.p.add_issue(2, assignee="oregon", labels=["cap:gpu"]) # oregon lacks the capability