refactor(webui): isolate websocket application orchestration (#5548)

* refactor(webui): extract session attach projection

* refactor(webui): isolate websocket application orchestration

* refactor(webui): tighten websocket application boundary

* test(webui): assert module logger for fork failures
This commit is contained in:
chengyongru
2026-08-26 18:04:38 +08:00
committed by GitHub
parent a618e80887
commit f9d449ef6c
21 changed files with 1920 additions and 1211 deletions
+2 -1
View File
@@ -56,6 +56,7 @@ from nanobot.webui.metadata import (
WEBSOCKET_TURN_OWNER_METADATA_KEY,
WEBUI_TURN_METADATA_KEY,
)
from nanobot.webui.session_identity import is_webui_session_key
from nanobot.webui.transcript import append_session_message_input
WEBUI_SESSION_METADATA_KEY = "webui"
@@ -628,7 +629,7 @@ class WebuiTurnCoordinator:
event.context.channel != "system"
or envelope is None
or envelope["target_session_key"] != session_key
or not session_key.startswith("websocket:")
or not is_webui_session_key(session_key)
):
return
persisted = self.sessions.read_session_metadata(session_key)