From daa4c91f87a1a1045c4e79ab6041fe6f362517a1 Mon Sep 17 00:00:00 2001 From: tegwick Date: Mon, 28 Sep 2026 22:46:07 +0200 Subject: [PATCH] C-20 task scope: skip closed workplans and closed tasks Task-block depends_on inside finished/archived plans or on done/cancel tasks is ordering history, not a live commitment; indexing it produced 29 spurious fixable rows on the-custodian alone. Co-Authored-By: Claude Fable 5.1 Assistant: claude-code Assistant-Model: sonnet Assistant-Process: 237582@bnt-lap001 Assistant-Session: f2b3d9f1-8fb9-4b9c-bc2b-837ec5dfc826 --- scripts/consistency_check.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/scripts/consistency_check.py b/scripts/consistency_check.py index 11dc4e1..fbe0c9c 100644 --- a/scripts/consistency_check.py +++ b/scripts/consistency_check.py @@ -2040,8 +2040,15 @@ def check_repo( fixable=False, ) - if t_sh_id and task_dep_targets: + if ( + t_sh_id + and task_dep_targets + and normalised_file_status not in CLOSED_WORKSTREAM_STATUSES + and t_status not in ("done", "cancel") + ): # C-20 for task blocks: the waiting task is the from side. + # Closed workplans and closed tasks are not indexed — their + # ordering is history, not a live commitment. for target in task_dep_targets: target_hub_id, _target_status = _resolve_dependency_target(target) is_task_target = bool(_TASK_RECORD_ID_RE.search(target))