Date: 2026-11-07
Host: 12th Gen Intel Core i5-12450H, Docker Desktop ncpu=12, MemTotal=8181665792
Engine: Docker 29.5.3, Compose 5.1.4
Stack: haproxy:2.8.14-alpine, mtusi-messenger:lab3 (python:3.12.8-slim-bookworm), postgres:16.6-alpine, redis:7.4.2-alpine

python -X utf8 scripts/check_contract.py
PASS: offline skeleton structure, local refs and Python syntax; application NOT tested.

python -X utf8 tests/smoke.py --base-url http://127.0.0.1:8080
PASS: lab3 public API scenario; infrastructure and grading evidence remain separate.

python -X utf8 -m pytest student_tests -q -m "not infra and not expiry"
15 passed, 3 deselected

Official persistence and failover were executed by Linux python3 in docker:27-cli
with the host Docker socket and BASE_URL=http://host.docker.internal:8080,
because Windows CreateProcess cannot run scripts/restart.sh (WinError 193).
The hooks and the API containers are the host stack.

python3 tests/resilience.py --mode persistence --action-script scripts/restart.sh
PASS: persistence preserved confirmed data and existing session. Hook scope needs operator evidence.

python3 tests/resilience.py --mode failover --action-script scripts/stop-one.sh
{"observed_instances_before": 2, "successful_writes": 109, "failed_attempts": 1, "first_recovery_seconds": 2.465}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.

After that failover, docker inspect showed mtusi2026lab3-api-1 Exited (0),
hostname b555f8327eee. mtusi2026lab3-api-2 stayed up, hostname 03c3a0545628.
Exit code 0 means the process left on SIGTERM before the stop timeout.
