The following discussion is an archived debate. Please do not modify it. Subsequent comments should be made in a new section. The result of the discussion was Withdrawn by operator.

Operator: Dragons flight

Automatic or Manually Assisted: Automatic

Programming Language(s): Python (partially dependant on pywikipedia, but mostly original code)

Function Summary: Intended to automatically protect templates and images appearing on the main page or today's featured article, and unprotect them when they are no longer in these high profile locations. This bot will require sysop rights.

Edit period(s) (e.g. Continuous, daily, one time run): Every 15 minutes

Edit rate requested: N/A

Already has a bot flag (Y/N): N

Function Details: The bot reads Main Page and Main Page/Tomorrow, identifies the current and immediate future featured articles, and then generates a list of all templates/images appearing on any of these four pages. The bot then checks each template and image to see whether it is protected (i.e. edit=sysop, move=sysop). If it is not protected, the bot will automatically protect the template/image, and add that item to an internal list. The bot will also check this internal list for items it has protected in the past but which are no longer in high profile locations and restore those items to their pre-existing state. It will not remove protection that had been added by someone else.

I have already written code capable of performing most (but not all) of the above functions, but I am coming here to get feedback from the community before carrying this project further. As noted above, this bot would require sysop rights in addition to ordinary bot approval. For an alternative but less extensive proposal, see: Wikipedia:Bots/Requests_for_approval/Shadowbot2. Dragons flight 11:32, 30 December 2006 (UTC)[reply]

Addendum: In order to protect images which come from Commons, I have added an ability to upload them to Wikipedia. When the local copy is no longer needed, I would have the bot tag them for speedy deletion. Dragons flight 06:37, 1 January 2007 (UTC)[reply]

To expand on this, I am proposing that the bot copy the image, image description, and any neccesary templates that exist on Commons but not locally. When the local copy was no longer needed, the image would be tagged for deletion. Any commons image templates would be left here since presumably they could be used for future images. Dragons flight 01:09, 3 January 2007 (UTC)[reply]

Addendum 2: Per suggestion, it would also track images/templates used within Template:Did you know/Next update. Dragons flight 10:46, 1 January 2007 (UTC)[reply]

Update: I now have an essentially fully functional code base, and have updated User:ProtectionBot to give more operational details. Dragons flight 00:43, 2 January 2007 (UTC)[reply]

Discussion[edit]


Non-admins could still remove said template from the featured article. The only case where it might be a problem is if that "newly-added template" was used widely on hundreds of other pages. If that was the case, an admin would be needed urgently to undo protection and fix things for the hundreds of other articles where the template was being used. But high-use templates should already be protected anyway. Carcharoth 10:10, 7 January 2007 (UTC)[reply]
In the scenario I'm thinking about, a vandal would end up with a protected template. Even if removed from the FA (possibly by the vandal himself), it could be added to other (non protected) templates or pages. Yes these additions could all be reverted, but the simplest fix at the point of origin (blanking the vandal template) would not be accessible to non-admins. A little variation in the protection timing would help avoid this sort of exploit. Gimmetrow 17:39, 7 January 2007 (UTC)[reply]
The template would only remain protected for as long as it was on the Main Page or the Featured Article page. At some point (less than half an hour I think) after it is taken off the page, ProtectionBot will unprotect the template again, and the vandal only has an unprotected template to play with, and anyone can blank it. If, as is likely, the vandal uses the template in the short interval when it is protected, an admin will be able to unprotect it and delete/fix it. I agree though that this is slightly worrying, as people will focus on the "ProtectionBot protected a vandalised template" bit, and not realise that human oversight is still very much needed. Carcharoth 12:24, 8 January 2007 (UTC)[reply]

Trials[edit]

Approved for trial. Please provide a link to the relevant contributions and/or diffs when the trial is complete. Well it looks like there is more then enough support to run trials with this bot, so Conditional Trial Approved if it is possible to run this without admin rights (perhaps generating the lists so we can verify the parsing?) As this type of test will produce beany results if it can post the results to a page that is then swiftly deleted admins can review the results. Due to the expected high visibility of this bot lets also leave this discussion transcluded on Wikipedia:RFBOT for now. — xaosflux Talk 05:16, 5 January 2007 (UTC)[reply]

I've already run all the trials I feel are necessary short of full-scale deployment. You really want me to sit around generating lists to show that I know how to parse text? That feels very much like a waste of time to me, and potentially hazardous as well if made public. The current and tomorrow's main page/featured article collectively contain 53 templates and 31 images. All 53 templates are already protected as are 20 of the 31 images. Of the 11 unprotected images (none on the main page currently, thankfully), 6 are local and 5 reside on commons. Parsing out the relevant bits is somewhere around step 2 in a 10 step process. You are welcome to review the code, as several other people have volunteered to do, but if we are going to have a trial I would ask that it be a full demonstration that it works, rather than making extra pointless work for me. Dragons flight 06:33, 5 January 2007 (UTC)[reply]
I agree with Dragons flight the only way to test is to actually run the bot on the main page. Unless Xaosflux or any other BAG has an objection I give my support for a 24 hour trial (this will cover todays FA and tomorrow's FA protection, and the unprotection of the current FA once it leaves the main page) Betacommand (talkcontribsBot) 06:47, 5 January 2007 (UTC)[reply]
How many humans will be watching our robot overlords during the test? :-) Carcharoth 14:28, 5 January 2007 (UTC)[reply]
Some serious comments. I like the safety valve feature, but I wonder if there is a way to test that as well to make sure the "not editing for 90 minutes" thing does work? Also, is it possible to make clear to admins using the emergency shut-off button that they should follow-up and make sure that protection is dealt with by humans, rather then just walking away with a "bot's shut off now, everything should be OK now" shrug of the shoulders. That's the only thing I can think of at the moment. All looks really good! Carcharoth 14:38, 5 January 2007 (UTC)[reply]
The safety valve is controlled by MediaWiki itself through template syntax, so as long as it's tested once to make sure the math is right and it does kick in after 90 minutes, it should work the same every time. Also, blocking the bot would trigger said safety valve 90 minutes after the block; since the bot would theoretically have already handled the next day's protection, I think warning within 90 minutes should be plenty. —bbatsell ¿? 17:18, 5 January 2007 (UTC)[reply]
I am not suggesting you can not parse code, just that this request needs to have a signfigant degree of caution used for it, and I am all for other suggestions on how to trial this bot, my trial approval was to continue to move this request forward. The hightened caution is twofold, first it is due to this requests interaction with our most viewed page; and second is that it will end up requiring an Wikipedia:RFA and getting full support and showing all due dillegence here on RFBOT should alleviate challenges that have occured on RFA during other bot attempts. — xaosflux Talk 04:25, 6 January 2007 (UTC)[reply]
  • Xaosflux is a member of the group, and approved a trail run. So what is the problem? Prodego talk 20:32, 5 January 2007 (UTC)[reply]
  • In the last admin bot BRFA, it was felt that the lack of support shown on the BRFA carried through to the RFA's failure. By showing our support here we are avoiding this ill fate and showing the BAG that there is community (or cabal :P) approval of the plans. In any case, anyone can express their opinion in a BRFA, or their support for a proposal - in fact I went and commented on a few today. Helpful suggestions or just plain support for an idea can help :) Martinp23 20:43, 5 January 2007 (UTC)[reply]

Comments from Trial[edit]

I have begun running this on my admin account on a manual basis. In doing so I have identified several issue:

  1. A unicode handling bug in one part of the program that crashed it. This is now fixed.
  2. A problem with dropped wikisession information. I suspect that this was caused by how Mediawiki handles sessions and a conflict with my trying to use my account at the same time the bot was running. If I am correct, this means that this bot cannot run on my account at the same time that I am using it, and consequently continuous operation absolutely requires a seperate account. I will be investigating this further.
  3. A formatting issue wherein the bot converted a newline to a space. I haven't yet tracked down why this occured.
    The formatting issue should be resolved now (albeit with an ugly hack). Dragons flight 04:17, 6 January 2007 (UTC)[reply]

The first two errors, being fatal, required me to do some substantial manual cleanup after the bot during this initial run. It has also suggested ways that I can improve the error handling which I intend to do now. Aside from these issues, it appears to be working as designed. Dragons flight 01:14, 6 January 2007 (UTC)[reply]

Thanks for the trial report. A comment: would it be possible for the bot to add the images it protects to Category:Protected main page images? I'm not sure if the bot is actually copying the code from the template pages or taking the code from the source (I haven't gotten a chance to go through the code you sent me ;-) ), so all I've done is place the templates themselves in the category. Or would a creation of a new category for images not on the Main Page but on the FA itself be more appropriate? Thanks! Flcelloguy (A note?) 04:14, 6 January 2007 (UTC)[reply]
I was thinking that "Protected by ProtectionBot" and "Uploaded by ProtectionBot" could be made subcats of all protected/uploaded high profiles stuff. Dragons flight 04:22, 6 January 2007 (UTC)[reply]

(edit conflict) I have also discovered that the list of transcluded templates does not respond to action=purge and can at times be several hours out of date. Consequently I implemented a work around for this that forces the template list to update. Dragons flight 04:17, 6 January 2007 (UTC)[reply]

I will be leaving the bot running while I go away for a bit. Since this is the first time it has been left running without myself directly in front of it, I thought I should let others know. It has been operating normally for quite a while now and I don't anticipate any problems, especially since there is little activity on the Main Page this time of day. Dragons flight 07:21, 6 January 2007 (UTC)[reply]

Today's midnight UTC changeover seems to have gone as expected. The bot failed to unprotect a couple images, but this was caused by missing log entries related to yesterday's bugs, and not any current problem in the bot. During the night it also served to protect and unprotect some changes that where made to the Did you know image. Dragons flight 01:13, 7 January 2007 (UTC)[reply]

Thanks for the updates! Two minor requests: first, could you have your bot unprotect old selected anniveraries as well? The "tradition", per se, has always been to unprotect them when they are off the Main Page so that they can be updated accordingly (new events will be added, holidays that don't stay on the same day will need to be changed, etc.). I had to just manually unprotect the SA for January 6. Secondly, would you mind adding "BOT:...", like you have done with normal edits, to the protection log summary while the bot is running off of your account? This would make it a lot easier to look at the contributions, etc. Thanks a lot! Flcelloguy (A note?) 02:11, 7 January 2007 (UTC)[reply]
Yeah, I've noticed that some of those selected anniversaries have been protected a really long time as well. My thought on that had been that I would propose a seperate one-time run to clear all the really old protections some time after ProtectionBot was fully set up and deployed. On your second point, I can add "Bot:", but frankly it's already more than a little inconvenient as a developer/operator to have this running on my own account. I would much prefer to fully set up the seperate account as soon as possible, so that the bot's actions would be cleanly seperated from my own. See for reference this discussion and the proposal at the end. Even a temporary sysop flag would make it easier for me and others to see what it is doing. Dragons flight 03:12, 7 January 2007 (UTC)[reply]
As a bot running it probably should have had those words on the edit summery. Cheers! —— Eagle 101 (Need help?) 05:29, 7 January 2007 (UTC)[reply]
Well, the second point isn't a large issue, now that the bot is undergoing the RfA now and would run from its own, bot-flagged, account. However, I would still prefer, if at all possible, for the bot to unprotect SAs as soon as they're off the Main Page, similar to how the bot would unprotect images/ tag images for deletion as soon as the images were off the Main Page. This would avoid having the protected SAs accumulate over time, and would also be a large convenience. Finally, it would leave the SAs open for editing, as they should be, the moment they are off the Main Page. Thanks! Flcelloguy (A note?) 16:10, 7 January 2007 (UTC)[reply]

End of Trials[edit]

Please note that this bot will only be approved of if Wikipedia:OFFICE steps in or RfA takes place. Dragons flight I suggest that you post the RfA as soon as possible so that we can get the flag for this bot.In regard of the approved test that should have concluded by now, if more testing needs to be done before the RfA is over please test on [test.wikipedia.org the test wiki] as the trial was just given to work out any kinks before the RfA. If this bot has as much support as the BRfA has the closing B-crat can take into consideration all of the anti-adminbot biasis when they close it since it is a discussion and not a election. Betacommand (talkcontribsBot) 05:04, 7 January 2007 (UTC)[reply]

As requested, I've shut it down and filed the RFA. I have posted a notice of this at AN, that also includes a request that it be allowed to continue running during the RFA. Dragons flight 09:54, 7 January 2007 (UTC)[reply]

Please note that this RFA for this bot ended, with the bot operator withdrawing the bot. As such I don't think this request will be able to continue. Cheers! —— Eagle 101 (Need help?) 02:16, 11 January 2007 (UTC)[reply]

Withdrawn by operator. As the RFA required to give this bot the sysop bit has been withdrawn by the operator, this bot can not function as designed. Due to the large size of this request, I'm closing it as a w/d. Should DF wish to due something else with this bot account, please start a new request. — xaosflux Talk 04:34, 11 January 2007 (UTC)[reply]

The above discussion is preserved as an archive of the debate. Please do not modify it. Subsequent comments should be made in a new section.