Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: ASSERTIVE Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoCentralize membership writes via ordered, transaction-aware MembershipWriter
AI Description
Diagram
High-Level Assessment
Files changed (57)
|
Code Review by Qodo
1.
|
a69e888 to
8b49161
Compare
5a65e44 to
7ee154d
Compare
7ee154d to
9f175b2
Compare
Change summary\n\n_Human-authored summary required before merge._\n\n## Technical summary\n\n- Introduce the immutable membership-write protocol, deterministic lock planning, and transaction-aware execution.\n- Route direct membership, ownership, provisioning, default-team, scope-deletion, and shared-key authorization paths through managed writers.\n- Preserve existing public contracts while adding bounded acquisition, persisted authorization rechecks, profile-version anchoring, concurrency protection, and sanitized retry responses.\n\n## Verification\n\n- 289 affected service, repository, endpoint, and structural tests passed.\n- 15 SQLite membership and scope-deletion tests passed.\n- 47 live PostgreSQL registration, BYOK, locking, and concurrency tests passed.\n- Ruff, compileall, and git diff checks passed.\n- Bandit medium/high scan reported zero findings; no new all-severity finding was introduced.\n\n## Tracking\n\n- Backlog: TASK-13001.2\n
Summary by cubic
Centralizes all org/team membership mutations and reads behind an ordered, transaction-aware
MembershipWriterand forbids raw writes (including COPY) to membership tables. This reduces deadlocks and write skew, preserves existing APIs, and returns retryable 503s when the auth DB is busy. Addresses TASK-13001.2.New Features
auth, invites, BYOK, and registration flows.org_membersandteam_membersand repairs their timestamps via managed paths.Migration
org_members/team_membersdirectly; call theMembershipWritervia repos/services with anActorMembershipWriteContextorTrustedMembershipWriteContext.Written for commit 9f175b2. Summary will update on new commits.