Page MenuHomePhabricator

Define process for people to request a "bot" account
Closed, ResolvedPublic

Description

A few inquiries so far about programmatic access, and along with sharing some general experiences on the conduit API I think we should have some official lingo on getting a bot account.

A bot account has no password, cannot be "logged into" like a normal user, does have a token for api requests, and won't be tied to a specific real user account (in case of spam, lost account, etc) Any bot type thing used by the community should probably go this route.

These accounts can be added by admins.

Event Timeline

chasemp raised the priority of this task from to Needs Triage.
chasemp updated the task description. (Show Details)
chasemp added a project: Phabricator.
chasemp changed Security from none to None.
chasemp subscribed.

What's the problem with having a bot use a 'real user account'? This is what we do for bots in general (both on-wiki and for instance Gerrit/bugzilla bots) and makes starting a project significantly easier (you can just start, instead of first having to define the full details of what you're trying, and getting approved). In addition, debugging issues is typically much easier if you have more access, so it would typically be beneficial to be able to log in as the bot.

Defining the process for acquiring a bot account isn't mutually exclusive with people choosing not to use one.

Qgil triaged this task as Medium priority.Oct 10 2014, 9:02 PM
Qgil subscribed.

First of all it would be good to explain in this doc (or to point to a doc that explains) why someone would want to create a bot account.

For what is worth:

Qgil lowered the priority of this task from Medium to Low.Nov 7 2014, 10:49 AM

I'm happy to write that up under mw:Phabricator/FAQ or such but I don't think we have criteria in this ticket when people should use a bot account instead of a "normal" one (pros and cons)?

Sorry this has caused confusion.

The "bot" scenario and docs need to basically mirror the other bot docs mentioned above. In particular translating this https://en.wikipedia.org/wiki/Wikipedia:Bot_policy#Bot_requirements to Phabricator specific context.

Automated actions that are tied to specific external events (such as task importing or gerrit posting) should be tied to a non-human-user so that they can be administered by ...the community. A specific user is not an appropriate context for these patterns of activity as in the human case they would almost universally be considered spam, or at best be locked into _someone's_ personal account.

If some action is not a real human "user" who is making actual personal contributions then it either should be in the context of a bot that is part of the phabricator ecosystem or it is spam.

I'm not sure if that's all helpful or not.

chasemp claimed this task.
chasemp added a subscriber: mmodell.

A #Bots project has been created and linked here https://phabricator.wikimedia.org/project/view/5/. I also created https://www.mediawiki.org/wiki/Phabricator/Bots and linked it here https://www.mediawiki.org/wiki/Phabricator. It's not overly complicated language or anything. Essentially if the activity you want is Bot-like please request a Bot, for our good and yours.

I'm resolving this as it's started. @mmodell @Aklapper @Qgil -- hopefully you guys agree. Please edit my wiki explanations to your satisfaction.

Thanks.

The page does not explain what the difference between a 'normal user' and a 'bot user is', and it also doesn't explain why the 'bot user' is a better concept than creating another user on mediawiki.org, and using that as bot account -- which is the standard wikimedia bot workflow everywhere.

Essentially if the activity you want is Bot-like please request a Bot, for our good and yours.

And it's still not clear to me what the 'good' in this is. The only 'good' to me as author is... that the bot will be banned if I don't?

It might also be good to note whether an existing account can be changed into a bot account (as one would expect, seen from a mediawiki background), and if not, what the alternative is.

Creating a wikimedia account for wikimedia bots seems sane, but so does creating a Phabricator account for Phabricator Bots. Bots are the one local account exception since they are not full fledged accounts. They are basically identity shims with a certificate for api access.

I'm not sure if you think the idea of using bots is bad or if you don't like the text or how to help your concerns here. If user A exists and starts modifying hundreds of tasks every hour in a weird way that user will be banned/disabled most likely. If that account is used for both human and auto actions they cannot appeal, and they would not show up in the bots list for anyone to know to expect that kind of behavior. No one has banned an account yet for automated actions, nor has there been any friction from say the Trello guys importing some legacy content not using an official Bot, but it would sure make things easier on the Phab team if people did.

Expected automated actions should be performed by a Bot account. That is my thought. AFAIK this is generally accepted practice.

What is it you would like here?

@RobLa was asking about this process on irc yesterday, so at least the discoverability could be increased somehow. Maybe he can comment on where we looked or would have looked if he hadn't asked on irc.

I might have actually looked this up, but I was running under the assumption that I would just create a Wikmedia bot account and use it here.

My inquiry yesterday was more about anonymous, read-only access to the API rather than the logistics of creating a bot account. I have a tool that I'm prototyping that could use that level of access, since I'd like to run it from Labs (i.e. the "don't put any important credentials here" place)

I don't know what @Aklapper's thoughts on Phab bots being wikimedia bot accounts is. I'm not opposed to it if that is the general thought. Disadvantages are it doesn't show up here https://phabricator.wikimedia.org/people/query/zziC7ShAXfDm/#R and it would be dependent on Mediawiki in some senses where a distinct bot in the Phabricator ecosystem would not. The separation of bot vs human as noted is absolutely important when it comes to using a conduit certificate. Disclosure happens and it would be much better if the certificate used in Labs wasn't tied to a user who will then get banned if used inappropriately.

As a side note, there is work ongoing upstream to make bot interactions and authentication via conduit more sane

@chasemp: Right, I agree with you that accounts doing automated non-personal edits need to be recognisable as such. My main problem with the suggested method is that it adds hoops before one can get started, which discourages innovation: If I have an idea that might be useful, having to request an account, wait for approval, probably explain what I want to do in a different way, etc, then I'm more likely than not to /not/ implement the idea. The beauty of the bot process used on wikis is that is allows quick experimentation without having to go through a vetting process.

Maybe the best way is to distinguish different use cases:

  1. personal use of conduit, including small scale automated editing is OK from your personal account if you work locally and not on labs.
  2. small scale automated editing, or read-only use of the API from labs or other shared hosts: create a secondary ('bot') account
  3. large scale automated editing: should go through a vetting process, e.g. so wikibugs can be muted. This could then be a 'real' bot.

The only catch with this is that I'm not sure if a user can go from stage (2) to stage (3) without changing name.

The name also highlights a different issue: what happens if someone registers user 'gerritbot' on mediawiki and tries to connect to phabricator?

I have reorganized the content of https://www.mediawiki.org/wiki/Phabricator/Bots with the aim of making the page clearer to anybody interested in Phabricator bots and their reason to exist.

In T551#946783, @Qgil wrote:

I have reorganized the content of https://www.mediawiki.org/wiki/Phabricator/Bots with the aim of making the page clearer to anybody interested in Phabricator bots and their reason to exist.

thanks!

@chasemp: Right, I agree with you that accounts doing automated non-personal edits need to be recognisable as such. My main problem with the suggested method is that it adds hoops before one can get started, which discourages innovation: If I have an idea that might be useful, having to request an account, wait for approval, probably explain what I want to do in a different way, etc, then I'm more likely than not to /not/ implement the idea. The beauty of the bot process used on wikis is that is allows quick experimentation without having to go through a vetting process.

I can see your point but in general I disagree with it. The breakdown of the 3 types of API access seems reasonable but I am not intending to go so far as to worry about individual users using their conduit access for interaction versus web or email, etc. From my perspective, every user gets API access and doing things via that mechanism is as normal as any other medium -- as long as the actions are all tied to them as a contributor. The risk is run of personal runaway automated action but so far it hasn't happened and it would be case by case I imagine.

For the case of innovation, this instance is not a reasonable place to iterate on the initial workings of a bot. phab-01 would be such a place and no process AFAIK is in place to restrict things there for these reasons. If someone had an idea that was useful I would expect it to be tested against an instance that is not this instance first. This is a poor testbed for development and only in cases where functionality doesn't exist (like email inbound) would it be reasonable to test here. It may be a matter of perspective, I'm honestly not sure, but the argument that it is too strenuous of a requirement to require approval for a bot that is meant to act in multiples users steads on a production instance shared by all doesn't make sense to me. I believe the wiki use case is different enough, and this environment is more tightly controlled enough, that the disparity is necessary and sane.

On the identity issue, this could definitely happen but without an example in front of me I'm not sure what the right resolution would be, but it seems to be more of an argument for consolidated process and agreement than less.

I guess in summation:

  • users who use conduit for their own purposes are not related to this
  • users who use conduit for some automated thing where actions are tied to users who are not them should be using a bot
  • users who want to experiment with the bot case should use a test instance
  • usernames / purposes of bots have to play nicely with external providers and that probably means more consensus in the process and not less

https://www.mediawiki.org/wiki/Phabricator/Bots is pretty good, thanks for writing that!

Personally I don't care too much whether actions are performed by a bot and whether that account has a bot flag set in Phab as long as actions look "reasonible".
I care more about setting a proper account description in Phabricator for that account, explaining that it's not a human and who to contact (owner) if there are issues. I have seen people asking questions in tasks to a bot (MingleTerminator which has no proper description and is not marked as "Role = Bot").

Can we (who?) retroactively set the bot flag on a "normal" account (how)?

Can we (who?) retroactively set the bot flag on a "normal" account (how)?

There isn't a supported process for this, and I'm not sure what it would take but it would be messy and probably not a thing to plan on regularly