fix(notifications): event-driven delivery via _emit_event callback - #36132
Open
someaka wants to merge 5 commits into
Open
fix(notifications): event-driven delivery via _emit_event callback#36132someaka wants to merge 5 commits into
someaka wants to merge 5 commits into
Conversation
Collaborator
someaka
force-pushed
the
fix/notification-event-driven
branch
3 times, most recently
from
June 8, 2026 22:22
fe28f47 to
4a42dbc
Compare
added 5 commits
June 9, 2026 02:57
Replace direct completion_queue.put() calls with _emit_event() which fires both the queue AND the registered _completion_callback. This is the core fix that enables event-driven notification delivery to TUI/CLI sessions without polling. Changes: - Add _completion_callback attribute to ProcessRegistry.__init__ - Add _emit_event() method: queue.put + fire callback - Replace all completion_queue.put() calls with _emit_event() - Add mark_completion_consumed() for explicit consumption tracking - Remove poll() auto-consumption (poll is read-only)
- Add Platform.TUI and Platform.CLI to gateway/config.py enum - Add connected checkers (always True when running) - Add regression test: poll() must NOT mark completions consumed
…peline - test_notification_e2e.py: full pipeline test (create → subscribe → complete → verify event → verify delivery → cursor advancement) - test_regression_notification_paths.py: regression guards for TUI poller, gateway watcher, CLI drain, completion-consumed semantics - test_fifo_notification_bridge.py: DB-based notification bridge tests (writer: kanban_db._append_event, reader: tui_gateway/server.py)
… for event-driven pipeline
someaka
force-pushed
the
fix/notification-event-driven
branch
from
June 9, 2026 00:57
4a42dbc to
9d1d7f4
Compare
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.
What
Replace direct
completion_queue.put()calls inProcessRegistrywith_emit_event()which fires both the queue AND a registered_completion_callback. This is the core plumbing that enables event-driven notification delivery.Why
The notification pipeline has three layers:
process_registry.py:_emit_event()fires callback + queue (the core fix)tui_adapter.py+ TUI client fixes: HTTP-based adapter that receives eventsgateway/run.py: SSE delivery + subagent protectionWithout this PR, the TUI adapter (#36089) registers a
_completion_callbackbut it never fires becausecompletion_queue.put()is called directly. This PR makes the callback fire on every event.Changes
_completion_callbackattribute toProcessRegistry.__init___emit_event()method:queue.put()+ fire callbackcompletion_queue.put()calls with_emit_event()mark_completion_consumed()for explicit consumption trackingpoll()auto-consumption (poll is read-only,mark_completion_consumed()is the explicit writer)