Wikipedia:Bots/Requests for approval/Protection Helper Bot: Difference between revisions

Content deleted Content added
Discussion: two thoughts
approve
 
(39 intermediate revisions by 8 users not shown)
Line 1:
<noinclude>[[Category:OpenApproved Wikipedia bot requests for approval|Protection Helper Bot]]</noinclude><div class="boilerplate metadata mw-archivedtalk" style="background-color:
#EAFFEA; margin:2em 0 0 0; padding:0 10px 0 10px; border:1px solid #AAAAAA;">
:''The following discussion is an archived debate. <span style="color:red">'''Please do not modify it.'''</span> To request review of this BRFA, please start a new section at [[Wikipedia:Bots/Noticeboard]].'' The result of the discussion was {{BotApproved}}<!-- from Template:Bot Top-->
==[[User:Protection Helper Bot|Protection Helper Bot]]==
{{Newbot|Protection Helper Bot|}}
Line 11 ⟶ 13:
'''[[Programming language]](s):''' Python
 
'''[[Source code]] available:''' <s>The source code will be made open source on GitHub if the bot is approved and once it is operational.</s> [https://github.com/danielquinlan/protection-helper-bot On GitHub]
 
'''Function overview:''' The bot will automatically restore long-term page protection levels after shorter-term higher protection levels expire to reduce administrator workload and to avoid unintentionally leaving at-risk pages unprotected.
Line 48 ⟶ 50:
[[User:ProcrastinatingReader|ProcrastinatingReader]] ([[User talk:ProcrastinatingReader|talk]]) 02:32, 15 August 2024 (UTC)
 
:I have some thoughts on each of those points:
:*I agree that giving anyone,''all'' even anonymous IP addresses,editors the ability to override a protection reinstatement simply by slapping thea {{tl|bots}} tag into an article is a '''bad''' idea.
:*This bot doesn't need to have someany additional mechanism to prevent reinstatement of protection (which I see as unlikely to be needed). '''The mechanism is already there.''' An administrator who wants to prevent reinstatement would merely toperform protecttwo an article twiceactions: the first timere-protect for a short duration (or just unprotect it), and then apply the second temporary timeprotection for a longlonger duration. When the temporary protection expires, the original protection would also be expired, and the bot does nothing. ~[[User:Anachronist|Anachronist]] <small>([[User talk:Anachronist|talk]])</small> 17:48, 31 August 2024 (UTC)
:*A source code review would be good. I thought that was standard procedure, especially for admin bots, but I am unfamiliar with how bots get approved.
:~[[User:Anachronist|Anachronist]] <small>([[User talk:Anachronist|talk]])</small> 17:48, 31 August 2024 (UTC)
::I will also chime in and request that the source code be made available ''before'' approval. [[User:EggRoll97|EggRoll97]] <sup>([[User_talk:EggRoll97|talk]]) </sup> 19:01, 1 September 2024 (UTC)
:::I also feel it is important that the source be released and a reasonable amount of time be allowed for review before approval for production use. [[User:RoySmith|RoySmith]] [[User Talk:RoySmith|(talk)]] 19:06, 1 September 2024 (UTC)
 
{{ping|Daniel Quinlan}} This bot was approved temporarily and the approval period is almost done. I have seen no activity from this bot. Were you planning to start it up?
 
Also, your source code availability conditions are backward. For something like this, it should be available for examination ''before'' approval, not after. ~[[User:Anachronist|Anachronist]] <small>([[User talk:Anachronist|talk]])</small> 19:12, 1 September 2024 (UTC)
 
:I don't think releasing source code is a normal BRFA requirement. I think BRFA is normally based around consensus for the task plus performance in trials. –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 19:55, 1 September 2024 (UTC)
::I'm pretty much a BRFA newbie, but I've been editing wikipedia for almost 20 years, been working on open source coding projects longer than that, and writing software in general a lot longer than that. I'm just not seeing any reason to make releasing the code conditional on approval to run it. [[User:RoySmith|RoySmith]] [[User Talk:RoySmith|(talk)]] 20:08, 1 September 2024 (UTC)
:::Assuming good faith, Daniel probably meant something like "let me get the bot working, then after that I'll take the extra time and effort to spin up git and a GitHub repo". –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 20:52, 1 September 2024 (UTC)
::::I'm always happy to AGF. I guess I was mostly responding to the statement that BRFA doesn't normally require releasing the source code. If that's true, I think it's an unfortunate state of affairs. I was also thinking of a conversation I recently had in another setting regarding the fragility of the whole ecosystem of scripts, bots, and other bits of software on which the smooth running of enwiki depends, and how often some important tool gets abandoned with no practical way for another developer to take it over. But, I really shouldn't be trying to make this particular request a soapbox for all that. [[User:RoySmith|RoySmith]] [[User Talk:RoySmith|(talk)]] 21:27, 1 September 2024 (UTC)
:::::Thanks for sharing your views. I might be open to supporting a rule that complex bots need to have their source code in the BRFA, if proposed on the right talk page. I agree that it helps immensely with keeping old bots running once their owners go inactive. –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 21:54, 1 September 2024 (UTC)
::::::For an admin bot like this, the bot policy recommends (but doesn't require) a source code review. The review doesn't have to be community-wide. ~[[User:Anachronist|Anachronist]] <small>([[User talk:Anachronist|talk]])</small> 22:48, 1 September 2024 (UTC)
::{{ping|Novem Linguae}} Per the bot policy, {{tq|It is recommended that the source code for adminbots be open, but should the operator elect to keep all or part of the code not publicly visible, they must present such code for review upon request from any BAG member or administrator.}} I am not either (though I would fancy myself technically competent enough to have a look through it), but at least two administrators and a BAG member have now requested that the source code be made available. While providing the code privately to those individuals would technically satisfy the conditions of [[WP:ADMINBOT]], I don't see any reason why the source code would need to be private. [[User:EggRoll97|EggRoll97]] <sup>([[User_talk:EggRoll97|talk]]) </sup> 22:35, 1 September 2024 (UTC)
:{{ping|Anachronist}} I've been pulled away from working on this the last few weeks, but the bot is nearly ready for activation.
:As mentioned in the BRFA, the source code will be released. In addition, {{u|Novem Linguae}} has kindly agreed to review the code prior to activation (and if Novem Linguae ends up being too busy, I'll ask someone else to review). While I understand the need for contingency plans on some critical bots, I'm concerned that requiring completed source code ''prior'' to approving projects would be a strong disincentive for future development.
:Based on the above discussion and reviewing logs, exclusion using the {{t|bots}} template doesn't seem to be necessary or helpful, so that functionality has been left out. Also, if an administrator wishes to prevent restoration of a long-term protection, unprotecting the page before applying the new protection will be sufficient and is less hacky than some other approaches that I considered. Based on my experience handling requests on [[WP:RFPP]], I expect that to be rare, though.
:Finally, the bot is designed to handle both temporary and indefinite protections. [[User:Daniel Quinlan|Daniel Quinlan]] ([[User talk:Daniel Quinlan|talk]]) 09:08, 2 September 2024 (UTC)
::Thank you. I look forward to seeing it in action. ~[[User:Anachronist|Anachronist]] <small>([[User talk:Anachronist|talk]])</small> 17:13, 2 September 2024 (UTC)
:::The source is located at {{GitHub|danielquinlan/protection-helper-bot|link=hidden}}. I'm still cleaning up the code, revising some of the method names, etc. so if anyone has feedback, I'd appreciate an email rather than pull requests or GitHub issues at this point. Thanks. [[User:Daniel Quinlan|Daniel Quinlan]] ([[User talk:Daniel Quinlan|talk]]) 21:40, 3 September 2024 (UTC)
:::I'm also on [[Wikipedia:Discord|Discord]] if anyone has any questions that you would like to ask interactively. [[User:Daniel Quinlan|Daniel Quinlan]] ([[User talk:Daniel Quinlan|talk]]) 22:06, 3 September 2024 (UTC)
::{{tq|1=requiring completed source code ''prior'' to approving projects would be a strong disincentive for future development.}} The "completed" source code isn't being requested. You're free to change the source code any time, including after the approval – only major changes in functionality require a new supplementary BRFA. – [[User:SD0001|<span style="font-weight: bold; color: #C30">SD0001</span>]] ([[User talk:SD0001|talk]]) 17:25, 3 September 2024 (UTC)
:::I guess what's really bugging me about this is trying to understand ''why'' anybody would not want to release the code early. @[[User:Novem Linguae|Novem Linguae]] said a couple of days ago, {{tq|let me get the bot working, then after that I'll take the extra time and effort to spin up git and a GitHub repo}}. To me, it's hard to imagine "git init" not being pretty close to the first thing I type when starting any new project. It's just good software engineering hygiene. And pushing it out to some storage that's more robust than my laptop's hard drive isn't far behind. [[User:RoySmith|RoySmith]] [[User Talk:RoySmith|(talk)]] 18:26, 3 September 2024 (UTC)
::::The significant part is {{tpq|let me get the bot working}}, not setting up source control. It took me five minutes to create the repository and package the script. Requiring someone to invest a significant amount of time developing code ''prior'' to approving a project is the issue. This wasn't a ten line user script, it was a significant investment of my free time in the month since project was approved. [[User:Daniel Quinlan|Daniel Quinlan]] ([[User talk:Daniel Quinlan|talk]]) 21:19, 3 September 2024 (UTC)
:::::@[[User:Daniel Quinlan|Daniel Quinlan]] Thank you. My apologies for the gruff tone I inadvertently adopted. This is just something that pushes my buttons and I should not have taken it out on you. [[User:RoySmith|RoySmith]] [[User Talk:RoySmith|(talk)]] 23:02, 3 September 2024 (UTC)
::::::I've kicked off a discussion at [[Wikipedia_talk:Bot_policy#Open_source_bots]]; let's continue there if people have feelings about this. [[User:Legoktm|Legoktm]] ([[User talk:Legoktm|talk]]) 03:55, 5 September 2024 (UTC)
 
The bot is running now. The code review by {{noping|Novem Linguae}} highlighted a few areas for improvement, especially improving some method names for clarity, which I'm addressing. There are also several cases where the bot won’t reprotect an article but where a notification might be helpful. To address this, I plan to add a user talk page notification to the administrator who performed the expired protection, but only for those cases.
 
The vast majority of articles that would have been reprotected have already been handled (either due to disruption resuming or administrators monitoring expirations), but even with that constraint, the bot has already restored long-term protection on several pages protected under [[WP:GS|general sanctions]], two under [[WP:CT/A-I]] and one under [[WP:GS/RUSUKR]].
 
Link to relevant contributions as per the terms of the trial: [[Special:Log/protect/Protection Helper Bot]]. [[User:Daniel Quinlan|Daniel Quinlan]] ([[User talk:Daniel Quinlan|talk]]) 01:35, 4 September 2024 (UTC)
 
:As the trial period is ending, I've turned off the bot for the time being. [[User:Daniel Quinlan|Daniel Quinlan]] ([[User talk:Daniel Quinlan|talk]]) 23:40, 4 September 2024 (UTC)
::{{Bot trial complete}} –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 00:18, 5 September 2024 (UTC)
:::Okay... so what happens now? Assuming that the trial didn't turn up any issues, what must happen to activate the bot for real? ~[[User:Anachronist|Anachronist]] <small>([[User talk:Anachronist|talk]])</small> 01:27, 5 September 2024 (UTC)
::::A [[WP:BAG]] member will swing by and make a decision, which is typically full approval or another trial, unless there's something special about adminbots that I'm not aware of or I'm missing something. –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 02:20, 5 September 2024 (UTC)
::The bot only appears to have run for 10 protections and 1 day, not 30 days. The trial period only starts when you start the bot. – [[User:SD0001|<span style="font-weight: bold; color: #C30">SD0001</span>]] ([[User talk:SD0001|talk]]) 17:52, 5 September 2024 (UTC)
:::The bot and admin flags for that bot have expired, so it would have to be re-flagged to continue the trial, I think. –[[User:Novem Linguae|<span style="color:blue">'''Novem Linguae'''</span>]] <small>([[User talk:Novem Linguae|talk]])</small> 18:17, 5 September 2024 (UTC)
:::The bot completed the actions it was able to during the trial. It processed about 13,000 protection logs, identifying 741 relevant expirations, and out of those only 10 pages had protections that needed to be restored, which the bot handled successfully.
:::Going forward, whether in an extended trial or after approval, the pace of protections will generally be very slow now that the backlog has been handled. A quick review doesn't show anything that will be reprotected in the next week, but that could change. [[User:Daniel Quinlan|Daniel Quinlan]] ([[User talk:Daniel Quinlan|talk]]) 19:48, 5 September 2024 (UTC)
Thanks for taking this task on Daniel. Where is the bot going to be running from? Does the account have 2FA set on it and are you using OAuth or BotPasswords to log in? [[User:Legoktm|Legoktm]] ([[User talk:Legoktm|talk]]) 03:18, 5 September 2024 (UTC)
 
:{{ping|Legoktm}} I have a secure Linux server, only accessible by me, where I will be running it. The server is regularly updated with the latest security patches, and I follow best practices for securing remote access. I submitted a request to enable 2FA for {{noping|Protection Helper Bot}} on meta. The reprotection script is using a BotPassword with the minimum set of required permissions enabled. [[User:Daniel Quinlan|Daniel Quinlan]] ([[User talk:Daniel Quinlan|talk]]) 05:43, 5 September 2024 (UTC)
:2FA is now enabled for {{noping| Protection Helper Bot}}. [[User:Daniel Quinlan|Daniel Quinlan]] ([[User talk:Daniel Quinlan|talk]]) 06:36, 5 September 2024 (UTC)
::{{BotExtendedTrial}} Same terms as previous, but since as mentioned the bot didn't actually start editing until the end of the temporary permission grant, we might as well go again. Please count the previous edits as part of the 25 edits stipulated in the first trial. [[User:Primefac|Primefac]] ([[User talk:Primefac|talk]]) 13:00, 7 September 2024 (UTC)
:::{{ping|Primefac}} Thanks. Note that if the bot had been active all month, it would have made only one additional protection (for [[Mahatma Gandhi]] which was reprotected manually). The bot is running again, but no restorations are currently scheduled to happen until 22 September. A simulation shows only 58 protections would have been restored in the past year and there are idle periods like the current one. If this bot is approved, I expect the rate to increase somewhat over time because there will be less downside to making short-term higher-level protections. [[User:Daniel Quinlan|Daniel Quinlan]] ([[User talk:Daniel Quinlan|talk]]) 02:47, 8 September 2024 (UTC)
::::Ah, fair enough, it seems I misread the earlier statement regarding the bot running. I don't see any major issues, complaints, or concerns that haven't been dealt with, so I'll go ahead and make it official:
::::{{BotApproved}} If there are any significant changes or updates required (other than the usual minor maintenance/debugging sorts of things) please ping {{t|@BAG}} on the talk page or at [[WP:BOTN]] for review/approval. [[User:Primefac|Primefac]] ([[User talk:Primefac|talk]]) 13:56, 8 September 2024 (UTC)
:''The above discussion is preserved as an archive of the debate. <span style="color:red">'''Please do not modify it.'''</span> To request review of this BRFA, please start a new section at [[Wikipedia:Bots/Noticeboard]].''<!-- from Template:Bot Bottom --></div>