If Special:Import is executed with the checkbox "Assign edits to local users where the named user exists locally" checked, the importer is meant to assign edits to existing users instead of giving them a prefix.
When importing from an SUL wiki like Incubator, all users exist globally, so no imported revisions should have a prefixed name. However, some recent imports from Incubator show many prefixed names.
This page history on tigwiki shows an example of duplicated revisions where one of each pair has a local name, and the other has a prefixed name. @Amire80 confirmed that he followed the documented import procedure in that case.
Ordering the 8 revisions on that page by rev_id shows that the 3 revisions with prefixed usernames were created first, with an import null edit at 2024-12-13T01:15:52, and then the 3 revisions with unprefixed usernames were created, with an import null edit 47 seconds later at 2024-12-13T01:16:39.
It looks like we need to
- Deduplicate requests at the application level, say by putting a unique token on the Special:Import form
- Make ExternalUserNames and CentralAuth's ImportHandleUnknownUser hook be more robust to races and/or replication lag
- Clean up a lot of damaged wiki histories
Searching for possibly affected wikis:
$ for w in tigwiki idwikivoyage tcywikisource tcywiktionary rskwiki nrwiki tddwiki annwiki ibawiki bclwikisource shnwikinews gorwikiquote moswiki kgewiki madwiktionary bdrwiki cswikivoyage btmwiki dtpwiki bewwiki kuswiki mywikisource iglwiki kaawiktionary mswikisource kawikisource; do echo -n "| $w | ";sql $w -- -B --skip-column-names -e 'select count(*) from actor where actor_name like '\''incubator>%'\'; done| tigwiki | 74 |
| idwikivoyage | 0 |
| tcywikisource | 0 |
| tcywiktionary | 0 |
| rskwiki | 20 |
| nrwiki | 60 |
| tddwiki | 8 |
| annwiki | 24 |
| ibawiki | 43 |
| bclwikisource | 0 |
| shnwikinews | 0 |
| gorwikiquote | 0 |
| moswiki | 0 |
| kgewiki | 0 |
| madwiktionary | 1 |
| bdrwiki | 1 |
| cswikivoyage | 0 |
| btmwiki | 0 |
| dtpwiki | 0 |
| bewwiki | 0 |
| kuswiki | 0 |
| mywikisource | 0 |
| iglwiki | 13 |
| kaawiktionary | 0 |
| mswikisource | 0 |
| kawikisource | 0 |