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
+8 -2
View File
@@ -13,8 +13,14 @@ set -eu
# STOP_MODE=kill — docker kill: SIGKILL, отказ процесса без graceful;
# STOP_ONE_LOG=<файл> — дописать строку «время, TARGET_INSTANCE_ID,
# полный ID контейнера, режим» (доказательство: тест скрывает вывод hook).
# Секретов и окружения не печатает.
: "${TARGET_INSTANCE_ID:?test provides target API instance alias}"
# Секретов и окружения не печатает. Неверный ввод — код 2 до вызова
# docker, нет такой реплики — код 3.
# пустое значение — тот же код 2 в любой оболочке (${VAR:?} даёт 1 в bash
# и 2 в dash)
if [ -z "${TARGET_INSTANCE_ID:-}" ]; then
echo "stop-one: TARGET_INSTANCE_ID is empty; test provides target API instance alias" >&2
exit 2
fi
mode="${STOP_MODE:-stop}"
case "$mode" in