Wikidata:Requests for permissions/Bot/RollBot
The following discussion is closed. Please do not modify it. Subsequent comments should be made in a new section. A summary of the conclusions reached follows.
- Approved--Ymblanter (talk) 19:25, 25 April 2017 (UTC)[reply]
RollBot[edit]
RollBot (talk • contribs • new items • new lexemes • SUL • Block log • User rights log • User rights • xtools)
Operator: Alphos (talk • contribs • logs)
Task/s: Revert all edits made by users (crucial because of Quick Statements) or bots gone awry, once they've been temporarily blocked or stopped
Code: Github The bot is written in PHP, and I know it's not ideal, but it's a language I'm very familiar with.
Function details:
Whenever any user (including but not limited to bots) edits a big number of pages or entities in a short amount of time, and makes a mistake over every single one of them, reverting all pages to their former state is going to be rapidly mind-numbing for a human. We therefore need a bot to perform such an action.
A plain rollback is not a viable way of reverting for at least two reasons :
- it will erase valid edits by the same user prior to going awry ;
- it won't erase edits if any other user has edited the page or entity afterwards.
RollBot takes the first "wrong" edit as a parameter, and reverts all edits made by the same user since the time of that first "wrong" edit. The interface currently only resides on my computer - it is not possible to automatically start RollBot on a task : this is a security feature to avoid using it to vandalize legitimate edits.
It first lists all pages/entities edited by the target. Then for each of them, gets the content of the version immediately before first edit on that page by the target since it started going awry, and takes it as the version to revert to, should the page be reverted. Then establishes a list of all contributors since that version, to make sure no other users edited that page.
It can merely list the pages he couldn't revert without overwriting edits by users other than the target, OR overwrite said edits. This is decided on a per-request basis.
After completing its task, it publishes a complete report page in its userspace, with the name of the target and start time in the title.
That report holds a list of pages/entities it edited, a list of pages/entities requiring human check (all revisions by the target were deleted ; page was edited by another user ; page was edit-blocked ; those are the most likely explanations), and a list of pages/entities bound for deletion (created by the target after going awry - deleting could be performed by RollBot, but I'd rather make sure it has community acceptance for its base function before requesting sysop rights ). You can see an example of the report here, that was created by the bot in its current version.
Whether or not RollBot finally acquires sysop rights, I see it becoming a very useful tool for the admins' noticeboard.
Wikidata is the first WMF wiki where I implement it (although it technically has the ability to edit other wikis) because of the relatively limited userbase, and the relatively high edit/minute any user (and not just bots) can reach using external tools like Quick Statements. I do plan on running it on other wikis once it has proven its worth.
--Alphos (talk) 17:01, 14 January 2016 (UTC)[reply]
- First series of test edits was short, and allowed me to spot one bug and one issue to address that cannot be considered a RollBot bug - I'll explain after properly investigating it, it seems some constraint was not met with the sitelinks in the "good version".
- See this section of the admin's noticeboard.
- RollBot successfully reverted all pages to their former state after being asked to do so - which resulted in a bunch of null edits, since they all already had been reverted to their former state.
- Most of them except one were already back to their former state, so RollBot essentially performed a null edit. As expected, it successfully listed all pages and the editors (of a hardcoded for now limit of 1 + 5 who will have their nickname or IP address) it "reverted" - or intended to -, with the "first bad" revision, the "previous good" revision and its author.
- Alphos (talk) 21:03, 18 January 2016 (UTC)[reply]
- There are two very similar issues with :
- Q2022368 : German Wikipedia sitelink de:Teller-Ulam-Design is a redirect to de:Kernwaffentechnik#Teller-Ulam-Design, and de:Kernwaffentechnik is already in use on Q15221814
- Q23559 : Newar Wikipedia sitelink new:बेनिटो मुसोलिनी is a redirect to new:तःहताः २, and new:तःहताः २ is already in use on Q362.
- addshore (IRC : Freenode / #wikidata) helped me greatly in isolating the two issues (well, he pretty much solved the whole thing by himself ^^' ). He also suggested (but this is unrelated to RollBot) we find a way to list all similar issues on Wikidata.
- I don't know what happened with Q12189183, due to a STUPID mistake on my part : I overwrote my error log instead of appending to it. That is now fixed. I cannot reproduce the error, but, should another one ever arise, we'll definitely know about it ! : all errors occurring when attempting to edit will from now on be visible in RollBot's reports.
- Alphos (talk) 23:09, 18 January 2016 (UTC)[reply]
- On a suggestion by GZWDer, I implemented an optional end timestamp parameter.
- After removing a tiny kink that I thought I never added, I started RollBot again (Report).
- Despite having a minimum of 5 seconds of doing nothing after an edit (thus a very strict minimum of 5 seconds between edits, usually more), it sadly got throttled for quite a few attempted edits. I take comfort in the fact he successfully listed those failed attempts in the "Pages requiring human check" section, with a default explanation.
- The real API error messages are in a file on my machine, and, although there is a lot of throttled edits, there is also a fair amount of failed saves due to wikilink conflict. It's usually because the page linked (in the entity RollBot is editing) is a redirect to a page linked in another entity.
- I'll post a list of those in RollBot's report.
- Alphos (talk) 18:29, 19 January 2016 (UTC)[reply]
- Found 2 of those conflicting redirecting wikilinks :
- enwiki on Q4591671 points to en:1996 Sarajevo tram attack, which is a redirect to en:Siege of Sarajevo#Lifting_of_the_siege, with en:Siege of Sarajevo already listed in Q175653
- elwiki on Q12181506 points to el:Επάνω Αρχάνες Ηρακλείου, which is a redirect to el:Επάνω Αρχάνες, already listed in Q632418.
- The API simply prevents the bot from editing in case of such conflicts, there is no workaround that I know of. Good thing such conflicts are listed in the "Pages requiring human check" section of the bot's reports
- Alphos (talk) 19:08, 19 January 2016 (UTC)[reply]
- Found 2 of those conflicting redirecting wikilinks :
- There are two very similar issues with :
- What is the current situation with the bot? Is it ready for approval?--Ymblanter (talk) 21:05, 28 January 2016 (UTC)[reply]
- I've been facing a heavy bout of a fairly serious medical condition these past few days, it's a bit on hold.
- It's given me the idea to give a group of users (most likely admins/sysops/whatchamacallits) the ability to trigger the bot when I'm in that state which may (and probably will) reoccur, but i'm sad to say dev is a bit on hold for the next few days - hopefully not more than a week (pleeeeaaaaase, I can't take this much longer !).
- However, if I'm not mistaken, the bot in its current state is functioning as it should - if you don't count disability of its operator.
- Alphos (talk) 11:34, 4 February 2016 (UTC)[reply]
@Alphos: In addition to the bot flag, which rights would this bot need? If administrator access is needed, then not only would you need a request for administrator access for the bot, but you yourself would have to run for adminship first.--Jasper Deng (talk) 09:28, 27 March 2016 (UTC)[reply]
- Sorry for the late reply, been suffering from Q166907 for the past few months, which made programming a bit difficult - although I luckily did have the energy to make RollBot during an easier week -, and my treatment needed a few tweaks in the past few weeks - I'm not there yet, but hopefully I should soon be able to resume work on the bot and other projects !
- I'm not aiming for bot adminship yet. The bot needs an extensive period of testing - it seems to behave adequately for now, barring the
unconfirmed user
limits it inadvertently hit, but I'm a prudent person, and I'd rather be damn sure it won't add work for the current human admins by performing unneeded sysop actions - If however, I'm satisfied (and I'm a hard person to satisfy) with its ability to perform the tasks in their entirety, including deleting items based on the conditions given to it, I plan indeed on requesting sysop rights. If that means I need to be an admin first, I'd apply as well of course.
- Thanks a lot for your consideration
- Alphos (talk) 13:40, 6 April 2016 (UTC)[reply]
- @Alphos: Any news on this? I think it's advisable to first only perform rollbacks and then later add the deleting abilities which require sysop rights. --Pasleim (talk) 10:11, 17 January 2017 (UTC)[reply]
- Not much news, based in part on my condition but also on the lack of a testbed, quite possibly because nobody thinks of it
- As for the deletion rights, I already made clear I don't intend for RollBot to have them immediately, as I don't believe I'm infallible and it's probably working as intended but I'd much rather be sure first.
- I do intend to request admin rights for myself first, and that can't happen currently because I'm not yet able to fulfill that role on Wikidata. With a bit of luck and a bigger dose of treatment come February, I'll advise on that matter.
- In the mean time, if you find a testbed for RollBot, as in a set of contributions that needs batch revoking, please inform me soon as you can, here and/or on IRC ^^ I'm still trying to find a way for other people to control RollBot without leaving a possibility for abuse, so for now I'm still in exclusive control of the bot.
- Alphos (talk) 13:57, 19 January 2017 (UTC)[reply]
- Finally found a suitable testbed ! 1162 reverts and the corresponding report. Alphos (talk) 16:21, 22 April 2017 (UTC)[reply]
- I am going to approve the bot in several days provided there have been no objections raised.--Ymblanter (talk) 18:15, 22 April 2017 (UTC)[reply]
- Finally found a suitable testbed ! 1162 reverts and the corresponding report. Alphos (talk) 16:21, 22 April 2017 (UTC)[reply]
- @Alphos: Any news on this? I think it's advisable to first only perform rollbacks and then later add the deleting abilities which require sysop rights. --Pasleim (talk) 10:11, 17 January 2017 (UTC)[reply]
- Rollbot had been super helpful to take care of my request to rollback a large series of label translation upload that I missed verifying. Gven there is no other tool that can do this at the moment, i'm highly supportive to have this bot recognized and appreciative of @Alphos: on being super responsive and even manually fixing other issues in the Wikidata entries unrelated to the original upload --Planemad (talk) 10:12, 24 April 2017 (UTC)[reply]