Wikipedia:Bots/Requests for approval/CorenANIBot


 * 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 Symbol neutral vote.svg Request Expired.

CorenANIBot
Operator:

Automatic or Manually Assisted: Fully Automatic

Programming Language(s): Perl, using the same framework as CSBot

Function Summary: Creates individually watchable subpages for noticeboards.

Edit period(s) Continuous:

Edit rate requested: maxlag=5

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

Function Details: CorenANIBot watches additions to specified pages (WP:AN/I and WP:AN are planned targets) for creation of new sections and, upon finding a new section, creates a new subpage named " /date/ " with the contents of that section and replaces the section with a transclusion of the new subpage garnished with links to watch, view (for permalinks) and edit that subpage specifically.

CorenANIBot will never try to move a section twice, or attempt to move a section whose subpage already exist.

Specifically, as discussed here.

Discussion

 * As a request lets just start with just ANI, and use that as a trial. As AN is not as busy or as large. βcommand 17:08, 6 January 2008 (UTC)
 * Oh, certainly— AN was added to the list of possible targets by request. At any rate, I was expecting the bot would do its trial in userspace.  — Coren (talk) 17:21, 6 January 2008 (UTC)

Will only the content of the section be moved or the content along with the ==header==? Миша 13 17:23, 6 January 2008 (UTC)
 * I was considering either/or as configurable. I can see advantages to both, and inconvenients to both, and I haven't quite made up my mind yet.  Moving the headers simplify the coding somewhat (easier to find things to move), but having the header on the subpage seems redundant.  Cosmetically, the result should remain the same whether the header comes from the transcluded subpage or remains on the main page— but the "cleanliness" and ease of archiving of the main page is simplified by having only the transclusion (the page then becomes the instruction header followed by a list of transclusions with no intervening headers).  Thoughts?  — Coren (talk) 17:44, 6 January 2008 (UTC)
 * I'm considering that from the perspective of my archive bot. In either case I can't see much use for it anymore. But assuming we allow "classic" threads to be intermixed with transcluded ones, the option that ==headers== are left on the main page is more reasonable (otherwise, the bits would get moved along with threads right above them. This option is an ass however considering editing such a thread (as the [edit] link wouldn't lead to editing of the subpage) and I guess user-friendliness is more important. Hence, I think that automated archiving will soon be over on ANI. Миша 13  17:54, 6 January 2008 (UTC)
 * Misza once I dig into your Archivebot.py code some more I can create an archive bot for the new method of ANI. βcommand 18:10, 6 January 2008 (UTC)
 * Then by all means fork freely - I already have enough work with rewriting archivebot.py to handle fancy stuff like resolved, ===third level headers=== and whatnot (though most of this is more or less ready and just needs to be patched together). Digging through transcluded subpages is quite unlike anything the bot was created for. I'll leave archiving in your hands then. Миша 13 18:39, 6 January 2008 (UTC)
 * Ive got a working copy of a template based archive script if you want it. βcommand 18:51, 6 January 2008 (UTC)

I've split the pear in half and will place the header in the transclusion template; that will provide edit, view and watch links and the header itself. — Coren (talk) 21:22, 6 January 2008 (UTC)
 * Check out User:CorenANIBot/Incidents. Probably some more cosmetic tweaks for Template:AutoSubpageHeader, but that's the result.  — Coren (talk) 00:50, 7 January 2008 (UTC)
 * Turns out placing the header on the transcluded subpage was the correct thing to do since it doesn't break the TOC. — Coren (talk) 02:54, 7 January 2008 (UTC)

I don't like that there's no clear place to discuss whether this should be done or not (the bot approval page doesn't seem like the right place since the bot would just be what is doing it, arguably without the bot it could be done by hand). —Random832 13:10, 7 January 2008 (UTC)
 * There is a thread on Wikipedia talk:Administrators' noticeboard that's been there for a couple of days. That thread has been posted in response to a thread on VP that got even less response.  It turns out that most people seem to think this wholly uninteresting either way, and speak up either weakly in favor or not at all— but usually not at all.  Hence the boldness.  It's not like it's hard to undo if people don't like it.  — Coren (talk) 13:22, 7 January 2008 (UTC)

It appears to be nigh impossible to reach an sort of interest in the proposal, let alone consensus that it should be done or not— it would appear people are not particularly worried about the technical format of AN/I either way. I'm half a mind to simply go ahead with the change and let the ensuing reaction guide whether the move should be undone or not (the change is fundamentally trivial to undo: a simple edit of the target page substing the subpages will, essentially, return the page to its previous format). — Coren (talk) 17:27, 19 January 2008 (UTC)
 * Post a note on ANI itself. βcommand 18:17, 19 January 2008 (UTC)
 * I believe that Coren did so some time ago, where are we at with this bot? It seems as though the community doesn't really care that much one way of the other... SQL Query me!  21:50, 6 February 2008 (UTC)
 * It would appear the community consensus is best described as "Meh.". I think nobody can get roused up enough to actively support or oppose the idea.  :-/  — Coren (talk) 21:55, 6 February 2008 (UTC)
 * I'd be interested to see how this would look (even if no one else cares), do you have a subpage somewhere, with an example of how a random days AN would look? SQL Query me!  20:44, 14 February 2008 (UTC)
 * User:CorenANIBot/Incidents is currently "live". You can actually create a section there to see how it works.  — Coren (talk) 01:51, 15 February 2008 (UTC)
 * That's really cool! It's injecting an extra \n I think, between the section header and the text of the first message, when it moves it, however. So, other than that, it appears to be technically sound.... SQL Query me!  11:32, 15 February 2008 (UTC)
 * Oh man that's awesome!   Compwhiz II ( Talk )( Contribs )  16:09, 19 February 2008 (UTC)
 * (undent) I know, this may be pointless, as this BRFA appears to have dropped off the radar, but, Coren, did you know your bot is adding newlines to sections when it moves them, b/t the == stuff, and the first comment? SQL Query me!  06:24, 23 February 2008 (UTC)
 * I am. I've been a bit busy IRL, so this low-interest bot hasn't been at the top of my to-do list.  :-)  I'll fix it if there's interest in reviving the proposal, shouldn't be too hard to handle.  — Coren (talk) 18:54, 25 February 2008 (UTC)

Been little to no activity for a while, Coren, are you still interested in pursuing this request? While I believe that the bot is technically sound, you may need to try one more time, to get attention at AN... SQL Query me!  22:12, 5 March 2008 (UTC)

Status report please. --uǝʌǝsʎʇɹnoɟʇs (st47) 12:18, 8 March 2008 (UTC)
 * Yeah, I'm interested in pursuing the matter; I'll poke AN later today and see if I can drum up some enthusiasm for responding. — Coren (talk) 15:51, 8 March 2008 (UTC)

Is the source code available? I assume CSBot is CorenSearchBot? Have you tested the bot under very heavy load on another wiki to see how it handles edit conflicts? — Carl (CBM · talk) 15:13, 19 March 2008 (UTC)
 * That of CSBot, yes, not ANIBot's (I don't release code until it's semi-clean and field tested). As for edit conflicts, they both act the same way: deal with any operation as a strictly atomic operation - an e/c causes the handling to begin anew, including the initial decision phase (to avoid, for instance, recreating an article that has since been deleted for CSBot).  But part of the effect of ANIBot is to greatly reduce the number of e/c on the target page - the only possible way to create one becomes trying to create a new section while the bot is trying to move another (presumably that had just been created as well); in which case the bot simply restarts, notes two sections to move, and tries again.  Further conflicts would just cause the bot to lag behind, as it were, until it can squeeze an edit in.  — Coren (talk) 02:00, 20 March 2008 (UTC)


 * Sounds like pretty good and well thought out :) SQL Query me!  06:57, 20 March 2008 (UTC)


 * The concern I had was that it takes two edits to move a section: one to change the code on ANI to a transclusion, and one to save the old text on the transcluded page. That's a classic situation for race conditions. If I'm hearing you right, you make the ANI edit before you make the edit to the transcluded page? — Carl (CBM · talk) 11:52, 20 March 2008 (UTC)


 * In theory, the subpage wouldn't exist at that point... However, I'm curious... How would the bot handle similarly-named sections (forgive me if it's been asked and answered already... tired... SQL Query me!  12:02, 20 March 2008 (UTC)
 * The bot uses a /date/sanitized-name_(number) format for the subpage name, and explicitly checks for conflicts.


 * Yes, the subpage wouldn't exist, but the right behavior is to link to it and then create the subpage - otherwise you don't get an atomic operation on the ANI page. If you create the subpage first, and then try to edit ANI, someone might have added a comment to it. So you get a race condition if you create and then link. (I'm not saying the ANI edit is really atomic, either, since it takes two HTTP requests; hence the concern about edit conflicts). — Carl (CBM · talk) 12:05, 20 March 2008 (UTC)
 * An edit does take two http requests, but it's reasonable to consider it atomic because of the edit token (hence edit conflicts; when the edited page is posted back, the edit token uniquely identifies the "transaction" and WM will cause an e/c if there is an intervening edit between the issue and use of the token).
 * What the bot does, specifically, is:
 * Start editing AN/I, grab a token
 * Start editing the subpage, grab a token
 * If the subpage existed, bump the name and try again from #2
 * Commit the AN/I edit
 * Commit the subpage edit/creation
 * Getting an edit conflict (or, for that matter, anything else than success) at any stage restarts the process. — Coren (talk) 14:34, 20 March 2008 (UTC)
 * Incidentally, there is a point of vulnerability between steps 4 and 5; if the bot would crash at that very moment the tread would have been removed from AN/I but not put in the subpage— but that's very very unlikely to happen in practice and not that hard to fix if it ever does: just undo the ANIBot edit and the section pops back into existence on the page. — Coren (talk) 14:40, 20 March 2008 (UTC)
 * Same as with archive bots. I'd prefer to see the subpage edit/creation done first, then the removal from AN/I.
 * The 1-5 order above makes sense to me. Thanks for the explanation. I'd still be interested to read through the code sometime. — Carl (CBM · talk) 13:21, 21 March 2008 (UTC)

Trial
As this approval stands, I'm happy to allow a trial for a few days on a smaller noticeboard to see how it goes. — Werdna talk 08:02, 21 March 2008 (UTC)
 * Suggestions on which? I was considering eating our own dogfood and run this on BOTREQ, but volume on that one seems too low to call it a satisfactory test.  — Coren (talk) 11:33, 21 March 2008 (UTC)
 * A busier talk page? A fairly unbusy village pump? The bot owners' noticeboard? — Werdna talk 11:36, 21 March 2008 (UTC)

I see the trial on WP:BON. Could you add newlines between the transclusions? Right now the source code of that page says (literally): "" A few newlines would make the source more readable. — Carl (CBM · talk) 20:28, 21 March 2008 (UTC)
 * I was just coming here to mention the same... looks like he's working on it now, at least. SQL Query me!  20:32, 21 March 2008 (UTC)
 * Yeah, I was overzealous in a small fix to remove the suprious extra newlines it insisted on adding— and now it was too few. I think I've got it exactly right this time, but it will err on the side of too many to avoid making things too ugly.  — Coren (talk) 20:38, 21 March 2008 (UTC)

By the way, how does it handle section titles like ==== ? — Carl (CBM · talk) 20:36, 21 March 2008 (UTC)
 * It creates "sanitized" subpage names for those. All the tests I've done previously dealt well with any wikimarkup I could think of, but I can tweak easily if you find something that confuses it.  — Coren (talk) 20:38, 21 March 2008 (UTC)
 * I think that as long as the bot handles the forbidden characters in article titles it should be fine. If you can get people to comment on the bot, I'll be jealous. But this one is particularly visible. — Carl (CBM · talk) 23:48, 21 March 2008 (UTC)
 * I've actually coded more defensively than that; I get rid of anything that isn't an alphanum or from a small set of safe punctuation. It's just the page name, after all, and don't need to be ornate. — Coren (talk) 23:58, 21 March 2008 (UTC)

Incidentally, I've put a notice on AN about the trial-in-progress. With a bit of luck, this time, we'll get a bit of feedback. — Coren (talk) 21:55, 21 March 2008 (UTC)
 * And, again, the idea of commenting on a bot causes great edit conflicts. sigh  — Coren (talk) 23:22, 21 March 2008 (UTC)

If this is implemented on AN or ANI, I would want the bot to maintain a page that contained simply a list of links to all currently active subpages, whose "related changes" would basically mimic all the information currently presented in the history of AN or ANI, and which could be used to see at a glance what topics are active at a given time. Christopher Parham (talk) 03:50, 22 March 2008 (UTC)
 * Yes! My solution!  Thanks!  — Coren (talk) 04:24, 22 March 2008 (UTC)
 * Implemented and working like a charm. I love it when there is a trivial technical solution to a problem.  :-)  — Coren (talk) 04:57, 22 March 2008 (UTC)
 * How's the trial gone? :) SQL Query me!  09:16, 3 April 2008 (UTC)


 * What's the status of this bot request? --uǝʌǝsʎʇɹoɟʇs (st47) 16:00, 27 April 2008 (UTC)
 * I think "no community interest" best describes it. What few people have commented have been split 50/50 about the desirability of the function; not enough of a consensus to run the bot even if it does seem to work. — Coren (talk) 22:58, 27 April 2008 (UTC)


 * 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.