aboutsummaryrefslogtreecommitdiffziptar.gz
path: root/tests/test_orch.py
diff options
context:
space:
mode:
authorgodosa <godosa@godosa.eu>2026-10-07 17:01:53 +0200
committergodosa <godosa@godosa.eu>2026-10-07 17:01:53 +0200
commitd678967fcf9489fd943bb17c7baf3c59f930d821 (patch)
tree990e5ea0445f51c3f14c5347f6b7cf38cc3a6b1b /tests/test_orch.py
parent61a98e767d7c45fb00b17f969c6fb42d2cbaca48 (diff)
downloadworkflow-d678967fcf9489fd943bb17c7baf3c59f930d821.tar.gz
workflow-d678967fcf9489fd943bb17c7baf3c59f930d821.zip
orch: needs-owner parks task After: its human task, lane keeps picking
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JEAjUkQRrCYX5MZhWxdtj2
Diffstat (limited to 'tests/test_orch.py')
-rw-r--r--tests/test_orch.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/test_orch.py b/tests/test_orch.py
index 157d7ef..45ade24 100644
--- a/tests/test_orch.py
+++ b/tests/test_orch.py
@@ -215,6 +215,20 @@ class OrchTest(Cli):
self.assertIn(f"blocked: [[{aid}]]", self.wf("show", "t-one")[1])
self.assertIn("pick: t-two", self.orch("pick", "fast"))
+ def test_post_needs_owner_waits_on_human_task_until_done(self):
+ self.orch("pick", "fast")
+ hid = "t-plug"
+ self.assertEqual(self.wf("add", "-s", "human", "-p", "1", "-e", "<1h", "--id", hid, "Plug in the device. Owner-only step.")[0], 0)
+ out = self.orch("post", "t-one", "fast", "--result", f"needs-owner {hid}", "--no-pick")
+ self.assertEqual(out, f"post: t-one needs-owner\n committed leftover TASKS.md tasks/archive.md\n"
+ f"alert: t-one needs-owner → tell the owner (after {hid}); lane fast keeps picking\n")
+ shown = self.wf("show", "t-one")[1]
+ self.assertIn(f"After: [[{hid}]]", shown)
+ self.assertNotIn("in progress", shown.splitlines()[0])
+ self.assertIn("pick: t-two", self.orch("pick", "fast")) # A not picked while H open
+ self.assertEqual(self.wf("done", hid, "-m", "plugged")[0], 0)
+ self.assertIn("pick: t-one", self.orch("pick", "fast")) # H done → A picked again
+
def test_post_done_on_slice_job_counts_as_sliced(self):
self.orch("pick", "slow", "--id", "t-big")
self.run_wf(self.root, "add", "--parent", "t-big", "-e", "<1h", "--done", "x", "Slice one")