forked from mtusi2026/mtusi2026lab3
compose up --wait returns once lb is healthy, and lb is healthy with one replica in rotation; the second one joins after rise 2 checks, about 2.5 s later, so make test-failover right after make up could see a single X-Instance-Id. make up now runs scripts/lb-wait.sh, which waits for as many UP servers as there are running api containers. The CI non-root step compared the third column of docker compose top with 0, but the daemon prints the user name there (root), so it could never fail. It now reads the numeric uid of every process of every container with docker top -eo pid,uid,comm (Docker needs the PID column); a throwaway root container makes the check fail. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27