fix(kanban): add heartbeat grace window to prevent reclaiming slow workers (#23025) - #23108
Closed
KhanCold wants to merge 2 commits into
Closed
fix(kanban): add heartbeat grace window to prevent reclaiming slow workers (#23025)#23108KhanCold wants to merge 2 commits into
KhanCold wants to merge 2 commits into
Conversation
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug Description
Kanban workers on the default board repeatedly entered a stall loop:
This was particularly bad for slow models like kimi-k2.6.
Root Cause
release_stale_claims()reclaimed any running task whoseclaim_expireshad passed, regardless of whether the worker had heartbeated recently. The default claim TTL is 15 minutes, but slow models can take longer between heartbeats.Fix
Add a 5-minute heartbeat grace window to
release_stale_claims():claim_expireshas passedTests
Added
tests/hermes_cli/test_kanban_stale_claim_grace_regression_23025.pywith 3 tests:All tests pass.
Fixes #23025