fix: correct replicas-lb details found in verify

- stop-one.sh: an empty TARGET_INSTANCE_ID now exits 2 in any shell,
  as the design states (${VAR:?} gave 1 under bash).
- driver.py kill-inflight: reproducible "aborted response is not
  retried" scenario (logins in flight, replica killed via stop-one.sh).
- Detection time of a hung replica is fall x (inter + timeout check) =
  8 s, not inter x fall + timeout check = 5 s (docker pause: 7.3 s);
  fixed in haproxy.cfg, balancer.md and the design.
- The 1 CPU replica limit is kept on purpose; the compose comment and
  the design now say that Argon2id uses more and logins are slower.
- load-balancing spec: API_REPLICAS is read by compose and Makefile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-10 18:44:57 +03:00
co-authored by Claude Opus 5.5
parent de93056eab
commit a4ca9ef3a7
10 changed files with 287 additions and 29 deletions
+27
View File
@@ -203,3 +203,30 @@ evidence, потом коммит evidence и отчёта (бриф основ
- отметить задачи, коммит evidence и отчёта;
- `graphify update .`;
- стенд `mtusi-lab3` оставлен запущенным через LB, обе реплики `UP`.
## 7. Правки по verify (решение 14)
- [x] 7.1 Код и документы:
- `scripts/stop-one.sh`: пустой `TARGET_INSTANCE_ID` — код 2 явно;
- `driver.py kill-inflight` и `SKILL.md`;
- формула обнаружения в `haproxy.cfg`, `balancer.md`, `design.md`;
- обоснование лимита 1 CPU в `docker-compose.yml` и `design.md`;
- формулировка `API_REPLICAS` в спеке `load-balancing`.
Проверка: `make lint`, `make check`, `openspec validate replicas-lb
--strict`, `driver.py kill-inflight --help`; коммит.
- [ ] 7.2 Стенд с итогового commit: `make down`, `make run_docker`.
Evidence решения 13 снято заново на нём, включая новые файлы и
разделы:
- `clean-clone-ports.md`;
- зависшая реплика и PostgreSQL в `lb-errors.md`;
- цена лимита в `stand.md`;
- `make test` и «Реплик меньше ожидаемого» в `student-test-lb.md`;
- `kill-inflight` в `test-failover-kill.md`.
Проверка: в шапке каждого файла — итоговый commit. `make
test-failover` остановил каждую из двух реплик, ID остановленной =
`TARGET_INSTANCE_ID`.
- [ ] 7.3 `REPORT.md`: формула и замер обнаружения, цена лимита 1 CPU,
отказ PostgreSQL через LB, строки доказательств с новыми файлами.
Коммит evidence и отчёта.