fix(kanban): keep initial_status=blocked tasks blocked across recompute_ready - #46565
fix(kanban): keep initial_status=blocked tasks blocked across recompute_ready#46565halonke wants to merge 1 commit into
Conversation
…te_ready create_task() parks a card directly in status='blocked' when called with initial_status="blocked", but only emitted a "created" event. _has_sticky_block() looks for a "blocked"/"unblocked" event, finds none, returns False, so recompute_ready() (invoked on every `kanban list` and by the dispatcher) auto-promotes the card straight back to "ready" — silently dispatching tasks that were meant to stay parked in the backlog. Emit an explicit "blocked" event at create time so _has_sticky_block() treats the card as sticky. Add a regression test covering create+recompute. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Duplicate of #34735 — same fix: emit an explicit "blocked" event when create_task is called with initial_status="blocked", so _has_sticky_block() returns True and recompute_ready() no longer auto-promotes the parked card back to ready. Part of the sticky-block cluster (#39085 / #41497 / #46274; canonical merged #28994). #34735 is the earliest open PR with this approach. |
|
Thanks for the focused regression fix. The premise still holds on current main: The proposed event is written in the existing creation transaction, matching the sticky-block mechanism introduced for worker/operator blocks. The central Automated hermes-sweeper review. |
Problem
hermes kanban create --initial-status blockedreports the card as blocked, but itlands in
ready— and the dispatcher immediately picks it up. Backlog items meantto stay parked get auto-dispatched.
Root cause
create_task()writesstatus='blocked'forinitial_status="blocked"but onlyemits a
createdevent._has_sticky_block()looks for ablocked/unblockedevent, finds none, returns
False, sorecompute_ready()(run on everykanban listand by the dispatcher) auto-promotes the card back toready.Fix
Emit an explicit
blockedevent at create time wheninitial_status="blocked", so_has_sticky_block()treats the card as sticky andrecompute_ready()leaves itparked. Adds a regression test.
Tests
test_create_task_initial_status_blocked_survives_recompute— fails before, passes after.tests/hermes_cli/test_kanban_db.py: 215 passed.🤖 Generated with Claude Code