kanban: add explicit delete verb for archived tasks - #69241
Conversation
Adds `hermes kanban delete <task_ids...>` as a first-class subcommand that permanently deletes already-archived tasks via delete_archived_task, with CLI test coverage. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Related to #19964: both preserve the archived-only deletion safeguard, while this PR adds the distinct |
teknium1
left a comment
There was a problem hiding this comment.
Thanks for surfacing the explicit command surface. The premise is valid on current main: hermes_cli/kanban.py:692-701 exposes permanent cleanup only through archive --rm, while hermes_cli/kanban_db.py:6173-6196 already provides the archived-only deletion primitive.
Problems
- The new task-level
deleteaction must also be added to_DELEGATED_CHILD_DENIED_ACTIONS(hermes_cli/kanban.py:1117-1146). Otherwise it bypasses the CLI fast-fail athermes_cli/kanban.py:981-988; the DB guard still fails closed, but this new mutation verb should preserve the established CLI boundary. - The new test covers only success. Add direct-verb coverage that rejects a live task and leaves it present, analogous to
tests/hermes_cli/test_kanban_core_functionality.py:809-821. - Add the command and its archived-only safeguard to the lifecycle reference at
website/docs/user-guide/features/kanban.md:716-721.
Suggested changes
- Include
"delete"in the delegated-child denied set and add a regression test for that boundary. - Test
delete <live-id>and documenthermes kanban delete <id>....
Automated hermes-sweeper review.
| @@ -1007,6 +1017,7 @@ def kanban_command(args: argparse.Namespace) -> int: | |||
| "unblock": _cmd_unblock, | |||
There was a problem hiding this comment.
Please also add the new task-level delete action to _DELEGATED_CHILD_DENIED_ACTIONS. archive is already denied there, and the CLI fast-fail at current hermes_cli/kanban.py:981-988 should cover this destructive alias too; the DB guard remains the durable backstop.
Summary
Adds
hermes kanban delete <task_ids...>as a first-class subcommand that permanently deletes already-archived tasks via the existingdelete_archived_taskhelper.Previously, permanent deletion was only reachable through the
archiveflow's rm path, and there was no directdeleteverb — users (and agents shelling out to the CLI) reaching forhermes kanban deletegot an argparse error. This surfaces the existing, safety-checked deletion path (archived tasks only) under the verb people actually try first.deleterefuses live tasks: each id must already be archived, mirroring thearchiverm semantics.Deleted <id>per task; exits non-zero if any id could not be deleted.Testing
pytest tests/hermes_cli/test_kanban_core_functionality.py -k "delete or archive_rm"— 4 passed on currentmain(86fb046).hermes kanban deleteon a real board removes the task;showreturnsno such task.🤖 Generated with Claude Code