fix(tui): route completion notifications to owner live session - #35667
Closed
LeonSGP43 wants to merge 1 commit into
Closed
fix(tui): route completion notifications to owner live session#35667LeonSGP43 wants to merge 1 commit into
LeonSGP43 wants to merge 1 commit into
Conversation
Contributor
|
Closing — superseded. Main has since gained _notification_event_belongs_elsewhere (per-session ownership filtering on the shared completion queue), and PR #60863 completed the design with an origin-session return address stamped at dispatch, compression-chain-aware ownership, and fail-closed handling for unowned payloads. Your owner-directed routing idea was the right instinct — the landed design achieves the same guarantee through positive-proof ownership at the consumer. Thanks! |
2 tasks
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
Closes #35652.
Why
_notification_poller_loop()already documents thatcompletion_queueis global, but it always emitted the notification and synthetic turn back to the current pollersid. In a multi-live-session TUI, that let session B render and ingest session A's[IMPORTANT: Background process ... completed]message.This change keeps the existing queue model but resolves the event back to the owning live session via the tracked process
session_key, then injects the notification into that owner session.Scope
tui_gateway/server.pyValidation
python -m pytest tests/test_tui_gateway_server.py -k 'notification_poller' -o 'addopts=' -qpython -m ruff check tui_gateway/server.py tests/test_tui_gateway_server.pygit diff --check