Forward the lab 5 foundation while preserving lab 6 telemetry

Source: immutable lab5 snapshot f88e9ba43cdfd7eb6a5a7ae5feb4247b4e820071; forward the allowed diff from 64d5c67. Carry SQLAlchemy, Alembic, reliability fixes, versioned jobs, infrastructure and student tests without changing protected coursework files.

Validation: make check, validate, lint; 515 student tests passed with one Linux-only skip; public smoke with telemetry enabled and repeat migration passed. Stop the owned stack and retain volumes. Preserve the existing OTel work in progress; grade implementation remains a separate phase.
This commit is contained in:
Artyom
2026-11-06 12:29:35 +03:00
parent dc9256baf9
commit 12db77133f
161 changed files with 11160 additions and 1467 deletions
+6 -5
View File
@@ -102,14 +102,15 @@ async def test_cursor_from_another_chat_is_rejected(client: AsyncClient) -> None
assert response.json()["error"]["code"] == "invalid_request"
@pytest.mark.parametrize("cursor", ["garbage", "1.2.3.4", "%20"])
@pytest.mark.parametrize("cursor", ["garbage", "1.2.3.4", "%20", ""])
async def test_broken_cursor_is_rejected(client: AsyncClient, cursor: str) -> None:
alice = await register(client, "alice")
chat = await make_chat(client, alice)
response = await client.get(
f"/api/v1/chats/{chat['id']}/messages?cursor={cursor}", headers=actor(alice)
)
assert response.status_code == 400
await fill(client, chat, alice, 1)
for path in (f"/api/v1/chats/{chat['id']}/messages", "/api/v1/chats"):
response = await client.get(f"{path}?limit=1&cursor={cursor}", headers=actor(alice))
assert response.status_code == 400, f"{path}?cursor={cursor} → {response.status_code}"
assert response.json()["error"]["code"] == "invalid_request"
@pytest.mark.parametrize("limit", ["0", "-1", "101", "abc", "1.5", ""])