refactor(session): clarify reference boundaries

This commit is contained in:
Xubin Ren
2026-08-04 12:14:51 +08:00
parent d8aeb0eb2c
commit d99f589a59
9 changed files with 108 additions and 43 deletions
+2 -1
View File
@@ -51,7 +51,7 @@ def test_normalize_session_mentions_keeps_only_authorized_distinct_targets(
{"name": "STRASSE", "session_key": "websocket:upper"},
{"name": "private", "session_key": "telegram:private"},
],
SessionAccessScope("websocket:current"),
SessionAccessScope("websocket:current", "websocket:"),
)
assert mentions == [
@@ -99,6 +99,7 @@ def test_restricted_scope_rejects_sessions_from_other_projects(tmp_path) -> None
access = WebuiSessionAccess(manager)
scope = SessionAccessScope(
"websocket:current",
"websocket:",
project_path=project_a,
restrict_to_workspace=True,
)