feat: add 'cancelled' task status; fix 500 on invalid status/priority

TaskStatus enum was missing 'cancelled' — the LLM tried to use it and
hit TaskStatus("cancelled") raising ValueError → 500. Added the value,
a migration to extend the task_status Postgres enum, and proper 400
validation guards on both create and update task routes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-27 09:18:16 -04:00
parent 2a1644e571
commit 7a12cba4d5
3 changed files with 38 additions and 5 deletions
+1
View File
@@ -13,6 +13,7 @@ class TaskStatus(str, enum.Enum):
todo = "todo"
in_progress = "in_progress"
done = "done"
cancelled = "cancelled"
class TaskPriority(str, enum.Enum):