Skip to content

fix(kanban): argparse rejects multi-word reasons for unblock (fixes #30897)#30915

Open
mohamedorigami-jpg wants to merge 1 commit into
NousResearch:mainfrom
mohamedorigami-jpg:fix/30897-kanban-unblock-argparse
Open

fix(kanban): argparse rejects multi-word reasons for unblock (fixes #30897)#30915
mohamedorigami-jpg wants to merge 1 commit into
NousResearch:mainfrom
mohamedorigami-jpg:fix/30897-kanban-unblock-argparse

Conversation

@mohamedorigami-jpg

Copy link
Copy Markdown
Contributor

Problem

hermes kanban unblock <id> <reason...> treated only the first word after the task id as the reason. Bare trailing words became extra positional args and argparse rejected the call. The sibling hermes kanban block <id> <reason...> accepted multi-word reasons fine, so the asymmetry was the bug.

Fix

  1. Parser (_build_kanban_parser): changed unblock from bare nargs="+" to the same shape as block -- single task_id positional + reason with nargs="*" + --ids for bulk unblock with shared reason.

  2. Handler (_cmd_unblock): joins reason with spaces like _cmd_block does, adds an UNBLOCKED comment to the task (matching block's BLOCKED comment), and prints the reason in the output.

Testing

  • tests/hermes_cli/test_kanban_cli.py: 46 passed (no regressions)
  • tests/hermes_cli/test_kanban_db.py: 159 passed
  • Manual integration test confirmed:
    • hermes kanban unblock t_xxx (no reason, backwards compatible)
    • hermes kanban unblock t_xxx review-complete: all good now (multi-word reason, the fix)
    • hermes kanban unblock t_xxx reason --ids t_yyy (bulk mode)

Closes #30897

…ousResearch#30897)

 treated only the first word
after the task id as accessible; the rest became unrecognized positional
args and argparse rejected the call.  Meanwhile  accepted multi-word reasons fine.

Parser fix: change unblock from bare  to the same shape as
block — single  positional +  with  +
 for bulk.

Handler fix: join reason with spaces, add an UNBLOCKED comment (matching
block's BLOCKED comment), and pass the reason through to the UI output.
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/plugins Plugin system and bundled plugins comp/cli CLI entry point, hermes_cli/, setup wizard labels May 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: hermes kanban unblock <id> <reason...> argparse fails on multi-word reasons (works for block)

2 participants