| Thisuser account is abot that usesNode.js, operated bySD0001 (talk). It is used to make repetitiveautomated orsemi-automated edits that would be extremely tedious to do manually, in accordance with thebot policy. The bot is approved and currently active – the relevantrequest(s) for approval or tasks can be seenhere. Administrators: if this bot is malfunctioning or causing harm, pleaseblock it. |
| Thisbot runs onWikimedia Toolforge.It runs on thesdzerobot tool account (k8s-status ·k8s grafana). Administrators: If this bot needs to be blocked due to a malfunction, please remember to disable autoblocks so that other Toolforge bots are not affected. |
SDZeroBot runs onNode.js and uses themwn bot framework, also developed bySD0001. Most tasks are written inJavaScript, while the newer ones are inTypeScript. The source code is available onGitHub.
| Please useUser:SDZeroBot/Shutoff for shutting off specific bot tasks. If the bot appears to be malfunctioning across multiple tasks, it should be blocked. |
| Report | Description | Frequency | Last update | Logs |
|---|---|---|---|---|
| WP:User scripts/Most imported scripts | List of user scripts by number of users and active users | Every 2 weeks | 15 October 2025 | outerr |
| WP:AfC sorting +subpages | Classification of pending AfC submissions by topics predicted byORES | Every 8 hours | 27 October 2025 | outerr |
| User:SDZeroBot/NPP sorting +subpages | Classification of unreviewed articles by ORES topics | Every 12 hours | 27 October 2025 | outerr |
| User:SDZeroBot/PROD sorting | Classification of articles proposed for PROD deletion by ORES topics | Every 4 hours | 27 October 2025 | outerr |
| User:SDZeroBot/AfD sorting | Classification of articles nominated for deletion at AfD by ORES topics | Every 4 hours | 27 October 2025 | outerr |
| User:SDZeroBot/Draftify Watch | Tracks articles being moved to draftspace | Weekly | 21 October 2025 | outerr |
| User:SDZeroBot/PROD Watch | Tracks the status of articles proposed for deletion perWP:PROD | Weekly | 22 October 2025 | outerr |
| User:SDZeroBot/Redirectify Watch | Tracks conversions of articles to redirects | Daily | 27 October 2025 | outerr |
| User:SDZeroBot/G13 Watch | Records excerpts of drafts that have been deleted per G13 | Daily | 27 October 2025 | outerr |
| User:SDZeroBot/Recent AfC declines | Lists recently declined AFC drafts with excerpts and other data | Daily | 27 October 2025 | outerr |
| User:SDZeroBot/G13 soon | Lists drafts that would be-G13-eligible in a week | Daily | 27 October 2025 | outerr |
| User:SDZeroBot/G13 soon sorting | Classifies soon-to-be-G13-eligible drafts by ORES topics | Weekly | 27 October 2025 | outerr |
| User:SDZeroBot/G13 eligible | Lists G13-eligible drafts with descriptions and excerpts | Daily | 27 October 2025 | outerr |
| User:SDZeroBot/GAN sorting | Classifies articles awaiting GA review using ORES topics | Daily | 27 October 2025 | outerr |
| User:SDZeroBot/Peer reviews | Annotated listing of articles for which peer review is requested | Weekly | 21 October 2025 | outerr |
| User:SDZeroBot/Pending AfC submissions | Lists pending AfC submissions with excerpts and other data | Daily | 27 October 2025 | outerr |
| User:SDZeroBot/Unreferenced BLPs | Annotated listing of unreferenced BLPs, for Women in Red | Daily | 27 October 2025 | outerr |
| WP:List of Wikipedians by good article nominations | List of users by most GAs | Daily | 26 October 2025 | outerr |
| User:SDZeroBot/DYK nomination counts.json | List of users by most DYK nominations | Continuous | 27 October 2025 | outerr |
| Job | Logs |
|---|---|
| stream | outerr |
| routerlog | outerr |
| gans | outerr |
| db-tabulator | outerr |
| BRFA | Description | Frequency | Logs |
|---|---|---|---|
| BRFA | AfD notifier Notify users of AfD nominations of articles to which they've significantly contributed | Daily | outerr |
| BRFA | Bot activity monitor: Keeps track of activity of fully automatic bots and reports the ones that are not working. Optionally also notifies the respective operators. | Continuous | outerr |
| BRFA | {{Database report}}: Updates tables with result of specified SQL queries. | Continuous | outerr |
| BRFA | Purges pages linked fromUser:SDZeroBot/Purge list | Continuous | outerr |
| BRFA | Raise edit requests to keep gadgets in sync with upstream sources perUser:SDZeroBot/Gadgets-sync-config.json. | Continuous | outerr |
| — | Update the lists atUser:SDZeroBot/Category cycles identifying cycles in the category tree. | Every 3 months | outerr |
| — | Track sizes of categories listed onUser:SDZeroBot/Category counter. | Continuous | outerr |
| BRFA | Description | Frequency |
|---|---|---|
| BRFA | Consolidate stub tags on page where possible (replace X-stub and Y-stub with X-Y-stub or Y-X-stub if either exists) | One-time |
| BRFA | Re-sort geographical stub articles with more specific stub tags | On demand |
| BRFA | Adding{{Drafts moved from mainspace}} to drafts that were moved from mainspace | One-time |
| BRFA | Adding{{Set category}} toset categories. | On-demand |
Tasks which edit only in the userspace don't require a BRFA.
Good question. Excerpts of articles used on many of SDZeroBot's classification pages are generated using a combination of regex and some slightly more formal parsing methods. The Node.js source code used can be seenhere, which also relies onmwn's wikitext class. This excerpt generator is also available as a webservice hosted on Toolforge athttps://summary-generator.toolforge.org/ with a horrible bare minimum UI, but a better API endpoint. See theGitHub README for usage instructions.
I initially considered using the code frompopups, but it was all too messy and integrated with a lot of other popups code that I couldn't get it to work standalone.
All excerpts are short enough, so that attribution and copyright concerns are avoided.
All source code that drives SDZeroBot is publicly available via theGitHub repository, as well as on the /data/project/sdzerobot directory on Toolforge. Even the logs (*.out and *.err files) are publicly visible, which is by default not the case on Toolforge. The jobs.yml file used to schedule the tasks can also be viewed there.
If you're interested in helping out with these tasks, please contact me.
For each SDZeroBot task, most of the code is in an async functionwith a catch that traps errors and formats it as an email sent to the tool account, which lands in my inbox. For good measure, there's also aprocess-level uncaughtException handler.
The only kinds of errors the above wouldn't handle are the ones that occur even before the javascript code starts executing (such as the file accidentally losing its executable permission) orOOMs, which are both handled by using--emails onfailure while usingToolforge Jobs framework.
In addition, for the report pages, this user page lists them above along with their last updated timestamps. Along with the expected frequency of the updates, it is fed into aLua module which prints the timestamp in bold red if it's delayed.
There's alsoWP:BAM which although maintained by SDZeroBot, is not used for monitoring itself.
A good combination of failure monitoring techniques is essential for operating bots that reliably perform a number of tasks without requiring you to spend time and energy on making sure everything is running.
If SDZeroBot is unable to save an edit because it is introducing a spam-blacklisted link (which of course isn't the bot's fault since it likely just picked up the text to be added from another place), it identifies the problematic link from the API response, and removes the protocol ("http:" or "https:") from the link, and then attempts to save the page again. This does mean that a link that was supposed to look likeLink label ends up looking like [google.com Link label], but it is closest to the original while allowing the edit to go through. Besides, the link was blacklisted anyway so probably shouldn't be clickable.
Always use OAuth instead of BotPasswords. There are all these advantages: