docs: retake replicas-lb evidence from a4ca9ef after verify

The stand was recreated from a4ca9ef (make down, make run_docker) and
all evidence of the change was taken again on it: stand, distribution,
LB errors, test-persistence, test-failover for each replica (stop and
kill), stop-one refusals, make test and student_test through the LB,
test_isolated, failure_checks and bench self-checks.

New evidence closes scenarios verify found without proof: a real git
clone on non-default ports, a hung replica (docker pause: DOWN after
7.7 s, in-flight request 504), PostgreSQL outage behind the LB, replica
tests failing against one process, aborted responses via
driver.py kill-inflight. REPORT.md gets the corrected detection
formula, the measured cost of the 1 CPU limit for Argon2id and the new
rows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-10 22:09:15 +03:00
co-authored by Claude Opus 5.5
parent a4ca9ef3a7
commit cb14586a19
16 changed files with 871 additions and 489 deletions
+7 -7
View File
@@ -3,11 +3,11 @@
| | |
|---|---|
| Спеки | `student-tests` «Проверки отказов на отдельном стенде» — «Успешный прогон»; `idempotency` «Сбой при записи сообщения», «Отказ БД при отправке», «Ключ после срока»; сценарии лабы 2 — таблица ниже |
| Change | `replicas-lb`, задача 6.1 (прогон change `instance-id-idempotency` на `af4bca0` — в истории git этого файла) |
| Дата | 2026-10-10 15:14:12 UTC, 52 с |
| Commit | `4e0cc4e` |
| Change | `replicas-lb`, задачи 6.1 и 7.2 (прогон change `instance-id-idempotency` на `af4bca0` и прогон apply на `4e0cc4e` — в истории git этого файла) |
| Дата | 2026-10-10 15:52:58 UTC, 53 с |
| Commit | `a4ca9ef`, рабочее дерево чистое |
| Стенд отказов | проект compose `mtusi-lab3-failures` из того же `docker-compose.yml` с override `student-tests/failures.compose.yml`: свои PostgreSQL и Valkey со своим volume, порты Postgres, Valkey и LB не публикуются, `haproxy` не запускается; обычный API и «тесный» (`AUTH__SESSION_TTL_SECONDS=2`, `IDEMPOTENCY__TTL_SECONDS=2`, `DATABASE__POOL_SIZE=1`, `DATABASE__MAX_OVERFLOW=0`, `DATABASE__POOL_TIMEOUT_SECONDS=1`, `DATABASE__REQUEST_TIMEOUT_SECONDS=2`) — отдельные контейнеры `docker compose run` на свободных портах `127.0.0.1`, с лимитами сервиса `api` |
| Рабочий стенд | `make run_docker` запущен (HAProxy на `127.0.0.1:8080`, `api` × 2), во время прогона не трогался: состояние и `StartedAt` всех контейнеров `mtusi-lab3` до и после совпадают |
| Рабочий стенд | `make run_docker` запущен (HAProxy на `127.0.0.1:8080`, `api` × 2), во время прогона не трогался: состояние и `StartedAt` всех контейнеров `mtusi-lab3` до и после совпадают (`diff` пуст) |
| Хост | Docker Desktop 29.8.1, macOS arm64; ВМ Docker: 12 CPU, 7,7 GiB RAM; ноутбук от батареи |
На хранилища тесты действуют только через hook
@@ -19,13 +19,13 @@ ON messages` роняет вставку сообщения с этим текс
## Прогон
```text
$ make failure_checks # exit 0, 52 с
$ make failure_checks # exit 0, 53 с
[failure_checks] project=mtusi-lab3-failures (working stand: mtusi-lab3)
[failure_checks] build image
[failure_checks] start postgres and valkey
[failure_checks] migrations
[failure_checks] start api containers
[failure_checks] ready: api=http://127.0.0.1:51750 tight=http://127.0.0.1:51754
[failure_checks] ready: api=http://127.0.0.1:54564 tight=http://127.0.0.1:54568
[failure_checks] pytest -m fault
collecting ... collected 146 items / 131 deselected / 15 selected
student-tests/test_failures.py::test_expired_token PASSED [ 6%]
@@ -43,7 +43,7 @@ student-tests/test_failures.py::test_valkey_back PASSED [ 80%]
student-tests/test_failures.py::test_message_failure_keeps_key_free PASSED [ 86%]
student-tests/test_failures.py::test_database_outage_keeps_key_free PASSED [ 93%]
student-tests/test_failures.py::test_key_free_after_ttl PASSED [100%]
===================== 15 passed, 131 deselected in 43.48s ======================
===================== 15 passed, 131 deselected in 44.09s ======================
[failure_checks] cleanup
[failure_checks] results: {'fault': 0}
```