-
Notifications
You must be signed in to change notification settings - Fork 9
Normalize usernames for safe, indexed user lookup #185
Copy link
Copy link
Closed
Labels
area: authAuthentication, sessions, identity, and authorizationAuthentication, sessions, identity, and authorizationarea: dataMongoDB, PostgreSQL, migrations, backfills, and data integrityMongoDB, PostgreSQL, migrations, backfills, and data integrityarea: socialFriends, presence, invitations, and notificationsFriends, presence, invitations, and notificationsenhancementNew feature or requestNew feature or requestpriority: P1High-priority work for the next delivery cycleHigh-priority work for the next delivery cycle
Milestone
Description
Metadata
Metadata
Assignees
Labels
area: authAuthentication, sessions, identity, and authorizationAuthentication, sessions, identity, and authorizationarea: dataMongoDB, PostgreSQL, migrations, backfills, and data integrityMongoDB, PostgreSQL, migrations, backfills, and data integrityarea: socialFriends, presence, invitations, and notificationsFriends, presence, invitations, and notificationsenhancementNew feature or requestNew feature or requestpriority: P1High-priority work for the next delivery cycleHigh-priority work for the next delivery cycle
Goal
Make usernames a reliable, privacy-safe key for friend discovery before search and public profiles depend on them.
Why this is needed
The current username update path performs a case-insensitive regular-expression lookup without a database uniqueness guarantee. Social search needs deterministic casing, safe query handling, predictable conflicts, and an indexed prefix lookup.
Product contract
Acceptance criteria
400for invalid input and409for a case-insensitive conflict.Non-goals
Dependencies