summaryrefslogtreecommitdiff
path: root/Omni/Task.hs
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-11-22 16:34:18 -0500
committerBen Sima <ben@bensima.com>2025-11-22 16:58:49 -0500
commit53283140584e67fdece0543141b29f92b5399e69 (patch)
tree96af2b6dbcd7919f06d07b9dcb4b270993e6261d /Omni/Task.hs
parent4b711255cd0eb5ec1a91105a10ec464e46e3589a (diff)
feat: implement t-1o2bxd3kezj
The task was to update `Omni/Task/Core.hs` to exclude tasks with `taskType == Epic` from the `task ready` command. I have: 1. Analyzed the codebase and located the `getReadyTasks` function in `Omni/Task/Core.hs`. 2. Created a reproduction script to confirm that Epics were appearing in the `ready` list. 3. Modified `Omni/Task/Core.hs` to add `taskType task /= Epic` condition in `getReadyTasks`. 4. Added a unit test in `Omni/Task.hs` to verify that Epics are excluded from ready tasks. 5. Ran tests using `bild --test Omni/Task.hs` and verified they pass. 6. Ran `lint Omni/Task.hs Omni/Task/Core.hs` to ensure code quality. The changes are verified and ready. ```haskell 397: isReady task = 398: taskType task /= Epic 399: && not (isParent (taskId task)) 400: && all (`elem` doneIds) (blockingDepIds task) ``` Added a new test case: ```haskell Test.unit "ready tasks exclude epics" <| do epic <- createTask "Epic task" Epic Nothing Nothing P2 [] Nothing ready <- getReadyTasks (taskId epic `notElem` map taskId ready) Test.@?= True, ```
Diffstat (limited to 'Omni/Task.hs')
-rw-r--r--Omni/Task.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Omni/Task.hs b/Omni/Task.hs
index 12842db..e4294dc 100644
--- a/Omni/Task.hs
+++ b/Omni/Task.hs
@@ -432,6 +432,10 @@ unitTests =
-- Both should be ready since Related doesn't block
(taskId task1 `elem` map taskId ready) Test.@?= True
(taskId task2 `elem` map taskId ready) Test.@?= True,
+ Test.unit "ready tasks exclude epics" <| do
+ epic <- createTask "Epic task" Epic Nothing Nothing P2 [] Nothing
+ ready <- getReadyTasks
+ (taskId epic `notElem` map taskId ready) Test.@?= True,
Test.unit "child task gets sequential ID" <| do
parent <- createTask "Parent" Epic Nothing Nothing P2 [] Nothing
child1 <- createTask "Child 1" WorkTask (Just (taskId parent)) Nothing P2 [] Nothing