When a notification type is changed from being an alert to a message (e.g. because of T123018), we will get glitchy cross-wiki notifications behavior:
- User receives a thanks notification on frwiki. Thanks is an alert, so we store (frwiki, 1, 0) in the database
- Thanks changes from being an alert to being a message
- User views notifications on enwiki.
- In the alerts section, a cross-wiki bundle appears with "1 alert from frwiki". Opening this bundle will show nothing, because there are no alerts on frwiki.
- In the messages section, no cross-wiki bundle appears, so the user cannot access the thanks notification at all.
- A maintenance script rebuilds the table, or the user receives another frwiki notification; this changes the row to (frwiki, 0, 1) and things work correctly again.
The intermediate state in #3 is a problem, and would potentially persist for weeks. We could work around this by checking if a transition config flag is set, and if it is, looking at both alerts and messages on each foreign wiki (even if the table has a 0 in that column). This would be hard to do with our current client-side fetch setup, but easier with T130636: Cross-wiki notifications: Make cross-wiki API requests server-side.