summaryrefslogtreecommitdiff
path: root/Omni/Task/Core.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/Core.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/Core.hs')
-rw-r--r--Omni/Task/Core.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Omni/Task/Core.hs b/Omni/Task/Core.hs
index 3de42b2..a9f6743 100644
--- a/Omni/Task/Core.hs
+++ b/Omni/Task/Core.hs
@@ -454,7 +454,8 @@ getReadyTasks = do
-- Only Blocks and ParentChild dependencies block ready work
blockingDepIds task = [depId dep | dep <- taskDependencies task, depType dep `elem` [Blocks, ParentChild]]
isReady task =
- not (isParent (taskId task))
+ taskType task /= Epic
+ && not (isParent (taskId task))
&& all (`elem` doneIds) (blockingDepIds task)
pure <| filter isReady openTasks