Repository navigation
fix(sim-links): hand off a departing member's links to the successor - #9597
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
[Medium impact] The PR appears safe to merge; no new actionable issues remain. SummaryThis PR hands a departing member’s Sim links to the organization’s successor owner.
Reviews (4) · Last reviewed commit: "fix(sim-links): hold the creator's membe..." · Reviewed by Greptile |
There was a problem hiding this comment.
All reported issues were addressed across 2 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
1 issue found across 3 files
Confidence score: 3/5
account-deletion.tscan deadlock concurrent account deletions when it holds a successor member lock while waiting for that successor’s user lock. Avoid waiting on the user lock while holding the member lock.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. When an issue isn't valid or won't be fixed in this PR, reply in its thread with the reason and then resolve the thread. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/sim/lib/users/account-deletion.ts">
<violation number="1" location="apps/sim/lib/users/account-deletion.ts:969">
P1: This call can deadlock concurrent account deletions: it discovers Sim-link-only organizations after the user barrier, then holds a successor member lock while waiting for that successor’s user lock. Acquire these organization/member locks before the user barrier, or avoid holding the member lock while waiting for the successor user.
(Based on your team's feedback about account-deletion lock ordering.)</violation>
</file>
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
|
@cubic-dev-ai review this PR |
@waleedlatif1 I have started the AI code review. It will take a few minutes to complete. |
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Turn on auto-fix | Re-trigger cubic
Summary
sim_linkreassignOrganizationSharedResourcesTxnow reassigns the departing member's links in that organization to the same successor, in the same transaction, matching the permission-group handoffType of Change
Testing
shared-resource-handoff.integration.ts: a removed member's link moves to the owner while their link in another organization is untouched. Red with the fix reverted (1 failed | 45 passed), green with it (46 passed)bun run lint, pre-pushtype-checkChecklist
test-auditauthoring gate)