Wikipedia:Bots/Requests for approval/MusikBot 3


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA. The result of the discussion was Symbol keep vote.svg Approved

MusikBot 3
Operator:

Time filed: 04:27, Friday, September 4, 2015 (UTC)

Automatic, Supervised, or Manual: Supervised

Programming language(s): Ruby

Source code available: GitHub

Function overview: Way back in the day, before there was consensus against doing it, User:BD2412 deleted about 2500 stale IP talk pages. Now, in light of our WP:DELTALK guideline, we'd like to restore them.

Links to relevant discussions (where appropriate):

Edit period(s): One time run

Estimated number of pages affected: 2525

Exclusion compliant (Yes/No): No

Adminbot (Yes/No): Yes

Already has a bot flag (Yes/No): Yes, but no sysop flag

Function details: This is a one time run. The bot will loop through the pages specified at User:BD2412/sandbox6 and restore all deleted revisions. Simple as that. I'll monitor it during the entire run, with verbose output so I know where it is in the loop. The script will halt if it gets an API failure. I can put a 200ms sleep in there as well, so that the script doesn't go crazy fast. I did a run through on testwiki with no issues. It's probably also worth noting that this will not trigger the IPs to get a "you have a new message" notification &mdash; MusikAnimal  talk  04:27, 4 September 2015 (UTC)

Discussion

 * The proposal sums up the state of affairs correctly. Cheers! bd2412  T 15:45, 4 September 2015 (UTC)


 * I believe the usual convention for adminbots is to run them under a separate bot account so that the regular bot doesn't suddenly get admin rights for its normal tasks? Perhaps that's not necessary here since this is a one-time thing. Hopefully someone else with more experience dealing with this can chime in on that. You should definitely sleep a bit between requests; I point to WP:BOTREQUIRE which says, bots doing non-urgent tasks may edit approximately once every ten seconds. Since this is quite menial, I think we can get away with going a bit faster. Otherwise, I have no issues with this. —  Earwig   talk 03:29, 10 September 2015 (UTC)
 * If you want I can head to WP:BN and request the admin flag to be removed after the task is compete. Otherwise I'm okay with using a new account. As for the sleep, how does 5 seconds sound? It's just that having it take several hours to complete is time consuming for me to monitor. I will also wait until off-peak hours to execute the script. &mdash; MusikAnimal  talk  03:34, 14 September 2015 (UTC)
 * It's probably fine for you to use the same account as long as you get the flag removed afterwards, yes. Let's do that. A 5-second sleep sounds good; that works out to a little over three and a half hours total runtime for the bot. I emphasize with not wanting to sit through that, but I figure it shouldn't require too much of your attention unless something goes horribly wrong. —  Earwig   talk 04:04, 14 September 2015 (UTC)
 * I only have one concern. Before the days of revdel, selective deletion was used to get rid of blatantly inappropriate edits from a page history (e.g. copyvios, BLP vios, etc.). Obviously we wouldn't want the bot to accidentally undelete any of these. Would it be feasible for the bot to skip any page that has more than one entry in the deletion log? This would presumably result in a very short list (if any at all) to be done 'by hand'. Jenks24 (talk) 14:06, 10 September 2015 (UTC)
 * Good point! Checking the deletion log is a simple solution, and I don't expect any difficulty implementing this. I will report back when I've updated the code &mdash; MusikAnimal  talk  03:34, 14 September 2015 (UTC)
 * The updated code is here. It now checks for multiple entries in the deletion log and will skip them if present. It records the skipped pages in a file which I can add to a wiki page for manual review. I also added the 5 second sleep. The script was tested on testwiki and it worked as expected. &mdash; MusikAnimal  talk  15:24, 14 September 2015 (UTC)
 * By edits, I mean undeletions. You can run the trial under your main admin account; make sure the log entries link back here and indicate they are bot actions. —  Earwig   talk 15:33, 14 September 2015 (UTC)

See. I checked a good number of them and it appears to have worked as intended. No talk pages were reported to have had more than one entry in the deletion log, so the revisions of all 50 pages were restored in full &mdash; MusikAnimal  talk  19:23, 14 September 2015 (UTC)
 * All undeletions look correct. I will post on WP:BN. —  Earwig   talk 01:32, 15 September 2015 (UTC)
 * The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.