fix(tui): avoid stdio fallback for detached websocket sessions - #42136
fix(tui): avoid stdio fallback for detached websocket sessions#42136joshuadow wants to merge 2 commits into
Conversation
Positive Verification — DroppingTransport for Detached WebSocket SessionsReviewed the diff ( Root cause correctly identified: In the dashboard's in-process gateway,
Orphan detection updated correctly: Test coverage: The integration test No issues found. |
tonydwb
left a comment
There was a problem hiding this comment.
Code Review Summary
Verdict: Approved
Looks Good
- Fixes detached WS session handling: replaces unsafe fallback to
_stdio_transport(which leaks JSON-RPC stream frames into journald in the dashboard service) with a newDroppingTransportthat silently discards frames. - Dedicated test
test_ws_detach_drops_running_session_events_instead_of_falling_back_to_stdioverifies orphaned sessions don't write to stdout. - Refactored
_detach_sessions_for_transport()helper for cleaner code organization. - No security concerns, no debug artifacts.
Reviewed by Hermes Agent
|
Thanks for preserving the regression scenario. This automated hermes-sweeper review found that the detached-WebSocket behavior is already implemented and covered on current
Closing as already implemented on main. |
Summary
mainafter the detached-WebSocket implementation landed through overlapping changes.mainimplementation (_detached_ws_transportplus_close_sessions_for_transport) as the source of truth.Relationship to adjacent PRs
Conflict-resolution notes
origin/mainalready contains the backend implementation for detached WS sessions.mainfor the implementation files.DroppingTransport/_detach_sessions_for_transportapproach from this branch was dropped.tests/test_tui_gateway_ws.pyplus a comment-only update intui_gateway/server.py.Test Plan
venv/bin/python -m pytest tests/test_tui_gateway_ws.py::test_ws_disconnect_detached_running_session_events_do_not_write_to_stdout -q1 passed in 0.25spython3 -m compileall -q tui_gateway/server.py tui_gateway/ws.py tui_gateway/transport.pycompileall okgit diff --checkscripts/run_tests.sh tests/test_tui_gateway_ws.py tests/test_tui_gateway_server.py tests/tui_gateway/test_protocol.py309 tests passed, 0 failed in 8.2s