Skip to content

fix(kanban): detect darwin zombie workers#20023

Closed
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/kanban-darwin-zombie-pid-20015
Closed

fix(kanban): detect darwin zombie workers#20023
LeonSGP43 wants to merge 1 commit into
NousResearch:mainfrom
LeonSGP43:fix/kanban-darwin-zombie-pid-20015

Conversation

@LeonSGP43
Copy link
Copy Markdown
Contributor

Fixes #20015

Summary

  • extend Kanban _pid_alive() zombie detection to macOS/Darwin using ps -o stat= after kill(pid, 0) succeeds
  • treat Darwin process states containing Z as dead so crash detection can reclaim defunct workers promptly
  • keep the existing Linux /proc/<pid>/status path unchanged

Scope

This is limited to Kanban dispatcher worker liveness checks. It does not change gateway scoped locks or process spawning semantics.

Verification

  • scripts/run_tests.sh tests/hermes_cli/test_kanban_core_functionality.py::test_pid_alive_helper tests/hermes_cli/test_kanban_core_functionality.py::test_pid_alive_detects_darwin_zombie tests/hermes_cli/test_kanban_core_functionality.py::test_detect_crashed_workers_reclaims -> 3 passed
  • git diff --check

@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins labels May 5, 2026
@teknium1
Copy link
Copy Markdown
Contributor

teknium1 commented May 5, 2026

Merged via PR #20188 (commit 1a03e3b). Your commit was cherry-picked onto current main with your authorship preserved in git log. Clean fix — ps -o stat= is exactly the right tool on Darwin, and the defensive fallback-to-kill(0)-answer on probe failure is the right call. Thanks.

#20188

@teknium1 teknium1 closed this May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/plugins Plugin system and bundled plugins 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 dispatcher: macOS zombie detection is a no-op — _pid_alive returns True for defunct workers

3 participants