Skip to content

feat(kanban): add rerun command, parent workspace context, and notification auto-subscribe - #28331

Closed
crayfish-ai wants to merge 0 commit into
NousResearch:mainfrom
crayfish-ai:server-mainline
Closed

feat(kanban): add rerun command, parent workspace context, and notification auto-subscribe#28331
crayfish-ai wants to merge 0 commit into
NousResearch:mainfrom
crayfish-ai:server-mainline

Conversation

@crayfish-ai

Copy link
Copy Markdown
Contributor

Summary

Three kanban system improvements targeting dispatcher ergonomics and worker context quality.

Commits

1. feat(kanban): add auto-subscribe to task creation

create_task() now accepts an optional subscribe parameter. When present, a kanban_notify_subs row is inserted automatically — no more manual hermes kanban notify-subscribe after every task creation. The notifier watcher in the gateway already processes these rows; this change just populates them at creation time.

Files: hermes_cli/kanban_db.py (+95 lines)
Tests: 5 new tests (test_kanban_fixes_p1_p6.py)

2. feat(kanban): respect review-required in parent-child promotion

  • Adds block_reason column to the tasks table, populated by block_task()
  • recompute_ready() treats review-required blocked parents as "done" for promotion purposes — writers block their task, reviewers get promoted automatically
  • claim_task() and unblock_task() apply the same parent-gate logic
  • unblock_task() now clears the stored block_reason and fires a best-effort dispatch pass
  • Auto-migration adds the column to existing databases

Files: hermes_cli/kanban_db.py (+55/-13 lines)
Tests: 5 new tests

3. feat(kanban): add rerun command and parent workspace in worker context

  • rerun_task() resets completed/blocked tasks back to ready for retry. Clears claim state, block_reason, run pointer, consecutive-failure counter. Respects parent-gate logic. Exposed as hermes kanban rerun <task_id> [--reason] [--reassign] [--append].
  • build_worker_context() now includes each completed parent task's workspace_path in the parent results section, prefixed with _Workspace_:, so child workers know which workspace the parent operated in.

Files: hermes_cli/kanban_db.py, hermes_cli/kanban.py (+144 lines)
Tests: 10 new tests

Test Coverage

All 20 new tests pass (tests/hermes_cli/test_kanban_fixes_p1_p6.py), covering:

  • Auto-subscribe on create (P1)
  • Block_reason persistence and review-required promotion (P2)
  • Auto-dispatch after unblock (P3)
  • Rerun: completed, blocked, active rejection, new assignee, parent gates, review-required parent (P5)
  • Parent workspace in worker context (P6)

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 P3 Low — cosmetic, nice to have type/feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants