Repository navigation
fix(kanban): trust fresh heartbeat over pid miss - #50118
GoliathInteractive wants to merge 1 commit into
Conversation
teknium1
left a comment
There was a problem hiding this comment.
Thanks for isolating the PID-miss/heartbeat race. The premise remains present on current main: detect_crashed_workers() proceeds from a false _pid_alive() result at hermes_cli/kanban_db.py:6626 without consulting run-owned heartbeat state.
Problems
hermes_cli/kanban_db.py:216addsHERMES_KANBAN_CRASH_HEARTBEAT_FRESH_SECONDSas a user-facing behavioral knob. The repository policy atAGENTS.md:102-107requires this category of setting to be configured throughconfig.yaml, not a new non-secretHERMES_*variable.tests/hermes_cli/test_kanban_db.py:888duplicates existing stale-run completion coverage intests/hermes_cli/test_kanban_core_functionality.py:1516and the worker-facing coverage intests/tools/test_kanban_tools.py:1645.
Suggested changes
- Keep the fixed freshness window, or plumb any configurable value through
kanban.*configuration and the dispatcher. - Retain the fresh-heartbeat/PID-miss regression test and remove the duplicate completion test.
Automated hermes-sweeper review.
| making progress. Set ``HERMES_KANBAN_CRASH_HEARTBEAT_FRESH_SECONDS=0`` in | ||
| tests or unusual deployments to restore PID-only crash detection. | ||
| """ | ||
| raw = os.environ.get("HERMES_KANBAN_CRASH_HEARTBEAT_FRESH_SECONDS", "").strip() |
There was a problem hiding this comment.
This introduces a new non-secret, user-facing HERMES_* behavioral setting. Repository policy requires such knobs to be exposed through config.yaml; please keep the fixed bound or wire it through kanban.* configuration instead.
| assert task.status == "ready" | ||
|
|
||
|
|
||
| def test_stale_run_completion_cannot_overwrite_new_current_run(kanban_home): |
There was a problem hiding this comment.
Current main already covers this invariant in tests/hermes_cli/test_kanban_core_functionality.py:1516 and covers the worker environment path in tests/tools/test_kanban_tools.py:1645; the focused PID-miss regression test above is the new coverage needed here.
Summary
Validation
Goliath evidence: resolves P0-A Kanban liveness / duplicate-spawn guard where a worker with fresh heartbeats was marked crashed due host/container PID mismatch.