Wikipedia:Bots/Requests for approval/RMCD bot


 * 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

RMCD bot
Operator:

Time filed: 15:50, Wednesday July 25, 2012 (UTC)

Automatic, Supervised, or Manual: Automated

Programming language(s): PHP

Source code available: User:RMCD bot/requestedmoves.php

Function overview: Maintains Requested moves and related pages.

Links to relevant discussions (where appropriate): Administrators' noticeboard/IncidentArchive761, Wikipedia talk:Requested moves/Archive 23, Wikipedia:Village pump (technical)/Archive 101, Wikipedia Signpost/2012-07-23/Technology report

Edit period(s): Every 15 minutes

Estimated number of pages affected: Requested moves/Current discussions, Requested moves/Current discussions (alt), Dashboard/Requested moves, and talk pages involved in the process.

Exclusion compliant (Yes/No): Yes, but see discussion below

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

Function details: This account will take over what User:RM bot has been doing with WP:RM, which is to primarily update the list of requested move discussions.

Discussion
Wbm1058, do you understand the code at User:RM bot/requestedmoves.php? Could you change it if in the future there were a problem with this task? If you understand the code and botclasses.php, you should know whether this task is exclusion-compliant or not as written. Thanks, &mdash; madman 03:39, 26 July 2012 (UTC)
 * First, I'll respond to what I feel is a sidebar issue as to whether this task is exclusion-compliant or not as written. "Exclusion compliant" means whether the bot honors bots template requests to exclude pages from bot processing. I question whether it should.  Do we want someone to be able to "sneak through" their controversial requested move by using a template to exclude mention of the request to a wider audience at Requested moves/Current discussions?  I think not.  Anyway, while the currently inactive User:RM bot is still in Category:Active Wikipedia bots, and not Category:Inactive Wikipedia bots, it is not in Category:Wikipedia bots which are exclusion compliant—this despite the fact that in Bots/Requests for approval/RM bot, harej said he had made it compliant, as indeed in this diff, it appears that he did add a call to the nobots function, which is in botclasses.php—I'll assume that botclasses works as advertised, and that Mr. Hare understood how to use it properly. Will answer the rest of your question shortly. Wbm1058 (talk) 15:06, 26 July 2012 (UTC)


 * In my discussion at Village pump (technical), which I linked to above, I said that I would need to learn (more) PHP (and of course, the API), and "I can't pretend that I fully understand how it works." But, having said that, I do believe that I understand the program at a very high level.  We should make a distinction between bot operator and bot programmer.  The immediate issue is that RM bot, which it seems may be running on a computer owned by the operator, which only the operator has access to, has crashed, perhaps because the system it runs on has itself crashed.  The objective today should be to get the bot, which many editors view as somewhat "mission critical," back up and running. (There is a growing backlog at Requested moves/Current discussions, which is technically just an administrative problem, but editors have diverted their work to maintaining this page which the bot formerly maintained.)  That should not require significant program changes and bug fixing.  We may not be able to restore the current bot exactly, because it seems that systems for good source code version control are lacking.  It seems that Hare's last version is the best we have to work with.  I understand the code well enough to temporarily modify it to write pages like User:Wbm1058/Requested moves to my userspace for testing purposes.  I have a problem in that only a limited number of the articles which should be linked on that page are.  Note the articles that made it to that list tend to have foreign names with special UTF-8 characters.  Since I haven't changed anything of substance in Hare's source, I suspect the problem may be with my php.ini file, I've created my own as I didn't find Hare's php.ini—I'll keep working on it—suggestions and advice appreciated.  I certainly don't expect my bot to be approved before I can produce accurate versions of the lists it writes in my userspace files.  I've made it this far because nobody else has addressed the problem.  In any event I now have an area where I can play with it and perhaps work on bug fixes and/or enhancements in the future.  I view my bot as a stopgap because it runs on my private computer.  Maybe it could serve as a backup bot in the future, should a problem like this happen again.  If Chris can get a fix running before I can, great.  If Chris can get this running on a server with 24/7 support, great! BTW, I did login at  yesterday, but it seems I can only listen in, not send messages? Wbm1058 (talk) 17:37, 26 July 2012 (UTC)


 * Hi Wbm1058. A few things:
 * Users aren't under any obligation to add their bots to Category:Wikipedia bots which are exclusion compliant. Some will, but it is not an exhaustive list. A bot being in there is indicative that it is compliant, but the inverse isn't the case. Right now, the bot is definitely exclusion compliant as per the  check. It seems botclasses.php implements exclusion well enough. I don't have a strong opinion either way regarding whether compliance is a good idea, but I think it would be best to keep the current state. RM does not strike me as the sort of ultrasensitive process (like antivandalism or CSD tagging) that would be get away with ignoring bots, but I could be wrong about that.
 * Regarding running it on your private computer vs. a server 24/7, it might be useful to look into Wikimedia Labs or the Toolserver for a more permanent solution. The Toolserver has been around for a long time but is short on resources, whereas Labs is still very new and (in my opinion) more complicated to use. The Toolserver also provides replicated copies of Wikimedia MySQL databases, although Labs will be getting this to at some undetermined point in the future.
 * I'm sorry about your negative experience in the IRC channel. It tends to be a bit quiet most times of the day. I suspect you were able to send messages but no one was around to hear them (or alternatively, if you were using Freenode's webchat, maybe you missed the text box at the bottom?). If you feel like coming in again and Earwig is in the channel, feel free to say hi!
 * All the best. —  Earwig   talk 06:40, 27 July 2012 (UTC)
 * Yes, that's it—I missed the text box at the bottom of Freenode's webchat—got it now. Are those servers both running Linux? My personal setup is Windows 7. I addressed one problem with the bot today, see Template talk:Move-multi, but I don't think that's the cause of RM bot going AWOL. Wbm1058 (talk) 16:25, 27 July 2012 (UTC)
 * Mmm, yes; The Toolserver has both Debian and Solaris servers for now, and Labs runs Ubuntu if I remember correctly. —  Earwig   talk 22:12, 27 July 2012 (UTC)
 * I don't concent 162.221.179.46 (talk) 00:41, 8 June 2023 (UTC)

Status update
I've gone into bug fixing mode (figuring out necessary source edits which must have been made after 1 January 2010)—I need to learn enough in the short term to get a viable replacement for RM bot up ASAP. I'm making progress and expect to make another update later today Wbm1058 (talk) 17:04, 30 July 2012 (UTC)
 * The call to the getTransclusions function $transcludes = $objwiki->getTransclusions("Template:Movereq"); was only returning an array of 6 talk pages. Why it returned the six it did, I don't know, but after changing it to bypass the redirect, i.e. $transcludes = $objwiki->getTransclusions("Template:Requested move/dated"); it now returns an array of 278 talk pages, which is consistent with the count of pages in Category:Requested moves.  Harej's last source code edit was 1 January 2010‎, and Template:Movereq moved to Template:Requested move/dated on 13 August 2010‎.
 * the six talk pages all have the deprecated template:movereq in them (which is now a redirect). Any purpose in this? Entered incorrectly, without substitution? : Ligue Nationale de Basketball, Johanna Marau Ta‘aroa, Eric son of Ring, 3 others
 * Great to hear that you identified the issue. Perhaps the bot should process transclusions of movereq and requested move/dated together? —  Earwig   talk 22:11, 30 July 2012 (UTC)
 * Yes, I think so. I've been learning PHP regular expressions today. This stmt is finding section names for both. preg_match("/=+\s?.*\s?=+(?=\n+.*\{{2}(Requested move\/dated|movereq)+[^}]*\}{2}+)/iu", $contents, $m);
 * I'm a bit hung up on how it finds the new titles. That part isn't working. Seems to be caught in a loop until it generates errors. Maybe I'll figure it out tomorrow. Wbm1058 (talk) 01:25, 31 July 2012 (UTC)

Bot has been running automated for over 2 days (Special:Contributions/RMCD bot) and bugs have been fixed (Wikipedia talk:Requested moves and Wikipedia talk:Requested moves), including some which were in User:RM bot. – Wbm1058 (talk) 16:42, 28 August 2012 (UTC)
 * This bot appears to have edited since this BRFA was filed. Bots may not edit outside their own or their operator's userspace unless approved or approved for trial. AnomieBOT ⚡ 18:18, 31 July 2012 (UTC)
 * Ready for next step. I've posted my source code changes. Program is running successfully (manually) and appears to be producing good results.  Main output is directed to User:Wbm1058/current, User:Wbm1058/current-oldstyle and User:Wbm1058/Requested moves.  I tested exclusion compliance at talk:Eric Boyer (view the edit history).  Putting the nobots template on the page prevented the move discussion in progress notice from posting to the page.  Note that this is the only exclusion compliant feature of the program.  You can't use nobots to have any effect on the output to the three main pages written by this bot. Wbm1058 (talk) 23:50, 1 August 2012 (UTC)
 * well maybe not quite yet. Noticed a couple more changes made to the code since Hare's last posted version. In several places mdash was changed to ndash, and links are posted with Template:No redirect. I'll keep working on getting a faithful reproduction of the live version up. Wbm1058 (talk) 20:59, 2 August 2012 (UTC)
 * I have found and fixed several other issues. See source code version history.  Bot currently runs manually under Windows 7 PowerShell ISE.  I believe my version is now at least as robust as RM bot was, if not better.  I still need to automate it. Can it be approved for testing.  Editors have been manually updating the requested moves and I'm sure they want to be relieved of that task ASAP. Wbm1058 (talk) 23:47, 21 August 2012 (UTC)
 * &mdash; madman 00:03, 22 August 2012 (UTC)
 * 2 days? To iron out the bugs sounds that time period really not enough. mabdul 10:29, 22 August 2012 (UTC)
 * It looks to me like there are quite a few requested moves in a day. But the operator may always feel free to request more time. &mdash; madman 15:26, 22 August 2012 (UTC)
 * My request stated that the bot would be Automatic, but right now I can only run it in Supervised/Manual mode. It will take more time to get it automated.  I am still fixing minor bugs, and just put up a new version today.  I'm still working on another minor issue (pattern matching can be tricky and this project is my initiation into regular expressions).  Once approved, should I come back here to request approval for new versions, or am I free to put up new versions to fix issues and/or add features?  I'm OK with keeping it in trial until it's automated, but if you think it's OK to just approve it now, I'm fine with that too. Wbm1058 (talk) 13:05, 24 August 2012 (UTC)
 * I haven't reviewed the results of the trial yet, but generally if you've requested approval for an automated task, we're going to want to see it run on automatic before approval. Tasks simply don't always run the same way by themselves as they do when they can solicit user input. And if you have any known bugs right now, we'd prefer they be ironed out before we approve the task. If you discover bugs after the task has been approved, you may of course fix them, but if you want to add features or in some other way change how the task itself functions, it'd be best to seek re-approval. Thanks, &mdash; madman 13:29, 24 August 2012 (UTC)
 * OK, I'll let you know when I've finished bug-fixing and have it automated. For clarification, the bot doesn't solicit user input.  All I do is enter the command to start it, and check the console output and pages it writes after it's finished. Wbm1058 (talk) 13:56, 24 August 2012 (UTC)
 * – Reviewed the last hundred edits and without going into the history of every request, everything looks good and I'm confident you'll be able to iron out any more bugs that may be discovered. Cheers! &mdash; madman 01:06, 29 August 2012 (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.