Page MenuHomePhabricator

Filters shown as throttled on Special:AbuseFilter even without throttled action
Closed, ResolvedPublic

Description

If a filter has af_throttled = 1 because it was triggered too often AND some of its action were automatically disabled, then on Special:AbuseFilter/xxx the message 'abusefilter-edit-throttled-warning' is shown, and on Special:AbuseFilter that filter's line will be coloured with red and the 'throttled' flag added.
However, if a filter has af_throttled BUT no actions disabled, then on Special:AbuseFilter it'll still have a red line, but no warning is shown on the filter View since no actions were throttled.
I'm not totally sure how to fix this: we could make some changes to the messages, e.g. show a slightly different one on ViewEdit if no actions were affected, or check for disabled actions on ViewList as well. But, actually, I wonder whether we should count for throttling filters which don't have any restricted action. Or maybe count them, but don't add the af_throttled flag?
I have two examples for this behaviour, but they're both private filters and I'm not sure whether it would be fine to say which ones without changing the view policy.

Event Timeline

Daimona renamed this task from Throttle filters shown as such on Special:AbuseFilter even without throttled action to Filters shown as throttled on Special:AbuseFilter even without throttled action.Aug 29 2018, 3:54 PM
Daimona updated the task description. (Show Details)

I was thinking about this right now. My current opinion is:

  • Don't show anything on Special:AbuseFilter if no actions were automagically disabled
  • Continue setting af_throttled even if no actions are disabled. This is for two reasons: 1- the set of throttled actions can be customized (and more so with T175221); 2 - If a filter is throttled but no actions are disabled, and the set of throttleable is expanded, that change will take effect immediately.
  • A separate message on Special:AbuseFilter is probably unnecessary. Mostly because if a filter is modified, af_throttled is set back to 0.

This issue has become a little bit more important now that we send notifications (echo) when a filter is throttled. These notifications are sent out when af_throttled is set, which can happen regardless of throttled actions.

This issue has become a little bit more important now that we send notifications (echo) when a filter is throttled. These notifications are sent out when af_throttled is set, which can happen regardless of throttled actions.

I agree with not showing the filter as throttled, but I think a notification should still be sent if the conditions are met. In my home wiki we haven't used throttled actions so far, but when I get the notification that the conditions for throttling were met, It's useful because I get to know that I may have made a mistake (And it has happened).

I've been thinking about this, my updated opinion is that we should still set af_throttled and show something on Special:AbuseFilter, but the messages should be reworded to make it clear which (if any) actions were disabled. Something like:

  • On Special:AbuseFilter, where it now says just "throttled", there could be 2 messages like "is matching many edits" or "some actions were disabled automatically" depending on whether some actions were actually disabled. The wording is tricky here, we want something very short but also sufficiently explicative; suggestions are welcome.
  • On Special:AbuseFilter/xxx, we could unconditionally show some message (cfr current code), saying that no actions were disabled if that's the case
  • The echo notifications could also use two messages depending on whether any action was disabled

Change 763899 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/extensions/AbuseFilter@master] Improve wording for throttled filter warnings

https://gerrit.wikimedia.org/r/763899

Change 763899 merged by jenkins-bot:

[mediawiki/extensions/AbuseFilter@master] Improve wording for throttled filter warnings

https://gerrit.wikimedia.org/r/763899