Skip to content

feat(kanban): add parent dependency guard to direct status writes #19746

@SimbaKingjoe

Description

@SimbaKingjoe

Problem

When a child Kanban task's status is set to "ready" via the dashboard API (drag-drop or PATCH), the _set_status_direct function accepts it unconditionally — even when the task's parent(s) are still todo, running, or blocked. The dispatcher then spawns the child, which discovers no upstream output and either blocks itself (wasting a spawn cycle) or works with incomplete/stale data.

The dependency guard already exists in recompute_ready (which auto-promotes todo → ready only when all parents are done), but direct status writes via the dashboard bypass this check entirely.

Proposed Fix

Add the same parent-dependency check to _set_status_direct() in plugins/kanban/dashboard/plugin_api.py:

  • When new_status == "ready", query all parents and reject (return False → 409) if any parent is not done.
  • No change to recompute_ready — it already handles this correctly.
  • Update affected tests accordingly.

Impact

  • Prevents mis-dispatched tasks from being spawned with unfinished upstream dependencies.
  • No breaking change to the dashboard UX — tasks with incomplete parents were never supposed to be draggable to the ready column.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/pluginsPlugin system and bundled pluginstype/featureNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions