summaryrefslogtreecommitdiff
path: root/Omni/Agent
diff options
context:
space:
mode:
Diffstat (limited to 'Omni/Agent')
-rw-r--r--Omni/Agent/Worker.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Omni/Agent/Worker.hs b/Omni/Agent/Worker.hs
index 5fa169f..6691f21 100644
--- a/Omni/Agent/Worker.hs
+++ b/Omni/Agent/Worker.hs
@@ -97,7 +97,7 @@ processTask worker task = do
-- Claim task
TaskCore.logActivity tid TaskCore.Claiming Nothing
- TaskCore.updateTaskStatus tid TaskCore.InProgress []
+ TaskCore.updateTaskStatusWithActor tid TaskCore.InProgress [] TaskCore.Junior
say "[worker] Status -> InProgress"
-- Run agent with timing
@@ -136,7 +136,7 @@ processTask worker task = do
then do
say "[worker] Task failed 3 times, needs human intervention"
TaskCore.logActivity tid TaskCore.Failed (Just (toMetadata [("reason", "max_retries_exceeded")]))
- TaskCore.updateTaskStatus tid TaskCore.Open []
+ TaskCore.updateTaskStatusWithActor tid TaskCore.Open [] TaskCore.Junior
else do
let currentReason = "attempt " <> tshow attempt <> ": commit_failed: " <> commitErr
let accumulatedReason = case maybeCtx of
@@ -152,20 +152,20 @@ processTask worker task = do
TaskCore.retryNotes = maybeCtx +> TaskCore.retryNotes
}
TaskCore.logActivity tid TaskCore.Retrying (Just (toMetadata [("attempt", tshow attempt)]))
- TaskCore.updateTaskStatus tid TaskCore.Open []
+ TaskCore.updateTaskStatusWithActor tid TaskCore.Open [] TaskCore.Junior
say ("[worker] Task reopened (attempt " <> tshow attempt <> "/3)")
NoChanges -> do
-- No changes = task already implemented, mark as Done
say "[worker] No changes to commit - task already done"
TaskCore.clearRetryContext tid
TaskCore.logActivity tid TaskCore.Completed (Just (toMetadata [("result", "no_changes")]))
- TaskCore.updateTaskStatus tid TaskCore.Done []
+ TaskCore.updateTaskStatusWithActor tid TaskCore.Done [] TaskCore.Junior
say ("[worker] ✓ Task " <> tid <> " -> Done (no changes)")
unless quiet <| AgentLog.update (\s -> s {AgentLog.statusTask = Nothing})
CommitSuccess -> do
-- Commit succeeded, set to Review
TaskCore.logActivity tid TaskCore.Completed (Just (toMetadata [("result", "committed")]))
- TaskCore.updateTaskStatus tid TaskCore.Review []
+ TaskCore.updateTaskStatusWithActor tid TaskCore.Review [] TaskCore.Junior
say ("[worker] ✓ Task " <> tid <> " -> Review")
unless quiet <| AgentLog.update (\s -> s {AgentLog.statusTask = Nothing})
Exit.ExitFailure code -> do