fix(kanban): route unblock through dependency gate#22372
Conversation
unblock_task no longer jumps directly to ready. It sets the task to todo and calls recompute_ready, so the same parent-dependency gate that guards todo→ready (all parents done/archived) is re-evaluated. This closes the only bypass that could land a task in ready without passing the parent-completion check, and naturally handles the case where parents were archived while the task was blocked.
|
Closing as redundant. Issue #22375 was fixed on One note on your design call: you mentioned Thanks for the report and the work, @SimbaKingjoe! |
What does this PR do?
Routes the
unblock_taskpath through the same dependency gate that guardstodo → ready. Previouslyunblock_taskjumped directly toready, which was the only path that could land a task inreadywithout verifying all parents are terminal (doneorarchived). Now it sets the task totodoand callsrecompute_ready, which re-evaluates the parent-completion check.This also naturally handles the case where parents were archived while the task was blocked —
recompute_readytreatsarchivedas terminal (superset ofdone), so the task still promotes correctly.Related Issue
Fixes #22375
Type of Change
Changes Made
hermes_cli/kanban_db.py—unblock_task: transitionblocked → todoinstead ofblocked → ready, then callrecompute_ready(conn)outside the write txn (same pattern ascomplete_task)tests/hermes_cli/test_kanban_core_functionality.py— 4 new tests covering the unblock dependency gateHow to Test
pytest tests/hermes_cli/test_kanban_core_functionality.py -k "unblock" -vpytest tests/hermes_cli/test_kanban_core_functionality.py tests/hermes_cli/test_kanban_db.py -q— 213 passedChecklist
Code
fix(scope):,feat(scope):, etc.)Documentation & Housekeeping
cli-config.yaml.example— N/ACONTRIBUTING.mdorAGENTS.md— N/A