feat(taskactions): retry a parked task on the current workflow definition

This commit is contained in:
sam committed 2026-10-17 13:35:12 +11:00
1 parent c80d4750a8
commit 9d7287c647
18 files changed
+134 -58

No files matched your search

+4 -1
View File
@@ -250,6 +250,9 @@ type taskActionRequest struct {
RetryMode string `json:"retry_mode"`
// ResumeFrom is the step a retry starts at; empty runs every step.
ResumeFrom string `json:"resume_from"`
// CurrentDefinition moves a retry onto the workflow's current stored
// definition.
CurrentDefinition bool `json:"current_definition"`
}
func (s *Server) handleTaskAction(w http.ResponseWriter, r *http.Request) {
@@ -313,7 +316,7 @@ func decodeTaskAction(w http.ResponseWriter, r *http.Request) (taskstate.Action,
http.Error(w, "a re-review needs instructions", http.StatusBadRequest)
return "", taskactions.ActionPayload{}, false
}
return action, taskactions.ActionPayload{Instructions: req.Instructions, Findings: req.Findings, RetryMode: taskstate.RetryMode(req.RetryMode), ResumeFrom: req.ResumeFrom}, true
return action, taskactions.ActionPayload{Instructions: req.Instructions, Findings: req.Findings, RetryMode: taskstate.RetryMode(req.RetryMode), ResumeFrom: req.ResumeFrom, CurrentDefinition: req.CurrentDefinition}, true
}
func taskMutation(action taskstate.Action) bool {