From ff05db73670a92ed4cbf029bc79b099b3e10a35f Mon Sep 17 00:00:00 2001 From: Kpa-clawbot Date: Tue, 21 Apr 2026 09:23:50 -0700 Subject: [PATCH] =?UTF-8?q?ci:=20fix=20staging=20smoke=20test=20port=20?= =?UTF-8?q?=E2=80=94=20read=20STAGING=5FGO=5FHTTP=5FPORT,=20not=20hardcode?= =?UTF-8?q?d=2082=20(#854)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Problem The "Deploy Staging" job's Smoke Test always fails with `Staging /api/stats did not return engine field`. Root cause: the step hardcodes `http://localhost:82/api/stats`, but `docker-compose.staging.yml:21` publishes the container on `${STAGING_GO_HTTP_PORT:-80}:80`. Default is port 80, not 82. curl gets ECONNREFUSED, `-sf` swallows the error, `grep -q engine` sees empty input → failure. Verified on staging VM: `ss -lntp` shows only `:80` listening; `docker ps` confirms `0.0.0.0:80->80/tcp`. A `curl http://localhost:82` returns connection-refused. ## Fix Read `STAGING_GO_HTTP_PORT` (same default as compose) so the smoke test tracks the port the container was actually launched on. Failure message now includes the resolved port to make future port mismatches self-diagnosing. ## Tested Logic only — the curl + grep pattern is unchanged. If any CI env override sets `STAGING_GO_HTTP_PORT`, the smoke test now follows it. Co-authored-by: Kpa-clawbot --- .github/workflows/deploy.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 761a4fbd..485465b3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -432,10 +432,11 @@ jobs: - name: Smoke test staging API run: | - if curl -sf http://localhost:82/api/stats | grep -q engine; then + PORT="${STAGING_GO_HTTP_PORT:-80}" + if curl -sf "http://localhost:${PORT}/api/stats" | grep -q engine; then echo "Staging verified — engine field present ✅" else - echo "Staging /api/stats did not return engine field" + echo "Staging /api/stats did not return engine field (port ${PORT})" exit 1 fi