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

Merged
avm merged 1 commits from hotfix/sso-optional-email-dev-20260928 into dev 2026-09-28 15:07:40 +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. 37 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. 37 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:22 +03:00
avm merged commit 233303fc6b into dev 2026-09-28 15:07:40 +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#30