feat(tasks): adopt canonical task statuses

This commit is contained in:
2026-05-26 01:32:50 +02:00
parent da5aee6e38
commit 38835e9e79
61 changed files with 692 additions and 342 deletions

View File

@@ -558,11 +558,11 @@ class TestStatusOrder:
def test_todo_is_lowest(self):
assert STATUS_ORDER["todo"] == 0
def test_done_and_cancelled_are_highest(self):
assert STATUS_ORDER["done"] == STATUS_ORDER["cancelled"] == 2
def test_done_and_cancel_are_highest(self):
assert STATUS_ORDER["done"] == STATUS_ORDER["cancel"] == 2
def test_in_progress_and_blocked_are_mid(self):
assert STATUS_ORDER["in_progress"] == STATUS_ORDER["blocked"] == 1
def test_progress_and_wait_are_mid(self):
assert STATUS_ORDER["progress"] == STATUS_ORDER["wait"] == 1
def test_db_ahead_detected(self):
"""done (DB) vs todo (file) — DB is ahead."""
@@ -573,8 +573,8 @@ class TestStatusOrder:
assert STATUS_ORDER["todo"] < STATUS_ORDER["done"]
def test_same_rank_treated_as_db_ahead(self):
"""in_progress (DB) vs blocked (file) — same rank, no regression."""
assert STATUS_ORDER["in_progress"] >= STATUS_ORDER["blocked"]
"""progress (DB) vs wait (file) — same rank, no regression."""
assert STATUS_ORDER["progress"] >= STATUS_ORDER["wait"]
def test_todo_to_done_is_regression(self):
"""Applying file=todo to DB=done would be a regression."""
@@ -718,7 +718,7 @@ class TestPatchTaskStatusInFile:
content = (
"---\nid: WP-001\n---\n"
"```task\nid: T01\nstatus: todo\n```\n"
"```task\nid: T02\nstatus: in_progress\n```\n"
"```task\nid: T02\nstatus: progress\n```\n"
)
f = self._make_workplan(tmp_path, content)
_patch_task_status_in_file(f, "T02", "done")
@@ -783,7 +783,7 @@ class TestLifecycleRenormalization:
"## Implement Demo\n\n"
"```task\n"
"id: STATE-WP-0001-T01\n"
"status: in_progress\n"
"status: progress\n"
"priority: high\n"
"state_hub_task_id: \"task-1\"\n"
"```\n",
@@ -805,7 +805,7 @@ class TestLifecycleRenormalization:
task = {
"id": "task-1",
"title": "Implement Demo",
"status": "in_progress",
"status": "progress",
"description": None,
}