Skip to content

fix(kanban): terminate workers when tasks are blocked or archived - #57713

Closed
nankingjing wants to merge 1 commit into
NousResearch:mainfrom
nankingjing:fix/57596-kanban-worker-terminate-on-block-archive
Closed

fix(kanban): terminate workers when tasks are blocked or archived#57713
nankingjing wants to merge 1 commit into
NousResearch:mainfrom
nankingjing:fix/57596-kanban-worker-terminate-on-block-archive

Conversation

@nankingjing

Copy link
Copy Markdown
Contributor

Summary

  • Terminate host-local kanban worker processes when a task is blocked or archived, reusing the existing _terminate_reclaimed_worker() reclaim path instead of only clearing worker_pid in SQLite.
  • Unify block_task() exit so dependency, triage, and blocked routes all terminate workers and fire the lifecycle hook after the write transaction commits.

Fixes #57596

Test plan

  • pytest tests/hermes_cli/test_kanban_worker_terminate_on_block_archive.py
  • pytest tests/hermes_cli/test_kanban_lifecycle_hooks.py

@alt-glitch alt-glitch added type/bug Something isn't working comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have duplicate This issue or pull request already exists labels Jul 3, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Duplicate of #31365 — that earlier open PR patches the same hermes_cli/kanban_db.py (block_task + archive_task) via the same _terminate_reclaimed_worker() mechanism, and is the broader superset (also covers done/scheduled manual exits from running). Related: #57596 (the issue this fixes) and #42858 (narrower archive_task-only fix). Maintainer to pick the canonical fix from the cluster.

@nankingjing

Copy link
Copy Markdown
Contributor Author

Closing in favor of the earlier canonical fix path that the maintainer review identified in the comment thread.

Per the triage comment on this PR:

Keeping the narrower cluster open does not help the maintainer pick a canonical fix; closing these reduces the supersede noise so the maintainer can land the right one. Thanks to the alt-glitch triage for the cross-references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management duplicate This issue or pull request already exists P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Kanban worker process can survive after task is blocked/archived

2 participants