Page MenuHomePhabricator

Improve [rollback] logic when it encounters null edits
Open, Needs TriagePublic

Description

Inspired by T169457...

There are at least two cases where rollback and null edits (e.g. protection events) do not interact well. Suppose "Bot" is a page-protection bot (it could also be a Sysop doing that manually and missing the vandalism). Any log-type null-edit generating event will do.

Case I

Edit 3 - Admin; manual revert to version #0
Edit 2 - Bot; null edit (=version #1)
Edit 1 - Vandal; vandalism
Edit 0 - Editor; OK version

Rollback was not an option for Admin here since rollback of #2 would try to revert Bot and go to #1. Those have the same text, so it would error out. Ideally edit #3 could be "Reverted edits by Vandal to last version by Editor)" via [rollback].

Case II

Edit 4 - Admin; manual revert to version #0
Edit 3 - Vandal; vandalism
Edit 2 - Bot; null edit (=version #1)
Edit 1 - Vandal; vandalism
Edit 0 - Editor; OK version

Rollback was not an option for Admin since they noticed the vandalism from #1 in addition to #3. Ideally edit #4 could be "Reverted edits by Vandal to last version by Editor)" via normal rollback. This won't handle the case were the edits were from two different vandals, but it could at least detect that when they are the same.

This could probably make use of rev_sha1.

For case #1, history would need to show [rollback] links for the last non-null revision. Ideally, recentchanges too, but that would probably be too expensive.

Event Timeline

aaron created this task.Sep 8 2017, 11:48 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 8 2017, 11:48 PM
aaron updated the task description. (Show Details)Sep 9 2017, 12:54 AM
aaron updated the task description. (Show Details)Sep 9 2017, 1:08 AM
Aklapper renamed this task from Improve [rolblack] logic when it encounters null edits to Improve [rollback] logic when it encounters null edits.Sep 9 2017, 12:51 PM
Zache added a subscriber: Zache.Sep 10 2017, 11:26 AM