From d1bcc09aa0f2fd984fef0f32a9dec735f3449a81 Mon Sep 17 00:00:00 2001 From: "Molecule AI Dev Engineer B (MiniMax)" Date: Mon, 8 Jun 2026 22:58:16 +0000 Subject: [PATCH] ci(handlers-postgres): widen required-tables guard to include workspace_auth_tokens + org_api_tokens (#2148) The table-presence guard in .gitea/workflows/handlers-postgres-integration.yml hard-fails the integration job if a load-bearing table is missing after migration replay. The previous list covered delegations / workspaces / activity_logs / pending_uploads / workspace_schedules, but the registry-auth TestIntegration_ suite (#2156 / #2148) also requires workspace_auth_tokens (migration 020) and org_api_tokens (migration 035). Without this guard, a silently-skipped migration 020 or 035 (the surrounding apply-all-or-skip loop suppresses migration failures) would let the auth tests run against missing tables and falsely green. This change makes the guard catch that class of regression. This is the CR2 action item flagged in the #2156 WIP body: 'consider adding workspace_auth_tokens + org_api_tokens to that sanity list so a skipped auth-table migration fails loud instead of skipping silently.' Closes the guard gap for #2148 independently of the #2156 test-suite WIP (cleanly-separable; the WIP test work remains the devops-engineer's lane). --- .gitea/workflows/handlers-postgres-integration.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/handlers-postgres-integration.yml b/.gitea/workflows/handlers-postgres-integration.yml index f88761bbe..c96852f6a 100644 --- a/.gitea/workflows/handlers-postgres-integration.yml +++ b/.gitea/workflows/handlers-postgres-integration.yml @@ -244,7 +244,12 @@ jobs: # fail if any didn't land — that would be a real regression we # want loud. # workspace_schedules added for the #2149 scheduler integration tests. - for tbl in delegations workspaces activity_logs pending_uploads workspace_schedules; do + # workspace_auth_tokens + org_api_tokens added for the #2156 + # registry-auth TestIntegration_ suite (#2148). Without this + # guard, a silently-skipped migration 020 (workspace_auth_tokens) + # or 035 (org_api_tokens) would let the auth tests run against + # missing tables and falsely green. + for tbl in delegations workspaces activity_logs pending_uploads workspace_schedules workspace_auth_tokens org_api_tokens; do if ! psql -h "${PG_HOST}" -U postgres -d molecule -tA \ -c "SELECT 1 FROM information_schema.tables WHERE table_name = '$tbl'" \ | grep -q 1; then -- 2.52.0