test(ci): isolate Cloudflare Workers test services#2673
Conversation
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
Comment |
Merging this PR will not alter performance
Comparing Footnotes
|
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_7b222e61-944d-4281-a126-8cda39a7f000) |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_3662b691-1f08-47dd-988e-86a3d7df108e) |
|
@coderabbitai review |
✅ Action performedReview finished.
|
86b2fdc to
8d37e18
Compare
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_dfded065-0d86-447c-8038-cbfdd4731f11) |
d30a7d2 to
c525c2e
Compare
|
|
@coderabbitai review |
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_5375f7eb-b255-449c-9910-36e9f24742a1) |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Risk: medium. Not approving because Cursor Bugbot skipped (usage limit reached) and did not complete its review, and this PR includes backend and migration changes beyond test-only scope. Human review is still needed; Dalanir and WcaleNieWolny are already assigned as reviewers.
Sent by Cursor Approval Agent: Pull Request Approver External





Summary
process_all_cron_tasks, drain already-submitted pg_net callbacks, and purge seeded PGMQ work.Test plan
bun test:db(Tinbase) — 18 files / 252 tests passed.bunx tsc --ignoreConfig --noEmit --skipLibCheck --target ESNext --module NodeNext --moduleResolution NodeNext scripts/quiesce-test-scheduler.tsbunx eslint --no-ignore scripts/quiesce-test-scheduler.ts tests/audit-logs.test.tsbunx vitest run tests/organization-put-stripe-sync.unit.test.ts— 11 tests passed.Screenshots
Not applicable — backend and CI test-isolation changes only.
Checklist
bun run lint:backend && bun run lintin CI.Note
Medium Risk
Touches organization PUT (Stripe rollback path), API-key middleware routing, and queue/background execution—important areas—but changes are scoped to test isolation and explicit primary-DB writes with added unit/SQL coverage.
Overview
CI integration jobs now run isolated Supabase worktrees (per-job port bands, concurrency groups, scoped
supabase-worktree.tsfor start/serve/test/stop) and export dynamic health/DB URLs instead of hard-coded127.0.0.1:54321. Backend and Cloudflare shards get matching worker port offsets and separate Wrangler persist dirs; Cloudflare tests run throughsupabase:with-env.A new
quiesce-test-schedulerstep stops autonomous cron/pg_net/PGMQ work before Edge/Workers boot so tests don’t race startup traffic.CAPGO_PREVENT_BACKGROUND_FUNCTIONSand queuewait_for_completion/x-capgo-wait-for-completion(only honored with internal API secret) make background work deterministic in CI.Runtime fixes: org updates go through primary Postgres with JWT/API-key audit context; root bundle and app POST mutations resolve API keys on Postgres (not replica). S3 adds
S3_REWRITE_LOCAL_ENDPOINT=falsefor isolated workers; functions get worktree-specific.envfor storage endpoints. SQL migration narrows org tombstone locking to per-org advisory locks (not global table lock).Tests: widespread switch from
fetchWithRetrytofetchTestRequest,createIsolatedSeedAppOptionsfor CLI suites, removal of flaky retry helpers, and CI splits for serial CLI/read-replica cases.Reviewed by Cursor Bugbot for commit 4d92e90. Bugbot is set up for automated code reviews on this repo. Configure here.