perf: reuse authorized chat snapshot when reading history

This commit is contained in:
2026-11-15 19:33:13 +03:00
parent fa3a69d9b4
commit cabd0cacb3
52 changed files with 256655 additions and 6 deletions
+23
View File
@@ -0,0 +1,23 @@
from conftest import check, headers
def test_history_acl_precedes_query_validation(client, actors, chat):
path = f"/api/v1/chats/{chat['id']}/messages"
check(
client.get(
path,
headers=headers(actors[2]),
params={"limit": 0, "cursor": "broken"},
),
404,
"Error",
)
check(
client.get(
path,
headers=headers(actors[0]),
params={"limit": 0, "cursor": "broken"},
),
400,
"Error",
)