Skip to content

[comp] Production Deploy#2299

Merged
tofikwest merged 4 commits intoreleasefrom
main
Mar 14, 2026
Merged

[comp] Production Deploy#2299
tofikwest merged 4 commits intoreleasefrom
main

Conversation

@github-actions
Copy link
Contributor

This is an automated pull request to release the candidate branch into production, which will trigger a deployment.
It was created by the [Production PR] action.

github-actions bot and others added 2 commits March 13, 2026 17:46
…tegration and external user ID support (#2298)

- Added externalUserId and externalUserSource fields to Member model and database schema.
- Updated SyncController to utilize new RampUser and RampUserStatus types.
- Implemented retry logic for fetching Ramp users to handle API rate limits and errors.
- Introduced employeeSyncCheck for auditing and syncing users from Ramp.
- Filtered out non-syncable user statuses during synchronization process.

Co-authored-by: Tofik Hasanov <annexcies@gmail.com>
Co-authored-by: Tofik Hasanov <72318342+tofikwest@users.noreply.github.com>
@cursor
Copy link

cursor bot commented Mar 13, 2026

PR Summary

Medium Risk
Changes member provisioning/deactivation logic for Ramp sync and adds new Member fields, which could impact org membership state if matching/backfill logic is incorrect. Also adds retry logic around Ramp API calls, reducing transient failures but altering request behavior.

Overview
Improves Ramp employee sync by introducing Member.externalUserId/externalUserSource to match members by Ramp user ID (handling email changes), backfilling IDs on existing members, and preventing auto-deactivation of privileged roles (owner/admin/auditor).

Hardens Ramp user fetching with retries/backoff for 429/5xx, expands Ramp user typing/shared types via @comp/integration-platform, and skips non-syncable Ramp statuses.

Adds a new Ramp integration check (employee-sync) that fetches and records a full employee roster snapshot (active/inactive/suspended) as check evidence; updates Ramp manifest to advertise checks capability. Updates test auth member mocks for the new Member fields.

Written by Cursor Bugbot for commit 8c84f19. This will update automatically on new commits. Configure here.

@vercel
Copy link

vercel bot commented Mar 13, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
app (staging) Ready Ready Preview, Comment Mar 14, 2026 8:16pm
portal (staging) Ready Ready Preview, Comment Mar 14, 2026 8:16pm

Request Review

`Skipping ${skippedStatuses.length} Ramp users with non-syncable statuses (INVITE_PENDING, INVITE_EXPIRED, USER_ONBOARDING)`,
);
}

Copy link

Choose a reason for hiding this comment

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

Non-syncable users logged but never filtered out

High Severity

The code at lines 1173–1186 identifies Ramp users with non-syncable statuses (INVITE_PENDING, INVITE_EXPIRED, USER_ONBOARDING) and logs "Skipping" them, but never actually filters the users array. The unfiltered users feeds into rampDomains (line 1354), so non-syncable users' emails end up in no email set (activeEmails, inactiveEmails, suspendedEmails), causing isRemoved to be true for matching org members — incorrectly deactivating them. The companion employee-sync.ts check correctly filters with allUsers.filter(...) into a new syncableUsers array.

Additional Locations (2)
Fix in Cursor Fix in Web

…d session cookies for authentication (#2300)

Co-authored-by: Tofik Hasanov <annexcies@gmail.com>
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

There are 2 total unresolved issues (including 1 from previous review).

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

) {
continue;
}

Copy link

Choose a reason for hiding this comment

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

Deactivation undoes external-ID-based email change handling

High Severity

The import phase matches members by externalUserId to "handle email changes" (per the comment), but the deactivation phase only matches by email. If a Ramp user changed their email, the import phase correctly finds the member via external ID and skips it as "Already a member" — without updating the user's email on the user record. Then the deactivation loop checks the member's old email against activeEmails, doesn't find it, and deactivates the member as USER_MISSING. This undoes the external ID matching from moments earlier, making the email-change handling counterproductive — a regression from the pre-PR behavior where at least a new member with the new email would have been created.

Additional Locations (1)
Fix in Cursor Fix in Web

@tofikwest tofikwest merged commit 53388e8 into release Mar 14, 2026
9 of 10 checks passed
@claudfuen
Copy link
Contributor

🎉 This PR is included in version 3.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants