v0.6.53: permissions groups migration, docs updates#4259
Conversation
waleedlatif1
commented
Apr 22, 2026
- fix(migration): permission group migration error (fix(migration): permission group migration error #4258)
- fix(docs): update simstudio.ai URLs to sim.ai in SSO docs (fix(docs): update simstudio.ai URLs to sim.ai in SSO docs #4257)
* fix(docs): update simstudio.ai URLs to sim.ai in SSO docs * improvement(docs): remove plan defaults table from data retention docs * improvement(docs): consolidate self-hosting info at bottom of enterprise docs * improvement(docs): reduce callout and FAQ overuse in enterprise docs * improvement(docs): restore FAQs and genuine-gotcha callouts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview Docs: Refreshes Enterprise docs by removing Reviewed by Cursor Bugbot for commit 7941dcd. Configure here. |
Greptile SummaryThis PR fixes a partial-failure bug in the permission group migration by making every step idempotent ( Confidence Score: 5/5Safe to merge — the migration fix is well-reasoned and all doc changes are straightforward URL and content updates. No P0 or P1 findings. The idempotency guards are correct PostgreSQL patterns; the added DROP NOT NULL on organization_id is necessary for the clone-insert step and is safe since the column is dropped entirely in step 7. Doc changes are content-only with no logic. No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
S0["Step 0: Backfill org links\nfor grandfathered workspaces"]
S1["Step 1: ADD COLUMN IF NOT EXISTS\nworkspace_id (nullable)\n+ conditional FK constraints"]
S1b["Step 1b: DROP NOT NULL\non organization_id\n(allows NULL in clone rows)"]
S2["Step 2: CREATE TEMP TABLE\nclone_plan\n(source_id, cloned_id, workspace_id)"]
S3["Step 3: INSERT clone rows\n(workspace-scoped, org_id = NULL)"]
S4["Step 4: INSERT clone member rows"]
S5["Step 5: DELETE legacy\norg-scoped members + groups"]
S6["Step 6: SET NOT NULL\non workspace_id columns"]
S7["Step 7: DROP old constraints/indexes\nCREATE new unique indexes\n(all IF EXISTS / IF NOT EXISTS)"]
S8["Step 8: Sweep dead config keys"]
S0 --> S1 --> S1b --> S2 --> S3 --> S4 --> S5 --> S6 --> S7 --> S8
Reviews (1): Last reviewed commit: "fix(docs): update simstudio.ai URLs to s..." | Re-trigger Greptile |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes 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 7941dcd. Configure here.
| -- 1b. Relax NOT NULL on permission_group.organization_id before the data migration. | ||
| -- Step 3 inserts clone rows with organization_id = NULL to mark them as the new | ||
| -- workspace-scoped shape. This DROP NOT NULL is a no-op if already nullable. | ||
| ALTER TABLE "permission_group" ALTER COLUMN "organization_id" DROP NOT NULL;--> statement-breakpoint |
There was a problem hiding this comment.
Non-idempotent DROP NOT NULL breaks re-run safety
Medium Severity
The migration explicitly claims idempotency (lines 9–10), and every other DDL statement is carefully guarded with IF EXISTS/IF NOT EXISTS. However, step 1b's ALTER TABLE "permission_group" ALTER COLUMN "organization_id" DROP NOT NULL is unguarded. On a re-run after a successful first run, organization_id no longer exists (dropped by step 7), causing a "column does not exist" error. This needs to be wrapped in a DO $$ ... IF EXISTS block that checks information_schema.columns for the column before altering it.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 7941dcd. Configure here.

