Steps to reproduce:
- Go to a wiki with temporary accounts enabled, e.g. Beta Wikidata
- Be logged out (e.g. in a private window)
- Make a Wikidata edit, e.g. create a new item
- Look at the watchlist table (for Beta Wikidata: SSH to deployment-deploy04.deployment-prep.eqiad1.wikimedia.cloud, then run mwscript mysql wikidatawiki)
MariaDB [wikidatawiki]> SELECT * FROM watchlist WHERE wl_namespace = 0 AND wl_title = 'Q629218'; +---------+---------+--------------+----------+--------------------------+ | wl_id | wl_user | wl_namespace | wl_title | wl_notificationtimestamp | +---------+---------+--------------+----------+--------------------------+ | 3806500 | 7903 | 0 | Q629218 | NULL | +---------+---------+--------------+----------+--------------------------+ 1 row in set (0.001 sec) MariaDB [wikidatawiki]> SELECT user_id, user_name, user_is_temp FROM user WHERE user_id = 7903; +---------+-------------+--------------+ | user_id | user_name | user_is_temp | +---------+-------------+--------------+ | 7903 | ~2024-15416 | 1 | +---------+-------------+--------------+ 1 row in set (0.001 sec)
Expected result: no watchlist row, as temp accounts don’t have a functional watchlist (going to Special:Watchlist just sends you to the login page)
Actual result: a useless watchlist row
This should probably be filtered out in WatchlistManager and/or WatchedItemStore, just like watchlist entries for unregistered users are already silently dropped.
I haven’t been able to reproduce this for normal wikitext edits, by the way – I created this random talk page, and the temporary account for that (id 7905) has no watchlist rows. So there might be some filter in EditPage(?) that could potentially be removed once WatchlistManager/WatchedItemStore do equivalent filtering.