Wikipedia:Bots/Requests for approval/DRN clerk bot

DRN clerk bot

[[User:DRN clerk bot|DRN clerk bot]]

{{Newbot|DRN clerk bot|}}

Operator: {{botop|Hasteur}}

Time filed: 12:09, Monday May 26, 2014 (UTC)

Automatic, Supervised, or Manual: Automatic (Supervised at first)

Programming language(s): Python

Source code available: Yes, [https://github.com/hasteur/drn_clerkbot/blob/master/drn_clerk_bot.py]

Function overview: Only generating the DRN Case status template based on the parsing of the DRN case page.

Links to relevant discussions (where appropriate): Wikipedia_talk:Dispute_resolution_noticeboard#Proposal_to_eliminate_the_Needs_Assist_and_Stale_labels

Edit period(s): Every 30 minutes

Estimated number of pages affected: 1 Semi-frequently

Exclusion compliant (Yes/No): no, only 1 page affected, so little need to include this. No, only edits the DRN case status template, so no exclusion is appropriate.

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

Function details:

{{collapse top|Previous discussion about 100% clone of the code. Tabled in favor of just focusing on the DRN case status dashboard}}

Straight clone of Earwigbot task 19. Has two main functions; Notifying users of cases regarding them, and updating the cases and status tables used at DRN. To summarize (taken from original BRFA):

  • When a case is filed, its status is "new". The bot will ensure that all parties mentioned in the dispute are notified with {{tls|DRN-notice}}. If a volunteer (a user listed on this page) edits the case, the status is set to "open". If it is not edited by a volunteer in two days, its status is set to "needassist".
  • If an open case remains unedited for two days, its status is set to "stale". If it is edited in the stale state, it returns to open.
  • If an open case increases in size by more than 15kb since it was last edited by a volunteer, its status is set to "needassist". If a volunteer edits it, it returns to open.
  • If a case case remains open for over four days, regardless of who edits it, its status is set to "review". Cases in this state will remain marked as such until they are closed.
  • If a volunteer edits a case to the "closed" or "resolved" states, the bot will wait for one day of no edits before removing the "DoNotArchive" comment and adding {{tl|DRN archive top}}/{{tl|DRN archive bottom}}. Another bot will archive it soon afterwards.
  • The bot tries to not edit war with other users. To that effect, it will not repeat a change it has just made if a user alters the case status.

{{collapse bottom}}

Additionally, the task will save statistics on open cases to Template:DRN case status every half-hour.

Hoping this can be speedily-approved, as it is an existing task, and the noticeboard needs a replacement for the bot urgently to keep it running smoothly.

Thanks, --Mdann52talk to me! 12:09, 26 May 2014 (UTC)

=Discussion=

{{collapse top|Discussion regarding full out clone of existing DRN clerking. This has been tabled in favor of just getting the Case status dashboard working first}}

DRN hat on:I was under the impression that we had decided at Wikipedia talk:Dispute resolution noticeboard#The DRN bot that because the existing bot was not providing the desired behavior. As such I don't think there's consensus to operate a bot on the DRN page for the time being.

Bot Operator hat on: Recalling the multiple times that requests from DRN have been at Bot Oprations to come in and redesign the process for DRN makes me have low confidence in succeeding at this task. Hasteur (talk) 18:52, 26 May 2014 (UTC)

:Yes, I would raise the same point. If you just want a straight clone of the bot then shutting it down seems silly in retrospect. The issue was that the existing code was unsatisfactory, and I was unable to meet the demands of the DRN volunteers to fix it. As a fairly non-essential task, it should be modified before being restarted. (Edit: I noticed Mdann52 said a replacement was needed urgently, but I'm unclear about this: it seems most of the bot's functions aren't time-sensitive (other than updating the chart, which isn't very important anyway)?) — Earwig talk 21:54, 26 May 2014 (UTC)

:::{{ping|The Earwig}} the reason I am requesting a clone straight away is per the request of Steven Zhang, who has requested it in the thread above. If changes need to be made in the future, I will attempt to make them on top of the existing code. {{ping|Hasteur}} There have been discussions about changing the bot's functions, however I would argue there is still consensus for the bot to run, and the discussions are about future changes to how the bot would run, in order to simplify/streamline/bog down/overcomplicate (take your pick...) the DRN procedure. --Mdann52talk to me! 07:23, 27 May 2014 (UTC)

::::I've been away for quite some time, and didn't have much input (if any) in the requests to re-code the bot. I think that it might be a discussion worth having if the volunteers see room for improvement, but in the interim, the bot does perform some functions that have an impact on the effectiveness of DRN (i.e. the chart, which updates case statuses, has been shown to improve overall response times of volunteers versus the previous format) so I would hope that a/the bot can function in it's current coded capacity, at least for now, until a consensus is reached on any/all changes that we would like to be made. I agree changes shouldn't be made at a whim, but there should be some deep thinking behind why we think the change is necessary, and what impact we feel it will have on the process versus the current way it operates. Steven Zhang Help resolve disputes! 11:37, 27 May 2014 (UTC)

:::::{{Reply to|Mdann52}} Did you just decide to gloss over the thread I linked where it is clear that volunteers would rather see correct actions rather than the same process stumbling along? I assert that based on the above thread there is an explicit consensus not to directly clone so that we design the process rather than existing actions design the process. We have the prime opportunity and motivation to define exactly what the bot should do and putting the temporary patch of a direct clone of the existing code is only going to reduce the importance. Hasteur (talk) 12:24, 27 May 2014 (UTC)

{{collapse bottom}}

::::::How about this as a compromise, if it's not too difficult to implement: What if we restore the bot as it was but at the very first possible time (and before reimplementation if it's easy enough) disable all the status labeling, which seems to be the primary source of disagreement. Again, I'm not a coder so I don't know how difficult that would be, but hopefully it wouldn't be much more than commenting out the text of some labels and/or replacing them with a null character or string of nbsp's. That way we could at least see in the status box the "Created Last volunteer edit Last modified" data. Right now, with so many volunteers signed up (and so many of them being inexperienced), it's hard to figure out whether a new editor jumping into the discussion is a volunteer or just another party to the discussion." Once we get that much going, we can then sort out the various statuses and their triggers and some of the other things folks wanted. Best regards, TransporterMan (TALK) 16:16, 28 May 2014 (UTC)

:::::::So the stopgap is to create the status table so that we have the dashboard? I think I can write that logic this weekend. Hasteur (talk) 16:43, 28 May 2014 (UTC)

{{od}} {{ping|Hasteur}} Are you willing to take this over? If so, would you like me to hand over this account :)? --Mdann52talk to me! 17:26, 28 May 2014 (UTC)

:{{Reply to|Mdann52}} That would be amenable. As the bot is being held in trust for the DRN community, I think the transition of ownership of the account will not cause problems. I will email you, Mdann52, via the email this user function so that you have the email to attach to the account, I will then request a password reset so that password security is maintained. Hasteur (talk) 18:08, 28 May 2014 (UTC)

::To clarify what I think T-Man was saying is we would like, as an immediate measure, to stop all automatic labeling of case status. This way cases could continue to be labeled manually by volunteers. We could then have a workshop team or committee to discuss simplifying the categories and discuss the merits of possible automation. T-Man is right in saying that the auto-labeling of case status was the most troubling and unproductive aspect of the very well intentioned system Earwig had generously taken the time to create.--KeithbobTalk 18:15, 29 May 2014 (UTC)

:::Yes, exactly correct. Best regards, TransporterMan (TALK) 18:42, 29 May 2014 (UTC)

==Hasteur's take over==

Ok, I manaully [https://en.wikipedia.org/w/index.php?title=Template:DRN_case_status&oldid=611110209 put] into the DRN case status template the computed value of the page [https://en.wikipedia.org/w/index.php?title=Wikipedia:Dispute_resolution_noticeboard&oldid=611105736 at this snapshot]. Any thoughts {{Ping group|DRN specialists|TransporterMan|Mdann52}} about the evaluation? I stripped a lot of the ancillary stuff that really is tangential to getting the dashboard running again. Hasteur (talk) 18:27, 1 June 2014 (UTC)

:That's fine by me, but it's still showing the status labels (i.e. the ones in the "Status" column). Have you simplified them or something? Best regards, TransporterMan (TALK) 13:41, 2 June 2014 (UTC)

::{{U|TransporterMan}} That's controlled by the status parameter of {{tlx|DRN case status/row}}. If I strip the status that is pulled through, it's going to only show dark grey "Unknown" status. I can adjust the mappings, but the values are driven from what is placed in each indivudal case status template. Hasteur (talk) 14:27, 2 June 2014 (UTC)

::: Even with this low level of discourse we're rapidly approaching, if not already beyond, my level of competence and, thus, understanding in the mechanics of how this works. My suggestion was to eliminate the status labeling to eliminate that particular controversy while maintaining the summary of the page statistics other than the status labeling. If that cannot be done easily or without making the situation more confusing than it was with the existing labels in full use, then I'm okay with either going back to the way things were before the bot was stopped or leaving it stopped. Maybe one or the other of those is what you've done, for I must admit that I'm not quite sure what's been changed in your new version. Best regards, TransporterMan (TALK) 15:19, 2 June 2014 (UTC)

::::Ok, taking a slow explanation

During Earwig's tenure, many Wikipedia templates were created to make the DRN case status template run quickly. One of these is {{tlx|DRN case status/row}}. One of the parameters to the template is the status of the individual case. I extracted the logic for determining what case status to report in the digest template from Earwig's code. If we do not put a status then the template will look grey and be sufficently different for people who are used to reading the template. When the program gets started to read the status of cases on the page, we look through each case, extract the Case title, and current status (as reported in the {{tlx|DR case status}} template inside the case) then go through all the signatures for the case body to determine the first signature (Who created the case and at what time), the latest signature (Who last updated the case and at what time), and which volunteer was the last one to update the case (Who and what time). Taking all that information we plug the values into the {{tlx|DRN case status/row}} template.

Rather than go through and re-design everything, I was under the impression that the goal of this singular task was to get the dashboard working again and then we'd look at changing the layout of the dashboard/DRN process. Hasteur (talk) 15:41, 2 June 2014 (UTC)

:::::Oh, I think I get it now. You've changed it so all it is reporting is the statuses volunteers or the listing script manually put on the cases and not imposing additional statuses automatically added by the bot itself. So, for example, the status box will continue to show the "New discussion" status inserted by the filing script until the case is marked as closed or resolved or failed (the three statuses which can be set by a volunteer). Is that right, or am I still not getting it (as is entirely possible)? Best regards, TransporterMan (TALK) 15:59, 2 June 2014 (UTC)

::::::{{U|TransporterMan}} Per the request, the bot is keeping it's hands out of adjusting the individual case statuses. If volunteers/case-managers don't adjust the status parameter themselves to any of the other values defined in {{tlx|DR case status}} then it will show those 3 options. To put it another way, the bot is summarizing the content of the DR caseboard without making any judgments on the value of the statuses. Hasteur (talk) 16:08, 2 June 2014 (UTC)

::::::: That sounds just fine to me. Thanks for the work on this. Best regards, TransporterMan (TALK) 16:17, 2 June 2014 (UTC)

Hi Hasteur, and thanks for your help! Sounds good but you lost me on the "3 options". To review, here is what I'd like to see happen:

:A single default status for new cases ie New

:All other case status' would be added manually by DRN volunteers and if they forget then the DRN coordinator would do it.

:We would have a simple list of the available case status options (and instructions for their use) available through a wiki link at the top of the DRN case page.

:This list would avoid complicated nuances (ie doesn't 'stale' mean a case 'needs attention'? so why have stale as a label?)

:There would be a one-one correlation between the case status code and the case status label. In other words, to get an In Progress label, one would enter In Progress in the template. (currently this is not the case for some labels)

:Thoughts?--KeithbobTalk 17:24, 5 June 2014 (UTC)

::{{U|Keithbob}} Bot Operator Hat It's whatever values the DRN Community wants to use in addition to the mappings that are defined in {{tlx|DR case status}}. Please see [https://github.com/hasteur/drn_clerkbot/blob/master/drn_clerk_bot.py#L19-L27] to see that with the exception of "review" (which mapps to Needs attention) the bot munges the values down to those 7 states. It's not the purpose of this task for me to design the procedure for DRN. That should flow from the DRN volunteers with the bot implementing the standard operating procedure for DRN.

DRN volunteer hat As I recall, stale was used previously on threads that had no updates in a time frame from both disputants and the DRN volunteer chairing the case. If DRN volunteers/Coordinator don't use the stale status, then the status can be deprecated. Hasteur (talk) 18:51, 5 June 2014 (UTC)

:::So where do we stand on this? What is the current status of the bot? I just changed a case status template from 'needassist' to 'inprogress' and the case is now labeled 'new discussion'. The chart at the top of the page is all screwed up in terms of case status and should be removed if its not going to be fixed soon as presently it only serves to confuse and discourage participants and volunteers. Can we have a status update on this 2 week old discussion? Thanks, --KeithbobTalk 15:49, 10 June 2014 (UTC)

::::{{U|Keithbob}} The bot isn't currently running because it doesn't have authorization to run outside of it's own userspace. The way the case template is being updated currently is I run the bot's script (when I think about it) then take the output and plug it into the page. Notice the "last updated by on" line in the template? That tells you when the summary was last generated... Hasteur (talk) 16:33, 10 June 2014 (UTC)

::::Thanks Hasteur for doing the manual updating of the case summary chart and for following up on this issue in general. --KeithbobTalk 13:47, 11 June 2014 (UTC)

::::{{BAGAssistanceNeeded}} We've waited patiently for the BAG to respond on this. Any chance we can get a trial authorized or approval? Hasteur (talk) 16:33, 10 June 2014 (UTC)

==Testing phase==

{{BotTrial|days=1}} Hasteur Let's see. Please monitor the bot. Thanks, Magioladitis (talk) 11:21, 22 June 2014 (UTC)

:List of Diffs:

:#[https://en.wikipedia.org/w/index.php?title=Template:DRN_case_status&curid=36570293&diff=613949556&oldid=613762358] Hasteur (talk) 13:55, 22 June 2014 (UTC)

Hasteur I think we should avoid [https://en.wikipedia.org/w/index.php?title=Template%3ADRN_case_status&diff=613993765&oldid=613949556 null edits], at least not allow more than 1 per day. -- Magioladitis (talk) 20:27, 22 June 2014 (UTC)

:The code for null diff detection wasn't working at that point. I've corrected the issue so that if it's just the sig line changing, it won't update. Hasteur (talk) 21:05, 22 June 2014 (UTC)

::{{Like}} -- Magioladitis (talk) 06:30, 23 June 2014 (UTC)

Hasteur I suggest that you use Updating statistics for the dispute resolution noticeboard. if you agree. -- Magioladitis (talk) 06:35, 23 June 2014 (UTC)

:{{U|Magioladitis}} [https://github.com/hasteur/drn_clerkbot/commit/41ebff500dcf1ce46872443774a9f35561d47e28 Diff] of the code. Obviously we won't be able to tell a difference till the source data changes. Hasteur (talk) 12:30, 23 June 2014 (UTC)

{{BotApproved}} Magioladitis (talk) 12:34, 23 June 2014 (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.