Files
mtusi2026lab4/evidence/tests/student-test-lb.md
T
ricoromaandClaude Opus 5.5 8dc925e8ca docs: add attachments evidence and report
- re-capture coverage-exclusion evidence on the lab 4 stand: cache,
  auth storage, replay after API recreate, test-persistence,
  attachment-failover (stop, kill), attachment-storage
- green evidence/tests: student_test via LB, test_isolated,
  failure_checks; smoke, slow transfer, test-failover per replica
- bench_rollout label attachments: e1161f7 -> schema with attachments
  under load, no errors, messages = keys
- REPORT.md: attachments architecture, write order, defense answers,
  level 3/4 evidence rows, limitations; PLAN.md stage 2

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 01:50:10 +03:00

75 lines
4.0 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# `make student_test` через балансировщик
- Дата: 2026-10-20, 22:37:05–22:37:42 UTC (второй прогон для подсчёта
по модулям — сразу после, тот же итог).
- Commit: `d56b892` (код приложения — `116d8d3`, change `attachments`).
- Стенд: рабочий `mtusi-lab4` — `BASE_URL=http://localhost:8080`
(HAProxy), `EXPECT_REPLICAS=2` (`API_REPLICAS`): реплики
`5f5d4ac50d9a` и `847ad74efd7c`, PostgreSQL, Valkey, S3. Тесты реплик
выполняются, проверки отказов (`fault`) — нет (`-m 'not fault'`, их
гоняет `make failure_checks`, `failure-checks.md`).
- Перед прогоном сняты файлы исключений сверки покрытия на стенде лабы 4
(`evidence/cache/hits.md`, `evidence/auth/passwords-and-tokens.md`,
`evidence/idempotency/replay-after-restart.md`,
`evidence/replicas/test-persistence.md`,
`evidence/attachments/failover.md`, `evidence/attachments/storage.md`):
`test_exclusion_evidence_exists` зелёный.
## Итог
```
$ make student_test
coverage: 201 scenarios in 12 specs, 186 tested (23 by make failure_checks), 15 excluded
===================== 196 passed, 23 deselected in 36.41s ======================
exit=0
```
## По модулям
```
21 student-tests/test_api_conventions.py PASSED
32 student-tests/test_attachments.py PASSED
4 student-tests/test_chat_cache.py PASSED
13 student-tests/test_chats.py PASSED
12 student-tests/test_contract.py PASSED
9 student-tests/test_coverage.py PASSED
3 student-tests/test_data_storage.py PASSED
4 student-tests/test_health.py PASSED
20 student-tests/test_idempotency.py PASSED
10 student-tests/test_identification.py PASSED
2 student-tests/test_load_balancing.py PASSED
15 student-tests/test_messages.py PASSED
14 student-tests/test_pagination.py PASSED
4 student-tests/test_race.py PASSED
12 student-tests/test_rubric.py PASSED
10 student-tests/test_sessions.py PASSED
11 student-tests/test_users.py PASSED
```
## Строки тестов реплик и гонок (`-rsP`)
```
uploaded via 847ad74efd7c, downloaded via ['5f5d4ac50d9a', '847ad74efd7c']
sent via 847ad74efd7c, replayed via ['5f5d4ac50d9a']
409 via ['5f5d4ac50d9a', '847ad74efd7c']
one session, 20 requests: {'5f5d4ac50d9a': 10, '847ad74efd7c': 10}
written via 847ad74efd7c, read via {'5f5d4ac50d9a': 3, '847ad74efd7c': 3}
race: 10 clients x 10 messages, statuses {201: 100}, max in flight 10; history: 100 messages, 100 unique ids, 4 pages by 30
username race: 10 clients, statuses {409: 9, 201: 1}, max in flight 10
key race: 10 clients, statuses {201: 10}, max in flight 10; history: 1 messages
key race: 10 clients, statuses {201: 10}, max in flight 10; history: 1 messages
key race through replicas: {'5f5d4ac50d9a': 5, '847ad74efd7c': 5}
```
- Вложения лабы 4: 32 теста спека `attachments` (`test_attachments.py`)
и пять сценариев рубрики «4» лабы 4 в `test_rubric.py` (слишком
большой файл, повреждённое изображение, подмена MIME, чужое
`attachment_id`, вложение другого чата): каждая ошибка клиента — 4xx
в формате контракта, не 500. «Скачивание через другую реплику»:
загрузку принял `847ad74efd7c`, оригинал отдал `5f5d4ac50d9a`.
- Уровень 4 лаб 2–3: 100 сообщений от 10 клиентов — 100 уникальных в
истории; гонка регистрации — один 201; гонка одного ключа через
реплики — одно сообщение.
- Сверка покрытия: все 201 сценарий 12 спеков — тест (186, из них 23
проверками отказов) или исключение с доказательством (15).