From a5105731727b3c08690d394c9a400a8ed34dbf13 Mon Sep 17 00:00:00 2001 From: Hongming Wang Date: Tue, 21 Apr 2026 07:40:03 -0700 Subject: [PATCH] fix(e2e): poll instance_status not status in staging harness MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /cp/admin/orgs exposes `instance_status` (COALESCE'd from org_instances.status), NOT a top-level `status` field. The harness polled the wrong field and always read empty → timed out at 15min on a tenant that had actually provisioned successfully (confirmed 2026-04-21T14:22Z: EC2 launched, canary ok, but harness never saw status=running). No code change to the admin API — the field has never been named `status`. The harness just had a typo that happened to type-check (the Go struct hasn't changed, only the sh/py polling was wrong). Now the harness correctly reads `instance_status` and the main provision poll loop terminates on the expected transition. Co-Authored-By: Claude Opus 4.7 (1M context) --- tests/e2e/test_staging_full_saas.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/e2e/test_staging_full_saas.sh b/tests/e2e/test_staging_full_saas.sh index bb8bc087..77b6f915 100755 --- a/tests/e2e/test_staging_full_saas.sh +++ b/tests/e2e/test_staging_full_saas.sh @@ -142,12 +142,17 @@ while true; do fail "Tenant provisioning timed out after ${PROVISION_TIMEOUT_SECS}s (last: $LAST_STATUS)" fi LIST_JSON=$(admin_call GET /cp/admin/orgs 2>/dev/null || echo '{"orgs":[]}') + # NOTE: /cp/admin/orgs exposes 'instance_status' (from org_instances.status), + # NOT 'status'. Field was bug-fixed 2026-04-21 after harness timed out on a + # fully-provisioned tenant because the polled field was always ''. The + # admin handler struct intentionally has no top-level `status` — the org + # row's status is derivable via instance_status for ops. STATUS=$(echo "$LIST_JSON" | python3 -c " import json, sys d = json.load(sys.stdin) for o in d.get('orgs', []): if o.get('slug') == '$SLUG': - print(o.get('status', '')) + print(o.get('instance_status', '')) sys.exit(0) print('') " 2>/dev/null || echo "")