diff --git a/scripts/consistency_check.py b/scripts/consistency_check.py index e3b4925..507a221 100644 --- a/scripts/consistency_check.py +++ b/scripts/consistency_check.py @@ -1264,10 +1264,10 @@ def check_repo(api_base: str, repo_slug: str, repo_path_override: str | None = N if db_t["id"] not in file_task_sh_ids: db_t_status = normalise_task_status(db_t.get("status", "todo")) open_task = db_t_status not in TERMINAL_TASK_STATUSES - # Closed workstreams can legitimately retain terminal historical - # DB tasks from earlier duplicates. The public task DELETE route + # Terminal orphans (cancel/done) are historical duplicates after + # file linkage or explicit retirement. The public task DELETE route # is a cancel operation, so these are not further actionable. - if ws_finished and not open_task: + if not open_task: continue # Auto-cancel fixable when workstream is finished and task is open. fixable = ws_finished and open_task