feat(kanban): auto-subscribe, rerun command, and test coverage - #29891
Closed
crayfish-ai wants to merge 3 commits into
Closed
feat(kanban): auto-subscribe, rerun command, and test coverage#29891crayfish-ai wants to merge 3 commits into
crayfish-ai wants to merge 3 commits into
Conversation
Adds rerun_task() to kanban_db.py and 'hermes kanban rerun' CLI command: - Resets completed/blocked/archived/gave_up tasks to ready for retry - Preserves notification subscriptions (UPDATE last_event_id, not DELETE) - Re-evaluates parent gates (review-required blocks counted as satisfied) - Clears claim state, run pointer, failure counter - Includes _parent_counts_as_done_for_rerun() helper Note: build_worker_context() workspace path check from original combined commit is N/A — upstream code restructured, no longer exposes parent workspace paths directly.
- T1: 17 rerun_task tests (test_kanban_db_rerun.py) — reset, parent gates, notification retention, failure clearing, assignee override, events, cleanup - T2: Extract _resolve_subscribe_from_env() to eliminate triple-subscribe duplication - T3: 6 multi-child scratch GC tests (test_kanban_scratch_gc.py) — active child defers cleanup, archived/gave_up release, dir workspace immunity All 192 tests passed (coder) + 175 tests passed (reviewer)
Collaborator
Contributor
Author
|
Closing — replaced by a focused, 143-line version that removes the ambient env-var fallback and uses get_session_env() at call sites. |
19 tasks
This was referenced May 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three clean commits providing notification auto-subscribe, task rerun capability, and corresponding test coverage for the kanban workflow system.
Commits
1.
feat(kanban): auto-subscribe on CLI create from --subscribe-* args or env varsAdds notification subscription auto-creation when tasks are created via the CLI or agent tool. When
--subscribe-platform/--subscribe-chat-idCLI flags orHERMES_NOTIFY_PLATFORM/HERMES_NOTIFY_CHAT_IDenv vars are set,create_task()automatically creates akanban_notify_subsentry in the same write transaction as the task row.kanban_db.py:subscribeparameter tocreate_task(), env-var fallback resolutionkanban.py:--subscribe-*CLI arguments and_infer_subscribe_from_env()helper2.
feat(kanban): add rerun_task function + CLI rerun commandAdds
rerun_task()to reset completed/blocked/archived/gave_up tasks to ready. Preserves notification subscriptions, re-evaluates parent gates, clears claim state and failure counters.kanban_db.py: +120 lines for rerun_task +_parent_counts_as_done_for_rerun()kanban.py: +28 lines for CLI rerun command3.
refactor(kanban): coder fixes per analyst review_resolve_subscribe_from_env()to eliminate triple-subscribe duplicationTest Results