Fix PostgreSQL locking during SSO provisioning [skip ci] #29

Merged
avm merged 1 commits from hotfix/sso-optional-email-main-20260928 into main 2026-09-28 15:07:38 +03:00
Owner

PostgreSQL rejects FOR UPDATE over the nullable profile join, causing a 500 after JWT validation. Lock only the SsoIdentity row and keep eager profile loading. 31 SSO tests pass locally. The exact one-line fix was tested in an isolated process against dev PostgreSQL: email-less users, active session, replay denial, saved email, explicit binding, permissions and inactive users; all probe writes rolled back. No additional migration.

Release: manually build exact merged commits, pin image digests, validate migration plan and readiness. Main deployment preserves its existing database and media. New sources stay dev-only. Automatic build/deploy skipped to avoid concurrent releases.

Focused diff reviewed for account collisions, missing email, nullable schema, local-account compatibility and unchanged authorization checks.

PostgreSQL rejects FOR UPDATE over the nullable profile join, causing a 500 after JWT validation. Lock only the SsoIdentity row and keep eager profile loading. 31 SSO tests pass locally. The exact one-line fix was tested in an isolated process against dev PostgreSQL: email-less users, active session, replay denial, saved email, explicit binding, permissions and inactive users; all probe writes rolled back. No additional migration. Release: manually build exact merged commits, pin image digests, validate migration plan and readiness. Main deployment preserves its existing database and media. New sources stay dev-only. Automatic build/deploy skipped to avoid concurrent releases. Focused diff reviewed for account collisions, missing email, nullable schema, local-account compatibility and unchanged authorization checks.
avm added 1 commit 2026-09-28 15:07:20 +03:00
avm merged commit 361efe74df into main 2026-09-28 15:07:38 +03:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: avm/state-corp-backend#29