Page MenuHomePhabricator

Enable Automoderator to log reverts it would take instead of reverting
Closed, ResolvedPublic3 Estimated Story Points

Description

Per the parent task - we want Automoderator to be able to run in a log-only mode. In this mode, Automoderator should make all the same decisions and follow the same logic as if it would revert the edit, but instead of reverting it should generate a log.

The scope of this task is to add the capability to generate these logs, controlled by internal configuration, which can - in the future - instead be controlled via Community Configuration.

If using the standard Log interface, the log entry could read:

00:00, 1 January 1970 Automoderator would revert edit 123456 by Alice with score 0.1234 (learn more)

Where:

Acceptance criteria

  • In log-only mode, Automoderator does not revert edits or send talk page messages
  • In reverting mode, Automoderator does not log its decisions
  • A new configuration is available to select between reverting and logging. The default is reverting.
  • A log of edits that Automoderator would revert, given its current configuration on this wiki, is visible to any Wikipedia editor.
  • The log entry is as above, including the Revert Risk score for that edit, to 4 decimal places

Event Timeline

Samwalton9-WMF moved this task from Inbox to To be estimated on the Moderator-Tools-Team board.

Logs could still be useful in revert mode when a community is debating changing the cautiousness level.

Logs could still be useful in revert mode when a community is debating changing the cautiousness level.

In the way I've set this task out this would only help with raising the threshold, because you'd only see scores for edits above the currently defined threshold. An alternative would be allowing Automoderator to actively revert at one threshold, but log at a different threshold/configuration, perhaps? That might get a bit complex in terms of UI. It could also score every edit, regardless of score, but that seems more like a model score storage problem, which I don't think Automoderator should be in charge of solving.

An alternative would be allowing Automoderator to actively revert at one threshold, but log at a different threshold/configuration, perhaps?

I think that would be great but as an expansion to logging mode.

@Samwalton9-WMF

What do we want the log action and action type to be?
See here for an example: https://www.mediawiki.org/wiki/Manual:Log_actions.

Hmm. Based on this and more examples, perhaps:
Log action: revert_decision
Log type: automoderator

@Samwalton9-WMF

It does not appear that external links are allowed to be rendered in log lines, should we update the link to be a local one that then redirects to mediawiki https://www.mediawiki.org/wiki/Moderator_Tools/Automoderator?

Huh, interesting. Creating that redirect on each wiki might be a pain. I'm happy to drop the 'learn more' part of the summary.

Huh, interesting. Creating that redirect on each wiki might be a pain. I'm happy to drop the 'learn more' part of the summary.

Sounds good, I'll leave it out.

Change #1261421 had a related patch set uploaded (by Kgraessle; author: Kgraessle):

[mediawiki/extensions/AutoModerator@master] Enable Automoderator to log reverts it would take instead of reverting

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

Change #1261495 had a related patch set uploaded (by Kgraessle; author: Kgraessle):

[mediawiki/extensions/AutoModerator@master] DNM branch for patch demo testing

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

Change #1261495 abandoned by Kgraessle:

[mediawiki/extensions/AutoModerator@master] DNM branch for patch demo testing

Reason:

N/A

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

Scardenasmolinar subscribed.

I am seeing an empty i18n string in Special:Log when I filter by AutoModerator logs.

Screenshot 2026-03-30 at 19.11.43.png (49×1 px, 5 KB)

@Samwalton9-WMF

What would we like the log description message to be?
Maybe something like:
"This is a log of edits that AutoModerator would have reverted."

For example, this message would be displayed above the Special:Log form.

Screenshot 2026-03-31 at 10.37.26 AM.png (706×1 px, 60 KB)

Screenshot 2026-03-31 at 10.37.34 AM.png (678×1 px, 77 KB)

Today I Learned each log has its own description! Building on your suggestion with a little more specificity, since we can be wordy here:

This is a log of edits that Automoderator would have reverted, given its configuration at the time of the log entry.

And link Automoderator to the CC form. If this is wiki markup then I guess that would be [[Special:CommunityConfiguration/AutoModerator|Automoderator]] or [[Special:CommunityConfiguration/AutomoderatorMultilingual|Automoderator]] as appropriate.

Today I Learned each log has its own description! Building on your suggestion with a little more specificity, since we can be wordy here:

This is a log of edits that Automoderator would have reverted, given its configuration at the time of the log entry.

And link Automoderator to the CC form. If this is wiki markup then I guess that would be [[Special:CommunityConfiguration/AutoModerator|Automoderator]] or [[Special:CommunityConfiguration/AutomoderatorMultilingual|Automoderator]] as appropriate.

This message is being constructed in the LogPage.php file here. It does not appear to support adding parameters or overrides, so unless there's a way to add this in wiki text I don't think we can customize it based on the multilingual configuration.

Ah - does that apply to the log message too (where we also wanted to include a link to the CC form)?

Ah - does that apply to the log message too (where we also wanted to include a link to the CC form)?

We're able to override the log message with params, though right now the standard is that the acting user's username goes to their user page so I realize that's different than what is in the acceptance criteria is, hmmm... Do we want to deviate from standard log format or go to the community configuration page?
See example here:

Screenshot 2026-03-31 at 2.53.17 PM.png (129×1 px, 69 KB)

Just to clarify - we are able to link this specifically to the local Automoderator username/account?

When I wrote that log message proposal I was looking at some other messages that weren't user-specific, e.g.:

Screenshot 2026-03-31 at 14.00.21.png (260×1 px, 134 KB)

I see that almost every other log is "User [did something]" though, so I think I'm fine with the way you've done it here!

If it's non-trivial to add parameters to the log description I'm happy to leave it out for now, we could adjust it in the future, and editors can override it locally if they want to make it more descriptive.

Just to clarify - we are able to link this specifically to the local Automoderator username/account?

When I wrote that log message proposal I was looking at some other messages that weren't user-specific, e.g.:

Screenshot 2026-03-31 at 14.00.21.png (260×1 px, 134 KB)

I see that almost every other log is "User [did something]" though, so I think I'm fine with the way you've done it here!

Ok, sounds fine to me, thanks for catching that though!

If it's non-trivial to add parameters to the log description I'm happy to leave it out for now, we could adjust it in the future, and editors can override it locally if they want to make it more descriptive.

Sounds good, so just to clarify the log description would be:

This is a log of edits that Automoderator would have reverted, given its configuration at the time of the log entry.

without the link to the community configuration form?

Sounds good, so just to clarify the log description would be:

This is a log of edits that Automoderator would have reverted, given its configuration at the time of the log entry.

without the link to the community configuration form?

Yep!

Change #1261421 merged by jenkins-bot:

[mediawiki/extensions/AutoModerator@master] Enable Automoderator to log reverts it would take instead of reverting

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

Scardenasmolinar moved this task from QA to Done on the Moderator-Tools-Team (Kanban) board.

Tested on test wiki that everything works as normal after these changes have been merged.