From 6a1103dff26f2bfe746edcc8ec2e9c4ed34968b8 Mon Sep 17 00:00:00 2001 From: Teknium <127238744+teknium1@users.noreply.github.com> Date: Thu, 13 Aug 2026 10:43:23 -0700 Subject: [PATCH] fix(kanban): default api_server notify subs to notify+wake MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit api_server is stateless — its adapter has no push send(), so the wake self-post IS the delivery on that path. Defaulting those subscriptions to plain 'notify' left them with no delivery mechanism at all (the notifier's doomed send() failed 12 times then dropped the sub), regressing the pre-delivery_mode behavior and failing test_apiserver_sub_wakes_real_session_via_self_post in CI slice 5. Explicit modes still win; other platforms keep the 'notify' default. --- hermes_cli/kanban_db.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hermes_cli/kanban_db.py b/hermes_cli/kanban_db.py index b950320328bad..e92bc543a8fe6 100644 --- a/hermes_cli/kanban_db.py +++ b/hermes_cli/kanban_db.py @@ -11030,7 +11030,15 @@ def add_notify_sub( AFTER they subscribe; the gateway/tool auto-subscribe paths run at task creation, where the snapshot is 0 anyway. """ - insert_mode = delivery_mode if delivery_mode in _NOTIFY_DELIVERY_MODES else "notify" + insert_mode = delivery_mode if delivery_mode in _NOTIFY_DELIVERY_MODES else ( + # api_server is stateless: the adapter has no send() — the wake + # self-post IS the delivery on that path (see gateway/wake.py and + # test_kanban_notifier_apiserver_wake). A plain-'notify' default + # would leave those subscriptions with no delivery mechanism at + # all, regressing the pre-delivery_mode behavior where a task + # carrying a session_id always woke. Explicit modes still win. + "notify+wake" if platform == "api_server" else "notify" + ) insert_chat_type = chat_type or "dm" now = int(time.time()) metadata_json = _encode_notify_delivery_metadata(delivery_metadata)