From 4f4b91900ed70e682a5d0330325d801e1a109f83 Mon Sep 17 00:00:00 2001 From: Ralph Khreish <35776126+Crunchyman-ralph@users.noreply.github.com> Date: Thu, 17 Jul 2025 22:28:45 +0300 Subject: [PATCH] chore: implement coderabbit suggestions --- scripts/modules/task-manager/update-task-by-id.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/modules/task-manager/update-task-by-id.js b/scripts/modules/task-manager/update-task-by-id.js index 1ee242dd..19603897 100644 --- a/scripts/modules/task-manager/update-task-by-id.js +++ b/scripts/modules/task-manager/update-task-by-id.js @@ -193,6 +193,18 @@ function parseUpdatedTaskFromText(text, expectedTaskId, logFn, isMCP) { // Preprocess the task to ensure subtasks have proper structure const preprocessedTask = { ...parsedTask, + status: parsedTask.status || 'pending', + dependencies: Array.isArray(parsedTask.dependencies) + ? parsedTask.dependencies + : [], + details: + typeof parsedTask.details === 'string' + ? parsedTask.details + : String(parsedTask.details || ''), + testStrategy: + typeof parsedTask.testStrategy === 'string' + ? parsedTask.testStrategy + : String(parsedTask.testStrategy || ''), // Ensure subtasks is an array and each subtask has required fields subtasks: Array.isArray(parsedTask.subtasks) ? parsedTask.subtasks.map((subtask) => ({