forked from mtusi2026/mtusi2026lab2
The /health/ready route imported the PostgreSQL adapter and kept the drain flag in the HTTP layer, which gunicorn_conf imported to raise it. Readiness is now a port of the shared application layer; its adapter in shared/infrastructure checks the per-process drain flag and pings PostgreSQL, and PlatformProvider assembles it. The route only knows the port, and gunicorn_conf raises the flag through the infrastructure module. Another critical dependency now changes the adapter and the provider, not the HTTP layer. The drain window was logged by a uvicorn logger with a printf string; it is now the service.draining event of a StructlogLogger with the same fields as the application, and failover-evidence looks for it. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01V1d3RLHNBBMA6UqBLLJv27