Page MenuHomePhabricator

Special:GlobalContributions: Display edits made by bot accounts
Closed, ResolvedPublicFeature

Description

Summary

Special:GlobalContributions should be updated to support displaying edits that have been made by bot accounts.

Background

  • Special:GlobalContributions doesn't currently display edits made by accounts with the bot right.
  • This is because of an intentional decision to exclude bot actions from the CheckUser central index tables, which was made due to database concerns (T387923#10603518; https://gerrit.wikimedia.org/r/1067425).
  • It may be possible for Special:GlobalContributions to display edits made by bot accounts without causing database issues (see T387923#10618806 onwards).

User story

  • As an editor, I want to be able to view a bot’s global contributions, so that I can see the edits the bot is making across all wikis in a wiki family.
  • As an editor already accustomed to using Special:Contributions, I want Special:GlobalContributions to have the same behaviour/display the same types of contributions as the Special:Contributions page on an individual wiki, so that I know what I can expect from the GlobalContributions page/so that there aren’t any potentially confusing differences in functionality.

Technical notes

  • We want to monitor the size of the cuci_user table to ensure that the table does not grow too much with this change
    • We can also collect this data for cuci_temp_edit as part of monitoring the temporary accounts deployment
  • After the metrics are collected we need to update:
    • $wgCheckUserCentralIndexGroupsToExclude to not include bot by default
    • Drop $wgCheckUserCentralIndexRangesToExclude from WMF config

Acceptance criteria

  • Metrics are captured as described in T387923#10712644 (requested in T387923#10618806), and a baseline is established before we make this change
  • Lookups for contributions by bots is supported in Special:GlobalContributions

Event Timeline

Change #1131425 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/CheckUser@master] Record actions by bots in cuci_user

https://gerrit.wikimedia.org/r/1131425

Change #1134203 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[operations/mediawiki-config@master] Remove wgCheckUserCentralIndexRangesToExclude definition

https://gerrit.wikimedia.org/r/1134203

Change #1134216 had a related patch set uploaded (by Dreamy Jazz; author: Dreamy Jazz):

[mediawiki/extensions/WikimediaEvents@master] Add metric for count of cuci_user and cuci_temp_edit tables

https://gerrit.wikimedia.org/r/1134216

The metrics patch is ready for review. The other patches are code ready but can't merge until the metrics one has been deployed so that we can get a baseline

Change #1134216 merged by jenkins-bot:

[mediawiki/extensions/WikimediaEvents@master] Add metric for count of cuci_user and cuci_temp_edit tables

https://gerrit.wikimedia.org/r/1134216

Change #1134203 merged by jenkins-bot:

[operations/mediawiki-config@master] Remove wgCheckUserCentralIndexRangesToExclude definition

https://gerrit.wikimedia.org/r/1134203

Mentioned in SAL (#wikimedia-operations) [2025-04-23T14:37:52Z] <dreamyjazz@deploy1003> Started scap sync-world: Backport for [[gerrit:1134203|Remove wgCheckUserCentralIndexRangesToExclude definition (T389055)]]

Mentioned in SAL (#wikimedia-operations) [2025-04-23T14:42:13Z] <dreamyjazz@deploy1003> dreamyjazz: Backport for [[gerrit:1134203|Remove wgCheckUserCentralIndexRangesToExclude definition (T389055)]] synced to the testservers (https://wikitech.wikimedia.org/wiki/Mwdebug)

Mentioned in SAL (#wikimedia-operations) [2025-04-23T14:48:53Z] <dreamyjazz@deploy1003> Finished scap sync-world: Backport for [[gerrit:1134203|Remove wgCheckUserCentralIndexRangesToExclude definition (T389055)]] (duration: 11m 00s)

Change #1131425 merged by jenkins-bot:

[mediawiki/extensions/CheckUser@master] Record actions by bots in cuci_user

https://gerrit.wikimedia.org/r/1131425

When QA'ing this task, it is important to note that data is not being retroactively added. This means that users with the bot group will need to make at least one edit per-wiki after these changes were applied for Special:GlobalContributions to work for the users.

We are collecting the metrics described in the acceptance criteria and displaying them at https://grafana.wikimedia.org/d/e293b3fd-032f-4915-a6c0-72b6062d66b5/temporary-accounts?orgId=1&viewPanel=28&from=now-30d&to=now

It looks like that per the metrics, the row count of the tables have not been made unstable by these changes. In fact, the total row count has seemed to have dropped since we made the change (which indicates that bot actions do not have a noticeable effect).

kostajh subscribed.

I think this can skip QA at this point.