The Run Cloud Run staging integration tests job runs test_live_calculate.py first, and test_live_calculate_us_1 posts a household calculate directly (api_client.post) with a 90s client timeout and no retry. The staging Cloud Run service is scale-to-zero, so the freshly deployed candidate is cold; the ~200s US tax-benefit-system import loses the race to the 90s timeout and the request fails with httpx.ReadTimeout.
Observed on release run 30014420432 (2026-07-23): 1 failed, 6 passed, the one failure being test_live_calculate_us_1. The polling-based tests survive because _poll_live_endpoint retries on httpx.RequestError; the direct calculate calls do not.
The failure cascades: integration-tests-staging-cloud-run → promote-cloud-run-staging (skipped) → ensure-production-model-version-aligns-with-sim-api (skipped) → deploy-cloud-run-candidate (prod Cloud Run, skipped). So a cold-start flake in a staging smoke test silently blocks the production Cloud Run deploy.
Fix: add an explicit readiness gate that runs first and polls /readiness-check until the deployed revision is warm, so every subsequent test hits a ready instance.
The
Run Cloud Run staging integration testsjob runstest_live_calculate.pyfirst, andtest_live_calculate_us_1posts a household calculate directly (api_client.post) with a 90s client timeout and no retry. The staging Cloud Run service is scale-to-zero, so the freshly deployed candidate is cold; the ~200s US tax-benefit-system import loses the race to the 90s timeout and the request fails withhttpx.ReadTimeout.Observed on release run 30014420432 (2026-07-23):
1 failed, 6 passed, the one failure beingtest_live_calculate_us_1. The polling-based tests survive because_poll_live_endpointretries onhttpx.RequestError; the direct calculate calls do not.The failure cascades:
integration-tests-staging-cloud-run→promote-cloud-run-staging(skipped) →ensure-production-model-version-aligns-with-sim-api(skipped) →deploy-cloud-run-candidate(prod Cloud Run, skipped). So a cold-start flake in a staging smoke test silently blocks the production Cloud Run deploy.Fix: add an explicit readiness gate that runs first and polls
/readiness-checkuntil the deployed revision is warm, so every subsequent test hits a ready instance.