Wikipedia:Bots/Requests for approval/Yapperbot
- 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 Approved.
Operator: Naypta (talk · contribs · SUL · edit count · logs · page moves · block log · rights log · ANI search)
Time filed: 17:00, Friday, May 15, 2020 (UTC)
Automatic, Supervised, or Manual: automatic
Programming language(s): Golang
Source code available: https://github.com/mashedkeyboard/yapperbot-frs
Function overview: Replaces the functionality of Legobot in handling the Feedback Request Service, seeing as Legobot has not been doing so for many months.
Links to relevant discussions (where appropriate): Wikipedia talk:Feedback request service#Not getting any invitations?
Edit period(s): Hourly
Estimated number of pages affected: Potentially the talk page of any user who opts in at WP:FRS, as well as any page that contains an RfC, and an admin page in the bot's userspace
Exclusion compliant (Yes/No): No
Already has a bot flag (Yes/No): No
Function details: The bot performs exactly the same work as that of Legobot in this area; that is to say, it checks for new RfCs and new Good Article nominations, and when it finds one, looks up relevant people on the WP:FRS page and sends a random sample (between 15 and 25) a notification, letting them know that it is there. For RfCs, it adds the RfC ID to a JSON file stored in the bot's userspace, which tells Yapperbot that it's already sent the RfC invites and doesn't need to again. It will remove the ID from the JSON once the RfC has been removed from the page. GA nominations are done through a different system, and do not require this - instead, as only one GA nomination can exist per page, they work by iterating through the nominees category, and saving the timestamp of the last completed nominee.
This is a complete rewrite of the bot in Golang, with no code even related to the current Legobot implementation. This has the main advantage that there is no database - all the needed information is stored on-wiki - so it would be a whole lot easier for someone else to pick up the bot in the event that I'm unable to continue to manage it and it breaks. I also suspect that, due to the compiled nature of Golang, it'd be a hell of a lot faster - although that's a suspicion, rather than any kind of actual metric.
The only cross-dependency on Legobot that it does have is for RfC IDs being given; however, there's no indication that Legobot is going to stop handing those out any time soon, so I think that should be alright for now. In the event that it does, this bot will stop working too, but all that means is that it just won't send out any RfC invites until either Legobot is fixed or this bot is patched to work without Legobot's intervention.
I've tested the bot on testwiki, and it appears to work correctly and as expected. The only change necessary to the way that the FRS currently works would be for the GA subscription headers to be updated for the new topics used by GA, which can be seen on the nominations page here. It is not necessary for the GA project to change anything or notify anyone so long as they are only changing subtopics; however, adding a new topic will not cause notifications to be sent until the FRS page is updated to match (because, obviously, there's nobody to send to). I would, however, also like to suggest that, as a one-off run, people with no contributions in a number of years are removed from the FRS list, as it seems there's a fair few of them.
Discussion
[edit]- Thank you very much for tackling this. Looking forward to seeing it in action. It's great that you made it reusable by others, too. − Pintoch (talk) 17:16, 15 May 2020 (UTC)[reply]
- Is there some reason that User:Yapperbot/FRSSentCount.js is called User:Yapperbot/FRSSentCount.js, not User:Yapperbot/FRSSentCount.json? * Pppery * it has begun... 18:41, 15 May 2020 (UTC)[reply]
- @Pppery: Yes, there was - and it's quite simply that I didn't realise that the
edituserjson
flag existed in the same way that theedituserjs
flag does! I've never previously had a need to store JSON, and knew that JS got that protection, so I thought I'd just put it in a JS page instead. Thanks for pointing that out, I'll go change it over to use the .json page! Naypta ☺ | ✉ talk page | 19:39, 15 May 2020 (UTC)[reply]
- @Pppery: Yes, there was - and it's quite simply that I didn't realise that the
- Approved for trial (100 edits or 14 days). Please provide a link to the relevant contributions and/or diffs when the trial is complete. Whichever comes first. Primefac (talk) 17:59, 22 May 2020 (UTC)[reply]
- Trial complete. You can see an overview of the messages which were sent by inspecting the "database" Yapperbot uses at User:Yapperbot/FRSSentCount.json. Naypta ☺ | ✉ talk page | 09:37, 23 May 2020 (UTC)[reply]
I'd like to also explicitly request approval to run a one-off script on the FRS page, at least removing {{Frs user}} templates of usernames that are blocked or do not exist, and possibly removing users that haven't had any edits in a very long time too - just to clean things up a bit and make Yapperbot waste less time sending messages to users that aren't going to read them. Naypta ☺ | ✉ talk page | 09:47, 23 May 2020 (UTC)[reply]- I don't think that needs approval, as long as the script just processes the wikitext of the page and you manually copy and paste it into the edit window and click save. * Pppery * it has begun... 14:56, 23 May 2020 (UTC)[reply]
- That's fair - I was thinking of doing it automated, but I could just run the script and then do it manually. I'll do it that way instead then Naypta ☺ | ✉ talk page | 15:17, 24 May 2020 (UTC)[reply]
- I don't think that needs approval, as long as the script just processes the wikitext of the page and you manually copy and paste it into the edit window and click save. * Pppery * it has begun... 14:56, 23 May 2020 (UTC)[reply]
- Redrose64 pointed out that it seems that Legobot has trouble removing RfCs that contain the
|frsdone=
parameter that Yapperbot was previously using to make sure it didn't send invitations more than once. I'm making a note of this on the {{rfc}} template so nobody tries that again, then, as that behaviour was previously undocumented, but I've also switched Yapperbot to using a JSON file to store the RfC IDs that it's done, so that problem won't reoccur when the bot is running normally post-approval. Naypta ☺ | ✉ talk page | 09:50, 31 May 2020 (UTC)[reply]- @Naypta: Please update the task description to reflect this change in how it operates. --TheSandDoctor Talk 06:17, 1 June 2020 (UTC)[reply]
- @TheSandDoctor: Done - cheers! Naypta ☺ | ✉ talk page | 09:46, 1 June 2020 (UTC)[reply]
- @Naypta: Please update the task description to reflect this change in how it operates. --TheSandDoctor Talk 06:17, 1 June 2020 (UTC)[reply]
- {{BAGAssistanceNeeded}} Would be great to get someone to chat about next steps to get this running, when a BAG member has a moment - it's been a couple of weeks since the trial ended, and there are a lot of RfCs open at the moment (117 at the time of writing), so it'd be useful to have the FRS working again! :) Naypta ☺ | ✉ talk page | 21:17, 7 June 2020 (UTC)[reply]
Approved. Primefac (talk) 23:29, 15 June 2020 (UTC)[reply]
- 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.