date: 2026-10-29T20:15:15Z  commit: a02d442
== before: api replicas (hostname = X-Instance-Id), state, StartedAt, FinishedAt
25e43a2e28f7 running started=2026-10-29T20:14:08.345060846Z finished=0001-01-01T00:00:00Z
87e8bd8ee0aa running started=2026-10-29T20:15:13.832984418Z finished=2026-10-29T20:15:00.794959093Z
$ make test-failover ACTION_SCRIPT=scripts/stop-one.sh
python3 tests/resilience.py --mode failover --action-script "scripts/stop-one.sh" --base-url "http://127.0.0.1:18083" 
Executing explicit failover hook; hook output suppressed to avoid leaking secrets.
{"observed_instances_before": 2, "successful_writes": 135, "failed_attempts": 0, "first_recovery_seconds": 2.684}
PASS: failover preserved confirmed data and existing session. Hook scope needs operator evidence.
== after: api replicas
25e43a2e28f7 exited started=2026-10-29T20:14:08.345060846Z finished=2026-10-29T20:15:18.892558504Z
87e8bd8ee0aa running started=2026-10-29T20:15:13.832984418Z finished=2026-10-29T20:15:00.794959093Z
== stopped replica: 25e43a2e28f7; shutdown: signal, drain window with readiness 503, close, exit
{"event":"Handling signal: term","level":"info","ts":"2026-10-29T20:15:16.447854Z"}
{"event":"Draining for 2.0 s","level":"info","ts":"2026-10-29T20:15:16.498912Z"}
{"event":"Draining for 2.0 s","level":"info","ts":"2026-10-29T20:15:16.542490Z"}
{"method":"GET","route":"/health/ready","status":503,"request_id":"179ff54260364a2b928f372075540925","duration_ms":0.339,"event":"request.handled","level":"info","ts":"2026-10-29T20:15:16.712231Z"}
{"method":"GET","route":"/health/ready","status":503,"request_id":"fb3e3998b52c4d26ae9d1abb17a16b40","duration_ms":0.428,"event":"request.handled","level":"info","ts":"2026-10-29T20:15:16.866873Z"}
{"method":"GET","route":"/health/ready","status":503,"request_id":"e09e16e27d6c48f8962124d4286712fd","duration_ms":0.417,"event":"request.handled","level":"info","ts":"2026-10-29T20:15:17.372520Z"}
{"event":"Shutting down","level":"info","ts":"2026-10-29T20:15:18.502021Z"}
{"event":"Shutting down","level":"info","ts":"2026-10-29T20:15:18.547379Z"}
{"event":"service.stopped","level":"info","ts":"2026-10-29T20:15:18.609866Z"}
{"event":"Finished server process [8]","level":"info","ts":"2026-10-29T20:15:18.610205Z"}
{"event":"service.stopped","level":"info","ts":"2026-10-29T20:15:18.655473Z"}
{"event":"Finished server process [7]","level":"info","ts":"2026-10-29T20:15:18.655880Z"}
{"event":"Worker (pid:7) was sent SIGTERM!","level":"info","ts":"2026-10-29T20:15:18.706016Z"}
{"event":"Worker (pid:8) was sent SIGTERM!","level":"info","ts":"2026-10-29T20:15:18.706192Z"}
{"event":"Shutting down: Master","level":"info","ts":"2026-10-29T20:15:18.808259Z"}
$ scripts/restore.sh
 Container mtusi2026lab3-api-2  Running
 Container mtusi2026lab3-api-1  Starting
 Container mtusi2026lab3-api-1  Started
 Container mtusi2026lab3-api-2  Waiting
 Container mtusi2026lab3-api-1  Waiting
 Container mtusi2026lab3-api-2  Healthy
 Container mtusi2026lab3-api-1  Healthy
== after restore
25e43a2e28f7 running started=2026-10-29T20:15:31.818157218Z finished=2026-10-29T20:15:18.892558504Z
87e8bd8ee0aa running started=2026-10-29T20:15:13.832984418Z finished=2026-10-29T20:15:00.794959093Z
