feat(tasks): adopt canonical task statuses
This commit is contained in:
parent
da5aee6e38
commit
38835e9e79
61 changed files with 692 additions and 342 deletions
|
|
@ -5,6 +5,7 @@ from enum import Enum
|
|||
from typing import Any
|
||||
|
||||
from api.services.lifecycle import status_value
|
||||
from api.task_status import CANONICAL_TASK_STATUSES
|
||||
from api.workplan_status import CLOSED_WORKSTREAM_STATUSES, normalize_workstream_status
|
||||
|
||||
|
||||
|
|
@ -22,7 +23,7 @@ class StateChangeClassification:
|
|||
|
||||
|
||||
WRITE_THROUGH_WORKSTREAM_STATUSES = {"proposed", "ready", "active", "backlog"}
|
||||
TASK_STATUSES = {"todo", "in_progress", "blocked", "done", "cancelled"}
|
||||
TASK_STATUSES = set(CANONICAL_TASK_STATUSES)
|
||||
|
||||
|
||||
def classify_workstream_status_change(
|
||||
|
|
@ -129,11 +130,11 @@ def classify_task_status_change(
|
|||
"status is unchanged",
|
||||
"no file update required",
|
||||
)
|
||||
if target == "blocked" and not (blocking_reason or "").strip():
|
||||
if target == "wait" and not (blocking_reason or "").strip():
|
||||
return StateChangeClassification(
|
||||
ReconciliationClass.HUMAN_CONFIRMATION,
|
||||
"blocked tasks require a blocking reason",
|
||||
"capture the blocker before writing status",
|
||||
"waiting tasks should explain the wait condition",
|
||||
"capture the wait reason before writing status",
|
||||
)
|
||||
if target in TASK_STATUSES:
|
||||
return StateChangeClassification(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue