Page MenuHomePhabricator

If username's initial substring has the same pattern as an object name, it will not be automatically linked by @mention
Closed, ResolvedPublic

Description

For example @a122575936 does not link to that user, or ping/subscribe them. This happens in task descriptions and comments.

Original report: https://phabricator.wikimedia.org/T109956

Event Timeline

pcoombe updated the task description. (Show Details)
pcoombe added a project: Remarkup.
pcoombe added a subscriber: pcoombe.

I think the actual rule is "if a username is at least 8 characters long and contains only [a-fA-F0-9]".

For example, these users also do not mention: 0738602525, aaaaaaaa, feed57005, deafbeed, etc.

But these users do: z135793, m3926248538, etc.

Presumably this is the "commit hashes" rule colliding with the "username mention" rule.

Oh, it may be a little more involved than that. I think the user in the original report (C933103) is conflicting with the Countdown rule.

Hmm, that would make sense. However I first came across this with user K4-713 on Wikimedia's install which doesn't fit either of those rules.

Ah, I think that's parsing as K4 (Passphrase Credential #4) plus some other stuff. We allow hyphens after an object reference (like "T9479-should be fixed ASAP").

epriestley renamed this task from If username only has one letter it will not be automatically linked by @mention to If username's initial substring has the same pattern as an object name, it will not be automatically linked by @mention.Sep 29 2015, 11:11 AM

I think D14186 will fix this. Let me know if you catch anything else wonky after that lands -- I got some indirect test coverage on this, but might need to go beef things up a bit if I missed something.

Also note that remarkup has a parser cache, so older mentions won't automatically be fixed right away (the bad parse is cached).

You can use bin/cache purge --purge-remarkup to drop those caches immediately, or let the caches expire on their own. The TTL is controlled by gcdaemon.ttl.markup-cache and defaults to 30 days. Once the caches are dropped or naturally expire, older mentions will link the next time they are viewed.

(We have cache versioning, but I didn't bump it since the scope of this issue seems very small and we'd have to drop the entire cache.)

There isn't a reasonable way to go activate those mentions retroactively (e.g., cause the "add a subscriber" side effect for anything that mis-parsed) but presumably that's not a big deal.

epriestley triaged this task as Normal priority.