Skip to content

kanban: add explicit delete verb for archived tasks - #69241

Open
LeeYuHoon wants to merge 1 commit into
NousResearch:mainfrom
LeeYuHoon:kanban-delete-verb
Open

kanban: add explicit delete verb for archived tasks#69241
LeeYuHoon wants to merge 1 commit into
NousResearch:mainfrom
LeeYuHoon:kanban-delete-verb

Conversation

@LeeYuHoon

Copy link
Copy Markdown

Summary

Adds hermes kanban delete <task_ids...> as a first-class subcommand that permanently deletes already-archived tasks via the existing delete_archived_task helper.

Previously, permanent deletion was only reachable through the archive flow's rm path, and there was no direct delete verb — users (and agents shelling out to the CLI) reaching for hermes kanban delete got an argparse error. This surfaces the existing, safety-checked deletion path (archived tasks only) under the verb people actually try first.

  • delete refuses live tasks: each id must already be archived, mirroring the archive rm semantics.
  • Prints 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 current main (86fb046).
  • Manual smoke test: create → archive → hermes kanban delete on a real board removes the task; show returns no such task.

🤖 Generated with Claude Code

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>
@alt-glitch alt-glitch added type/feature New feature or request comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have labels Jul 22, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related to #19964: both preserve the archived-only deletion safeguard, while this PR adds the distinct hermes kanban delete command surface.

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 delete action must also be added to _DELEGATED_CHILD_DENIED_ACTIONS (hermes_cli/kanban.py:1117-1146). Otherwise it bypasses the CLI fast-fail at hermes_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 document hermes kanban delete <id>....

Automated hermes-sweeper review.

Comment thread hermes_cli/kanban.py
@@ -1007,6 +1017,7 @@ def kanban_command(args: argparse.Namespace) -> int:
"unblock": _cmd_unblock,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@teknium1 teknium1 added sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users labels Jul 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cron Cron scheduler and job management P3 Low — cosmetic, nice to have sweeper:blast-contained Sweeper blast radius: contained — one narrow path / opt-in / few users sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants