Skip to content

Corpus: Wikimedia's citation clients are ordinary, not bad bots - #104

Merged
fabriziosalmi merged 2 commits into
fabriziosalmi:mainfrom
VDK:allow-wikimedia-citation-uas
Oct 18, 2026
Merged

fabriziosalmi merged 2 commits into
fabriziosalmi:mainfrom
VDK:allow-wikimedia-citation-uas

Conversation

@VDK

@VDK VDK commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

The bad-bot lists are built from public sources, and two of them name Wikimedia's citation services: mitchellkrogza's bad-user-agents list has Citoid, and JayBizzle/Crawler-Detect - which answers "is this a crawler", not "is this hostile" - has Citoid and ZoteroTranslationServer. The generated patterns therefore refuse the Wikimedia citation service for every site behind these rules.

It is one page read on demand, when an editor cites a source, and it returns the metadata for the footnote. It is not crawling the site and it is not hostile.

corpus.wanted_user_agents is what says who must not be refused, and leave_out_wanted() leaves out an entry that matches one, naming it in the header of each file. Adding the two clients there takes the Citoid and ZoteroTranslationServer entries out of all five targets and leaves every other entry in place.

Agents from https://wikitech.wikimedia.org/wiki/Citoid/Allowlisting, cut to the part of the user agent that is stable: Citoid/WMF and ZoteroTranslationServer/WMF. The browser part in front of it is inherited from translation-server and may change, so it is not in the corpus. Nor is a contact address: the domain is not what an entry is matched on, and the corpus holds no real ones.

waf_patterns/* is python3 badbots.py on this change, and the corpus counts in README.md and docs/*.md follow the two entries added. Both are committed because tests/test_corpus.py and tests/test_badbots.py hold the files to what is written. The Apache target numbers its rules by position, so every id after an entry that is left out shifts, and that diff is larger than the two rules removed.

@VDK
VDK force-pushed the allow-wikimedia-citation-uas branch from e1c2a85 to 071eef5 Compare October 8, 2026 18:34
The bad-bot lists are built from public sources, and two of them name Wikimedia's
citation services: mitchellkrogza's bad-user-agents list has `Citoid`, and
JayBizzle/Crawler-Detect - which answers "is this a crawler", not "is this
hostile" - has `Citoid` and `ZoteroTranslationServer`. The generated patterns
therefore refuse the Wikimedia citation service for every site behind these rules.

It is one page read on demand, when an editor cites a source, and it returns the
metadata for the footnote. It is not crawling the site and it is not hostile.

`corpus.wanted_user_agents` is what says who must not be refused, and
`leave_out_wanted()` leaves out an entry that matches one, naming it in the header
of each file. Adding the two clients there takes the `Citoid` and
`ZoteroTranslationServer` entries out of all five targets and leaves every other
entry in place.

Agents from https://wikitech.wikimedia.org/wiki/Citoid/Allowlisting, cut to the
part of the user agent that is stable: `Citoid/WMF` and
`ZoteroTranslationServer/WMF`. The browser part in front of it is inherited from
translation-server and may change, so it is not in the corpus. Nor is a contact
address: the domain is not what an entry is matched on, and the corpus holds no
real ones.

waf_patterns/* is `python3 badbots.py` on this change, and the corpus counts in
README.md and docs/*.md follow the two entries added. Both are committed because
tests/test_corpus.py and tests/test_badbots.py hold the committed files to the
corpus and to the ordinary clients it says must not be refused.

The output holds only this change: the three entries Crawler-Detect gained after
the last build (JayBizzle/Crawler-Detect#624: IronFountain-Leads, TheWebReport and
webshopok-kutatas) are left out of it, and the nightly build picks them up on its
own. The Apache target numbers its rules by position, so every id after an entry
that is left out shifts, and that diff is larger than the two rules removed.

Co-authored-by: openhands <openhands@all-hands.dev>
@VDK
VDK force-pushed the allow-wikimedia-citation-uas branch from 071eef5 to 8d0ee64 Compare October 8, 2026 18:49
main's nightly update (2026-10-18) rewrote waf_patterns, so
apache/bots.conf conflicted on rule ids. The bot lists are regenerated
with `python3 badbots.py` on the merged tree; against main they differ
only by the Citoid and ZoteroTranslationServer entries this PR leaves
out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@fabriziosalmi

Copy link
Copy Markdown
Owner

Thank you, this is correct and well argued. Verified: regenerating on today's main with and without this change removes exactly the Citoid and ZoteroTranslationServer entries from all five targets and nothing else; the CI test steps pass, and the README/docs counts are required by test_corpus. The PR conflicted with today's nightly update of the generated files, so I merged main into your branch and regenerated waf_patterns; your change is unchanged. Merging once CI is green.

@fabriziosalmi
fabriziosalmi merged commit 22209b6 into fabriziosalmi:main Oct 18, 2026
8 checks passed
@VDK
VDK deleted the allow-wikimedia-citation-uas branch October 18, 2026 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants