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 <noreply@anthropic.com>

Assistant: claude-code
Assistant-Model: sonnet
Assistant-Process: 237582@bnt-lap001
Assistant-Session: f2b3d9f1-8fb9-4b9c-bc2b-837ec5dfc826
This commit is contained in:
tegwick 2026-09-28 22:46:07 +02:00
parent 00c6e7a6ae
commit daa4c91f87

View file

@ -2040,8 +2040,15 @@ def check_repo(
fixable=False, 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. # 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: for target in task_dep_targets:
target_hub_id, _target_status = _resolve_dependency_target(target) target_hub_id, _target_status = _resolve_dependency_target(target)
is_task_target = bool(_TASK_RECORD_ID_RE.search(target)) is_task_target = bool(_TASK_RECORD_ID_RE.search(target))