fix: prevent kanban dispatcher from retrying handoff blocks (#29027) - #29064
Closed
AllynSheep wants to merge 8 commits into
Closed
fix: prevent kanban dispatcher from retrying handoff blocks (#29027)#29064AllynSheep wants to merge 8 commits into
AllynSheep wants to merge 8 commits into
Conversation
…arch#29027) Add handoff parameter to kanban_block to distinguish deliberate handoffs (e.g., awaiting review) from genuine failures. The dispatcher now skips failure counting and retry logic for tasks blocked with handoff=True. Changes: - Add handoff INTEGER column to tasks table with migration support - Add handoff parameter to block_task() function - Update _handle_block() to auto-detect handoff from reason patterns - Modify _record_task_failure() to skip handoff blocks - Update kanban-worker skill with handoff usage guidance - Add comprehensive tests for handoff functionality Fixes NousResearch#29027 # Conflicts: # hermes_cli/kanban_db.py # tools/kanban_tools.py
AllynSheep
force-pushed
the
fix/kanban-handoff-retry-loop
branch
from
May 20, 2026 07:34
c22e5f9 to
f4f2424
Compare
|
Autofix update: I diagnosed the latest failing test run after the attribution failure was already resolved. The remaining failures were:
I prepared and verified a fix in commit 4a8bb20 on MKI13:autofix/pr-29064-test-fix. I could not push directly to AllynSheep/fix/kanban-handoff-retry-loop because GitHub returned 403 to MKI13, so I opened a PR against the contributor branch here: Verification:
|
fix: update tests for current plugin registry
Contributor
|
This is already fixed on current Automated hermes-sweeper review evidence:
Thanks for the concrete fix attempt and the detailed trace; the same failure mode is now handled on main without adding a separate |
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.
Problem
When workers call
kanban_blockwith handoff reasons likereview-required:, the dispatcher treats it as a failure and retries the task up tofailure_limittimes. This causes:Root Cause
The dispatcher's failure counting logic doesn't distinguish between:
review-required:)Both trigger
consecutive_failuresincrementing and retry behavior.Solution
Add a
handoffparameter tokanban_blockto mark deliberate handoffs. The dispatcher now:handoffflag in the database (0 = failure, 1 = handoff)review-required:handoff:needs-review:awaiting review:Changes
handoff INTEGER NOT NULL DEFAULT 0column to tasks table with migrationblock_task()to accepthandoffparameter_record_task_failure()to skip handoff blocks_handle_block()to parse and auto-detect handoff parameterhandoffparameter tokanban_blocktool registrationTesting
All tests pass:
test_handoff_block_prevents_retry(): Verifies handoff blocks don't increment failure countertest_regular_block_counts_as_failure(): Ensures regular blocks still count as failurestest_auto_detect_handoff_from_reason(): Tests pattern-based auto-detectionImpact
handoff=TrueFixes #29027