feat(FN-3056): merge fusion/fn-3056
This merge ships several feature and infrastructure improvements across the codebase. Task title validation is strengthened in triage with stricter rejection of malformed titles and preference for prompt-declared titles (FN-3056), while task creation now preserves priority settings (FN-3210). The Mi Fusion-Task-Id: FN-3056
This commit is contained in:
@@ -92,6 +92,7 @@ export function registerTaskWorkflowRoutes(ctx: ApiRoutesContext, deps: TaskWork
|
||||
thinkingLevel,
|
||||
reviewLevel,
|
||||
executionMode,
|
||||
priority,
|
||||
source,
|
||||
} = req.body;
|
||||
if (!description || typeof description !== "string") {
|
||||
@@ -127,6 +128,11 @@ export function registerTaskWorkflowRoutes(ctx: ApiRoutesContext, deps: TaskWork
|
||||
throw badRequest(`executionMode must be one of: ${validExecutionModes.join(", ")}`);
|
||||
}
|
||||
|
||||
// Validate priority if provided.
|
||||
if (priority !== undefined && priority !== null && !isTaskPriority(priority)) {
|
||||
throw badRequest(`priority must be one of: ${TASK_PRIORITIES.join(", ")}`);
|
||||
}
|
||||
|
||||
const executorModel = normalizeModelSelectionPair(validatedModelProvider, validatedModelId);
|
||||
const validatorModel = normalizeModelSelectionPair(validatedValidatorModelProvider, validatedValidatorModelId);
|
||||
const planningModel = normalizeModelSelectionPair(validatedPlanningModelProvider, validatedPlanningModelId);
|
||||
@@ -196,6 +202,7 @@ export function registerTaskWorkflowRoutes(ctx: ApiRoutesContext, deps: TaskWork
|
||||
summarize,
|
||||
reviewLevel: reviewLevel ?? undefined,
|
||||
executionMode: executionMode || undefined,
|
||||
priority: priority ?? undefined,
|
||||
source: normalizedSource,
|
||||
},
|
||||
{ onSummarize, settings: { autoSummarizeTitles: settings.autoSummarizeTitles } }
|
||||
|
||||
Reference in New Issue
Block a user