Page MenuHomePhabricator

Changes to Web2Cit monitor result pages do not trigger email notifications
Open, Needs TriagePublic

Description

Web2Cit collaborators interested in following translation test changes for a given domain are instructed to add the corresponding Web2Cit monitor result page to their watchlist, because these pages are designed in such a way that they only change if translation test results change.

However, although such changes do appear in https://meta.wikimedia.org/wiki/Special:Watchlist, they do not seem to trigger email notifications.

This may be because Web2cit-monitor-bot editions are marked as minor edits, and bot editions marked as minor edits would not trigger email notifications, even if the user has indicated in their preferences that they what to get email notifications for minor edits (see T40874).

If this is the case, I understand that adding the minorEdit=False parameter to the page.put() command in Web2Cit-Monitor's writer/domain.py (https://gitlab.wikimedia.org/superzerocool/w2c-monitor/-/blob/master/writer/domain.py#L70) would fix the issue.

In addition, doing so in the page.put() command of the write_domain_check function (https://gitlab.wikimedia.org/superzerocool/w2c-monitor/-/blob/master/writer/domain.py#L82) would enable email notifications when new domains are added to the domain list and users have this list added to their watchlist.

Event Timeline

@diegodlh: Removing task assignee as this open task has been assigned for more than two years - See the email sent on 2025-05-22.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome!
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!

When this is fixed, consider notifying interested users that they can now watch result pages to monitor score changes:

For each templates.json file we may collect the list of contributors. Then, for each contributor, we can write on their Talk page recommending them to follow the result pages for the domains they have contributed to.

Alternatively, we may do so on every result page discussion, tagging the involved editors, However, this may result in a high number of tags per user.

In any case, remind them as well to watch the entire list of domains to learn about new domains supported.

As per https://www.mediawiki.org/wiki/Help:Minor_edit, because these edits would actually alter the content and meaning of the pages, they shouldn't be marked as minor anyways (except see T317384).

Should be fixed with 2511b9b4.

To try this on Toolforge with our bot credentials before pulling changes I did:

  1. Copy w2c-monitor folder on Toolforge to w2c-monitor-minor.
  2. Make the necessary changes to the writer/domain.py file on this new folder.
  3. Run main.py from the new folder as a Toolforge job like so: toolforge jobs run test --image tf-python39 --command "cd $PWD/w2c-monitor-minor && ../pyvenv/bin/python3 main.py --domain www.cronista.com --trigger testing"

I see the edits have not been marked as minor, as expected (as seen in the corresponding edit histories, while logged out to ensure email would be sent). I'm still waiting to get the email notification though (I understand that it can take some time).

When this is fixed, consider notifying interested users that they can now watch result pages to monitor score changes:

Similar to the message intended in T408861.

Drafted this Jupyter notebook on PAWS to get a list of users and domains and files they have edited: https://public-paws.wmcloud.org/User:Diegodlh/Web2Cit/User%20contributions.ipynb

Also drafted the following message:

Dear <username>,
We see you have contributed Web2Cit configurations for some domains. Thank you!
We have recently fixed a long-standing bug (link) that prevented you from getting a notification email when translation results changed for a given domain. Now you can track changes by adding any domain results page to your watchlist.
These are the results pages for the domains you have contributed to:

  • ...
  • ...

You can also watch the overview page (link) to get a notification when new domains are configured in Web2Cit.
If you were already watching any of these pages, you may need to visit them again at least once while logged-in to get notifications for future changes.

I see the edits have not been marked as minor, as expected (as seen in the corresponding edit histories, while logged out to ensure email would be sent). I'm still waiting to get the email notification though (I understand that it can take some time).

Still not getting the notification email.

I tried manually editing (while logged-out) a results page I'm watching and I got the notification email immediately. All three times I tried.

Tried changing the w2c-monitor code once more, to forcefully use botflag=False in page.put(). The edit is successfully NOT flagged as bot edit on my Watchlist, but I still don't get the email notification. Even if the edit is not flagged as minor nor bot.

Apparently notifications for bot-made edits have been blocked altogether since 2024 (see T379149). We won't be able to fix this until a way to enable them again is found.

In the meantime, mentioning this bug in the documentation:

In the meantime, mentioning this bug in the documentation:

Also mentioning in the monitor results pages with 54fc9771.

Apparently there is a way to get watchlist edit notifications on-wiki through the Echo extension: T203941. But this hasn't been deployed to production wikis: T309855.

Asked whether it would make sense to move forward with deployment to have at least one way to get notifications for bot-made edits of watchlisted pages: T379149#11608829 & T309855#11608849.

Apparently there is a way to get watchlist edit notifications on-wiki through the Echo extension: T203941. But this hasn't been deployed to production wikis: T309855.

On-wiki notifications already work fine through Special:Watchlist (so 54fc9771f4a870f2051634590277423666bf202c is also incorrect), why doesn’t that suffice?

This task is specifically about email notifications, which are currently plain impossible (unless the bot loses its bot right, but looking at its edit rate, it should remain a bot and continue using bot=True).

On-wiki notifications already work fine through Special:Watchlist (so 54fc9771f4a870f2051634590277423666bf202c is also incorrect), why doesn’t that suffice?

Because many users are not aware of Special:Watchlist, and even if they are (like me) I think it is easier to notice a notification if it is delivered to my email or shown at the top of the wiki page. I guess that's the whole point of it after all, right?

This task is specifically about email notifications, which are currently plain impossible (unless the bot loses its bot right, but looking at its edit rate, it should remain a bot and continue using bot=True).

I agree it should remain a bot, yes.