fix(kanban): recover cards guarded by stale PR evidence - #80477
Open
Oceanswave wants to merge 1 commit into
Open
fix(kanban): recover cards guarded by stale PR evidence#80477Oceanswave wants to merge 1 commit into
Oceanswave wants to merge 1 commit into
Conversation
Contributor
|
This was generated by AI during triage. Summary: Problems:
Solution: Checked against |
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.
Summary
Fix Kanban cards that remain in Ready with no worker because the active-PR respawn guard treats every recent PR URL as proof that the card already ran.
active_prcan guard a cardpromoted_manualevent in that requeue pathrespawn_guardedcards and reasons inhermes kanban dispatch --jsonand text outputRoot cause
check_respawn_guard()previously returnedactive_prfor any recent PR URL in task comments. That incorrectly guarded first-run review/merge cards, and it ignored later unblock/promote/reclaim requests after a prior worker handed off a PR.The dispatcher did retain
(task_id, reason)inDispatchResult.respawn_guarded, but_cmd_dispatchomitted it from JSON and text output. Supervisors therefore saw a ready card with no worker but no machine-readable reason, which surfaced asstranded_in_readyand required manual diagnosis.Tests
tests/hermes_cli/test_kanban_active_pr_recovery.py: 10 passedtests/hermes_cli/test_kanban_cli_dispatch_passthrough.py: 2 passedtests/hermes_cli/test_kanban_db.py: 30 passedruff checkon changed files: passedpy_compileon changed Python files: passedgit diff --check: passedThe new regressions cover first-run PR references, prior-worker guarding, all explicit requeue event kinds, same-second fail-closed ordering, latest-comment precedence, and dispatch JSON observability.
Closes #80231.
Related active-PR guard work: #74432, #65996. This PR combines the first-run case with requeue recovery and the CLI observability needed by deterministic supervisors.