hermes - ✅(Solved) Fix feat(kanban): add parent dependency guard to direct status writes [1 pull requests, 2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
NousResearch/hermes-agent#19746Fetched 2026-05-05 06:05:24
View on GitHub
Comments
2
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3commented ×2cross-referenced ×1

Fix Action

Fix / Workaround

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.

  • 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.

PR fix notes

PR #19743: feat(kanban): prevent child task dispatch when parent is not done

Description (problem / solution / changelog)

What does this PR do?

Prevents child Kanban tasks from being dispatched before their parent tasks are done. Adds a parent dependency guard to the _set_status_direct function so that manually setting a task's status to "ready" via the dashboard API (drag-drop or explicit PATCH) is rejected with 409 when the task's parents are not all completed.

Previously, the dependency guard only existed in recompute_ready (which handles auto-promotion from todoready). Direct status writes via the dashboard API bypassed this check entirely, allowing the dispatcher to spawn a child task whose upstream work hadn't finished yet.

Root cause example: After a dispatcher tick reclaimed stale workers and promoted tasks via recompute_ready, subsequent dashboard status writes set both a child and its grandchild to "ready" in quick succession. The writer (grandchild) was spawned and ran while the analyst (child) was blocked — upstream research wasn't complete.

Related Issue

Fixes #19746

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • plugins/kanban/dashboard/plugin_api.py — Added parent dependency check in _set_status_direct(): when transitioning to "ready", verify all parents are "done". Returns False (409) if not.
  • tests/plugins/test_kanban_dashboard_plugin.py — Updated test_board_progress_rollup to complete the parent (trigger recompute_ready) instead of manually forcing children to "ready". Rewrote test_patch_drag_drop_move_todo_to_ready to verify both the rejection case (parent not done → 409) and the acceptance case (parent done → auto-promoted to ready).

How to Test

  1. Create parent task → create child task with parents=[parent_id]. Child starts as todo.
  2. PATCH /api/plugins/kanban/tasks/{child_id} with {"status":"ready"} → expect 409 Conflict
  3. Complete the parent: PATCH /api/plugins/kanban/tasks/{parent_id} with {"status":"done"}
  4. Verify child auto-promoted to ready by recompute_ready
  5. Run pytest tests/plugins/test_kanban_dashboard_plugin.py -v — all 42 tests pass

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run tests and all pass
  • I've added tests for my changes
  • I've tested on my platform: macOS 15.x

Documentation & Housekeeping

  • N/A (no doc/config/arch changes needed)

Changed files

  • plugins/kanban/dashboard/plugin_api.py (modified, +16/-0)
  • tests/plugins/test_kanban_dashboard_plugin.py (modified, +26/-8)
RAW_BUFFERClick to expand / collapse

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.

extent analysis

TL;DR

Add a parent-dependency check to the _set_status_direct function to prevent tasks with unfinished upstream dependencies from being set to "ready" via the dashboard API.

Guidance

  • Review the plugins/kanban/dashboard/plugin_api.py file and locate the _set_status_direct function to understand its current implementation.
  • Implement the proposed fix by adding a check for the parent tasks' status when the new status is set to "ready", and return False with a 409 status code if any parent is not done.
  • Update the affected tests to account for the new behavior and ensure that tasks with incomplete parents are not spawned with unfinished upstream dependencies.
  • Verify that the fix does not introduce any breaking changes to the dashboard UX, as tasks with incomplete parents were never supposed to be draggable to the ready column.

Example

def _set_status_direct(task, new_status):
    if new_status == "ready":
        parents = query_parents(task)
        if any(parent.status != "done" for parent in parents):
            return False, 409
    # ... rest of the function implementation ...

Notes

The proposed fix assumes that the query_parents function is available and correctly retrieves the parent tasks of a given task. Additionally, the fix only addresses the issue of tasks being set to "ready" via the dashboard API and does not affect the recompute_ready function.

Recommendation

Apply the proposed workaround by adding the parent-dependency check to the _set_status_direct function, as it prevents mis-dispatched tasks from being spawned with unfinished upstream dependencies without introducing any breaking changes to the dashboard UX.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - ✅(Solved) Fix feat(kanban): add parent dependency guard to direct status writes [1 pull requests, 2 comments, 2 participants]