Wikipedia:Bots/Requests for approval/NovemBot


 * The following discussion is an archived debate. Please do not modify it. To request review of this BRFA, please start a new section at Bots/Noticeboard. The result of the discussion was

NovemBot
Operator:

Time filed: 19:52, Sunday, September 12, 2021 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): PHP

Source code available: https://github.com/NovemLinguae/NovemBotTask1

Function overview: After approved by the coordinators, promote successful good topic and featured topic candidates. This process has many steps and is currently done manually. The steps are located at User:Aza24/FTC/Promote Instructions.

Links to relevant discussions (where appropriate): Bot requests/Archive 82, Wikipedia talk:Featured topics

Edit period(s): Probably hourly

Estimated number of pages affected: 25 per week

Exclusion compliant (Yes/No): No

Already has a bot flag (Yes/No): Yes

Function details: Testing - I've done some semi automated testing (where the bot suggests changes via a webpage, then I copy paste that into Wikipedia, hit preview and diff, look it over, then submit). This process identified and fixed some bugs. I think the bot has reached a state where all major bugs are fixed. Ready to start letting it automatically edit. I'll continue watching the edits for several weeks to see if there are any more edge cases that need fixing.

I wrote unit tests for about half the bot's functions. The bot's steps that it takes are divided into about 30 functions in the src/Promote.php file.

Eventually I'll put this on ToolForge and let it run hourly.

The bot is summoned by placing the template User:NovemBot/Promote on a page, which puts the page into a hidden tracking category that the bot checks.

Security features to prevent abuse include the bot not editing unless the featured topic template is located on the summoning page, and some maximum article and maximum topics in category throttles.

Keep in mind that topics are variable in size. To promote each one is around 15-50 edits. For a trial, may make sense to approve a period of time or a certain # of topics, rather than a certain # of edits.

Discussion

 * As a delegate at FGTC, I just wanted to echo some of the above. I've been supervising and assisting Novem as they created this spectacular bot and the test runs have already made massive improvements in the FGTC process (which is otherwise extremely slow due to the mass manual updating required). This would be an invaluable bot and I have no doubts in the merits and quality of Novem's achievement. Aza24 (talk) 23:11, 17 September 2021 (UTC)
 * Is anyone able to trigger the bot? Or is it available only to FGTC coordinators? – SD0001  (talk) 07:46, 18 September 2021 (UTC)
 * Currently anyone because that was easier to code, but I am open to feedback. – Novem Linguae (talk) 11:51, 18 September 2021 (UTC)
 * Given the large number of edits needed to implement each promotion, I think it would make sense to add some anti-abuse measure restricting usage to only trusted users, though I don't think the potential for disruption is high to block even a trial. Since it appears the bot gets pinged (User:NovemBot/Promote), maybe it could check who pinged it using the Echo API? – SD0001  (talk) 14:47, 19 September 2021 (UTC)
 * Sounds good. I'll look into adding a user whitelist. – Novem Linguae (talk) 18:19, 19 September 2021 (UTC)
 * Trial complete. List of edits, minus the bottom edit. Was a slow month, only one topic was submitted for promotion: Featured and good topic candidates/Protected cruisers of France/archive1. I did not set up the bot for full automation yet, I am still previewing and hitting the "run" button myself. By doing that I caught and fixed some things that would have been issues with this particular topic. The list of articles is normally wikilinks, but in this case it was templates. The bot correctly detected that it couldn't handle this, but I had not written the code for it to write error messages to the archive1 page yet, so I wrote that, then I hit the run button.


 * Then, while not strictly necessary, I added some code to convert  to a space. More cosmetic than anything... keep from uglifying a bunch of talk page Wikicode. Then I let the bot run, and it got to the parts of its code that were well tested, and did its thing. Maybe  can take a look at User:NovemBot's contribs and double check the edits, would be good to get a second set of eyes on it, but I suspect those are fine as that code is frequently used and well-tested.


 * Anyway, I am super busy with work, and I have not gotten a chance to write the requested whitelist yet. My suggestion would be a 2 month extension of the trial, to give my work time to calm down, to give me time to write and test the whitelist, to give me time to set up the bot to be fully automated, and to give us more testcases. Thank you for your consideration. – Novem Linguae (talk) 18:44, 19 October 2021 (UTC)
 * Today I realized that including "List of" in the title of Featured topics/List of protected cruisers of France is probably a bug. I will get confirmation, fix the code, and repair the error. I also discovered and fixed another bug involving cutting off topic descriptions: – Novem Linguae  (talk) 05:16, 26 October 2021 (UTC)
 * BAGAssistanceNeeded
 * @Novem Linguae Sorry about the delayed response. I haven't had a chance to review this, but in the meantime, feel free to continue the trial if there are more promoted topics to process. (If any other BAG member more familiar with FGTC wants to review this, that would be welcome.) – SD0001  (talk) 19:23, 13 November 2021 (UTC)
 * Any updates? -- The SandDoctor Talk 07:28, 29 December 2021 (UTC)
 * Sorry for the delay. We had a month or two with no FGTC promotions. I got a promotion this week that I will use to continue the trial. My game plan is 1) code SD0001's feedback (for security, only respond to pings from users on a whitelist), 2) set up fully automated on Toolforge, 3) promote 2 topics so we have a reasonable quantity of test cases, 4) ping you and SD0001 to complete the trial. cc User:Aza24. – Novem Linguae (talk) 07:35, 29 December 2021 (UTC)
 * Sounds good. How long do you figure this might take? We can put this on hold if desired. Pinging is indeed important (thank you) as this will fall off my watchlist in 30 days or otherwise probably slip through the cracks without it. -- The SandDoctor Talk 07:42, 29 December 2021 (UTC)
 * 2-4 weeks. I'd suggest leaving it open, but not opposed to "on hold" if you think that's best. "On hold" doesn't revoke permission for the bot to do trial edits, correct? – Novem Linguae (talk) 07:47, 29 December 2021 (UTC)

Checking in 2021-12-30
Alright, the bot made a bunch of edits this week, so I am checking in.

There were some bugs that I patched. The bot pings me every time it runs so I am keeping an eye on it and patching bugs as needed. This ended up being a complex bot task. I have 91 unit tests and I am still encountering bugs. Not sure if you want to mark it approved or extend the trial. Either way I will continue supervising it and patching things as needed. Thanks. P.S. SD0001, I have fully implemented your "ping the bot" whitelist idea that you requested. – Novem Linguae (talk) 04:45, 31 December 2021 (UTC)
 * That was a fast 2-4 weeks! Let's see if this gets any further comments over the next couple days. If it doesn't I think we are good to approve here. Just please do continue patching bugs as they appear. -- The SandDoctor  Talk 16:20, 31 December 2021 (UTC)

Under normal circumstances, I would prefer to leave the close for someone else. However, given the backlog, lack of recent BAG activity (myself included), and the fact that this task is uncontroversial and based on how well the trial went, I am inclined to make an exception for this. As per usual, if amendments to - or clarifications regarding - this approval are needed, please start a discussion on the talk page and ping. -- The SandDoctor Talk 18:34, 3 January 2022 (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 Bots/Noticeboard.