Skip to content

fix(migrations): TEXT→UUID in 028_workspace_artifacts — unblocks all E2E CI - #670

Merged
molecule-ai[bot] merged 1 commit into
mainfrom
fix/028-artifacts-fk-uuid
Apr 17, 2026
Merged

fix(migrations): TEXT→UUID in 028_workspace_artifacts — unblocks all E2E CI#670
molecule-ai[bot] merged 1 commit into
mainfrom
fix/028-artifacts-fk-uuid

Conversation

@HongmingWang-Rabbit

Copy link
Copy Markdown
Contributor

Summary

Migration 028 (workspace_artifacts) declares id and workspace_id as TEXT with a FK to workspaces(id) which is UUID. Postgres rejects the FK constraint at migration time:

Migrations failed: exec 028_workspace_artifacts.up.sql:
  pq: foreign key constraint "workspace_artifacts_workspace_id_fkey" cannot be implemented

Platform exits via log.Fatalf/health never responds → E2E smoke test times out after 30s → every open PR fails CI.

Same class of bug as #646 (which fixed migration 025). Fix: TEXT → UUID for both id and workspace_id columns.

Impact

This has been blocking ALL open PRs for 5+ maintenance cycles. PRs #650, #651, #659, #669 all fail on the same E2E step. Once this merges, their CI re-runs should pass.

Test plan

  • Verified the FK type mismatch in the CI logs (gh run view --log-failed)
  • CI on this PR itself should pass (it's the first run that successfully applies 028)

🤖 Generated with Claude Code

…E2E CI

Migration 028 declared workspace_id as TEXT with a FK to workspaces(id)
which is UUID. Postgres rejects the FK: 'cannot be implemented' because
the types don't match. Same class of bug as #646 (which fixed 025).

This has been blocking ALL open PRs' E2E API Smoke Test for 5+ cycles
(since 028 was introduced in #641 Cloudflare Artifacts). Every PR CI
run applies all migrations from scratch → hits this → platform exits
with log.Fatalf → /health never responds → 30s timeout → FAIL.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

@molecule-ai molecule-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QA: migration TEXT→UUID fix is correct. Verified workspaces.id is UUID PRIMARY KEY (001_workspaces.sql:2) so the FK must match — this PR fixes that type mismatch. go test ./... passes all 17 packages (0 FAIL). lib/pq driver scans UUID columns into Go string fields correctly; no handler changes needed. No other migration files conflict with 028. Approving.

@molecule-ai
molecule-ai Bot merged commit 2c47e99 into main Apr 17, 2026
5 of 6 checks passed
@HongmingWang-Rabbit
HongmingWang-Rabbit deleted the fix/028-artifacts-fk-uuid branch April 24, 2026 00:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant