Spec name matching and sorting for a global directory
Your task
Your Java backend serves an international app. Usernames must be unique ignoring case, and the people directory lists display names in alphabetical order. A coding agent will write both. Last month brought 2 bug reports: a user in Turkey could not sign in with the username they registered, and someone registered strasse while Straße already existed.
Write the spec you would hand the agent.
What you know:
- Java 21, and the team may add ICU4J
- servers in different regions run with different default locales
- usernames are stored as typed, and display names may be in any script
- each viewer sees the directory in their own language
Then, in a few sentences: what bug does "compare names case-insensitively and sort them alphabetically" ship?