Title
Attach username availability notification tracking to usernames, not userids.
Short, concise description of the idea
Currently, if an account is renamed, any "this username is now available for renaming to" notifications will apply to the new username, not the old as I believe they should.
Full description of the idea
Say that owner of account bob, for some reason, wants to create an account named "alice" or to rename his existing account to "alice". However, there is already an account called "alice", so bob instead requests to be notified if and when username "alice" becomes available.
Later, account alice gets renamed, which can happen for 2 reasons:
- owner of account alice decides to rename it to carol.
- owner of account alice also owns account carol, and decides tp rename carol to alice, which causes alice to be autorenamed to something like "ex_alice271828".
In both cases, if that account becomes available at some point after the rename, bob will be notified about a username that's not the one he asked tracked, and maybe can't even use, even if he was tempted to. (I believe the ex_* usernames are reserved.) Worse, the username bob really wanted may have become available after the rename, but bob will never get told, unless (maybe) indirectly, when he gets notified about a username he never asked for.
Instead of that, the tracking subscription should be kept attached to the username itself, perhaps by changing the subscription data when a rename happens for the target account, or by adding a "someone is tracking that username's availability" flag to the username-to-userid mapping table. If that retargeting isn't possible for performance reasons, then the tracking request should be cancelled at the time of the rename, and bob notified that his username tracking request likely became pointless following the rename, instead of being left to find that out a long time after the rename (if ever) when he receives a notification for a Martian username.
An ordered list of benefits
- More sensible specification
- Less confused users
- Fewer confused users
- Better adherence to the POLA
An ordered list of problems/issues involved
- (Maybe) slightly more complex account renaming