test(e2e): cover enterprise integrations#5868
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryHigh Risk Overview E2E Step 6b wires a loopback Streamable HTTP MCP fake ( MCP product tweaks: connection test reports Reviewed by Cursor Bugbot for commit f4c52c4. Bugbot is set up for automated code reviews on this repo. Configure here. |
Greptile SummaryThis PR expands enterprise integration management and its end-to-end coverage. The main changes are:
Confidence Score: 4/5The migration uniqueness window and the Sim runtime dependency need fixes before merging.
packages/db/migrations/0266_zippy_the_phantom.sql; apps/sim/package.json Important Files Changed
Sequence DiagramsequenceDiagram
participant Admin as Organization Admin
participant API as SSO Facade
participant Guard as Authorization Guards
participant DB as PostgreSQL
participant Auth as Better Auth
Admin->>API: Manage SSO provider
API->>Guard: Check session, role, plan, and ownership
Guard->>DB: Load membership and provider
DB-->>Guard: Organization-scoped context
API->>DB: Check provider and domain availability
API->>Auth: Run guarded mutation
Auth->>DB: Persist provider state
DB-->>Auth: Updated verification state
Auth-->>API: Mutation result
API-->>Admin: Redacted provider response
Reviews (1): Last reviewed commit: "test(e2e): cover enterprise integrations" | Re-trigger Greptile |
| DROP INDEX CONCURRENTLY IF EXISTS "sso_provider_provider_id_unique";--> statement-breakpoint | ||
| CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS "sso_provider_provider_id_unique" ON "sso_provider" USING btree ("provider_id");--> statement-breakpoint | ||
| DROP INDEX CONCURRENTLY IF EXISTS "sso_provider_domain_lower_unique";--> statement-breakpoint | ||
| CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS "sso_provider_domain_lower_unique" ON "sso_provider" USING btree (lower("domain"));--> statement-breakpoint | ||
| DROP INDEX CONCURRENTLY IF EXISTS "sso_provider_organization_id_unique";--> statement-breakpoint | ||
| CREATE UNIQUE INDEX CONCURRENTLY IF NOT EXISTS "sso_provider_organization_id_unique" ON "sso_provider" USING btree ("organization_id") WHERE "organization_id" IS NOT NULL;--> statement-breakpoint |
There was a problem hiding this comment.
Uniqueness Gap During Index Rebuild
These statements drop the existing unique indexes before their replacements finish building. If SSO writes continue during that window, concurrent registrations can persist duplicate provider IDs, domains, or organization IDs; the subsequent unique-index build then fails and leaves the rollout incomplete. Keep the old indexes active until replacement indexes are valid, or enforce the documented write quiescence for the entire sequence.
| @@ -1,28 +1,35 @@ | |||
| import { domainToASCII } from 'node:url' | |||
| import { parse } from 'tldts' | |||
There was a problem hiding this comment.
Runtime Dependency Belongs To Sibling Package
This production module imports tldts, but the PR declares that dependency only in packages/db/package.json. A pruned or isolated Sim installation will not include a sibling workspace's dependency, so loading this SSO module fails with an unresolved package and auth-dependent routes cannot start. Declare tldts in apps/sim/package.json as well.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit a499ecd. Configure here.
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
1a631d9
into
e2e/settings-playwright

Summary
Validation
@sim/dbtypecheck passesgit diff --checkpassLocal browser prerequisite
The repeated Step 6b Playwright command is ready but cannot run on this machine until
mcp.e2e.sim.airesolves to loopback. The runner fails closed and reports the required one-time mapping:CI installs the mapping before running the settings suite.
Follow-up boundary
Better Auth 1.6.13's pre-existing OIDC callback transport does not expose a pinned-fetch injection hook. Callback-time DNS-rebinding hardening should be tracked separately rather than introducing an authentication-protocol fork in this E2E step.