fix: kanban notifier ownership - #70091
Conversation
Related: #57993, #62380, and #67673. This broader patch changes profile-scoped polling, atomic claims, legacy ownerless-row handling, and wake chat-type persistence; please choose the intended ownership/adapter-routing contract before consolidating the competing notifier work. |
Route multiplexed notifier rows through their registered profile adapters and keep standalone/default legacy claims scoped to the active owner. Incorporate the active-profile fallback from #57995. Co-authored-by: tymrtn <ty@tmrtn.com>
|
Ownership contract chosen and pushed in
Overlap: #57993/#57995 stamping is incorporated and credited (with #66408 covering the same narrow root); #62380's adapter distinction is compatible without its truncation feature; #67673's decoupling is superseded here without scheduled/truncation scope. Validation: required slices passed 200/200 and 255/255; |
|
Ownership/adapter contract fixed and credited:
No contributor credit lost. |
|
Scoping this comment honestly up front: this is an interaction/coordination check, not a full logic review of the 744 lines here. I have context on the other half of the kanban notification path, so I tested where the two meet rather than re-deriving your ownership model. Context. This PR reworks the gateway-side notifier ( They do. Checked textually first — Then the whole kanban surface on that same combined tree: So no merge-order constraint between the two, and the profile-ownership rewrite doesn't disturb the TUI poller's I have not independently verified the cross-profile mis-delivery this fixes, or reviewed the claim-rewind logic — flagging that so nobody reads this as broader endorsement than it is. The composition result is the part I actually executed. |
|
Superseded — closing with credit. The goals here landed across PR #72191 (chat_type persistence + DM wake, now on main), #72236 (notifier reliability), and #72241 (ownership stamping + profile-correct adapter routing, with per-contributor attribution to the earliest submitters of each half). The remaining delta in this branch — removing the dispatch_in_gateway notifier gate — was deliberately not taken: without replacement scoping it would resurrect the N-gateway SQLite contention the gate exists to prevent. If you want to pursue that, the open design question is tracked as item 1 of #56802 (e.g. a kanban.notify_in_gateway config). Thanks for the comprehensive analysis in this PR — it corroborated several of the fixes that landed. |
Summary
Fix Kanban notifier ownership so claims and delivery follow the subscription owner, not the task assignee, with deterministic legacy handling.
Owner / adapter contract
assigneeis display-only; it never selects the notifier owner.notifier_profilerows claim atomically only for that owner.self.adapters[platform].self.adaptersand secondary owners through the exact_profile_adaptersentry for that profile.notifier_profile IS NULL/''rows are claimable only by activedefault, through the default adapter.HERMES_PROFILE→ canonical active profile →default, so new rows are never ownerless.chat_type; legacy missing values keep the documentedgroupwake fallback, andtask.session_idremains the synthetic-wake target.Related work disposition
32a9225b4with a co-author trailer.Tests
scripts/run_tests.sh tests/gateway/test_kanban_notifier.py tests/hermes_cli/test_kanban_notify.py tests/hermes_cli/test_kanban_core_functionality.py— 200 passedscripts/run_tests.sh tests/gateway/test_kanban_notifier.py tests/tools/test_kanban_tools.py tests/plugins/test_kanban_dashboard_plugin.py tests/hermes_cli/test_kanban_db_init.py— 255 passedgit diff --checkpassedCompatibility / rollback
Legacy ownerless rows remain default-owned. Roll back by reverting the four commits on this branch.