feat(kanban): auto-subscribe on create/assign, SIGUSR1 dispatcher wake, claimed event - #22190
Closed
jrhouston-trilogy wants to merge 1 commit into
Closed
Conversation
…e, claimed event - P1: CLI auto-subscribe via notify-routes.yaml helpers - _load_notify_routes(): Load routes from ~/.hermes/kanban/notify-routes.yaml - _auto_subscribe_from_routes(): Subscribe assignee to task if route exists - Auto-call from _cmd_create and _cmd_assign after successful assignment - P2: SIGUSR1 dispatcher wake in gateway/run.py - Added asyncio.Event (_dispatch_wake) wired to SIGUSR1 handler - Dispatcher tick now wakes immediately on signal instead of waiting full interval - Degrades gracefully on Windows/unsupported platforms - P3: 'claimed' notification event - kanban_db.claim_task() already appends 'claimed' event with claimer info - Updated _kanban_notifier_watcher to deliver 'claimed' events - 'claimed' is NOT terminal - subscriptions preserved after delivery - P4: Tests for notify-routes auto-subscribe behavior - test_load_routes_valid: YAML loading - test_missing_route_no_subscribe: Silent no-op for missing routes - test_bad_route_missing_chat_id_no_crash: Warning on malformed routes - test_subscribe_failure_no_raise: Exception handling Fixes: EVE audit findings on kanban notification gaps
This was referenced May 14, 2026
Contributor
|
Thanks @jrhouston-trilogy — closing this one. Status of the three pieces:
If you want to revive P1 as a fresh, focused PR against current main, happy to take another look. Appreciate the audit and contribution! |
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
Production audit by EVE (Hermes agent, 2026-05-08) identified two notification gaps:
hermes kanban createnever auto-subscribed the assignee — callers had to wrap every create with a helper script that duplicated a profile→platform map.Additionally, the dispatcher's 60s tick interval meant up to 60s latency between task creation and worker spawn.
Changes
P1 — CLI auto-subscribe (
hermes_cli/kanban.py)_load_notify_routes()— loads~/.hermes/kanban/notify-routes.yaml_auto_subscribe_from_routes()— looks up assignee route and callskb.add_notify_sub_cmd_createand_cmd_assignafter successful DB writeP2 — SIGUSR1 dispatcher wake (
gateway/run.py)asyncioevent_dispatch_wakewired to a SIGUSR1 handlerdispatch_interval_secondsP3 —
claimednotification event (kanban_db.py,gateway/run.py)claim_task()now appends aclaimedevent with the claimer IDclaimedin addition to terminal kinds (viaNOTIFY_KINDS)▶ Kanban <id> started by @<profile> — <title>messageclaimedis NOT terminal — subscriptions are preserved after deliveryP4 — Tests (
tests/hermes_cli/test_kanban_notify_routes.py)Notes
notify-routes.yamlschema is unchanged from the user-space prototype