Skip to content

Changing ability thresholds does not cause a recalculation #2135

Description

@cellio

The recalc_abilities script depends on a queue of triggering events -- new votes, resolved edits, and/or resolved flags, depending on the ability. I lowered one of these thresholds to make an ability easier to earn, and expected that the next time the script ran it would grant that ability to some users. However, that didn't happen because there was nothing in the queue.

A queue entry represents a specific community user. Something in the recalc logic then says "hey, recalc for community user 12345" (or whatever) and everything that depends on vote scores gets rechecked for that user, as far as I can tell. (I haven't dug deeply into this code.)

With a threshold change, though, there is no target user. The next time a user does something that would trigger that ability check, I assume the ability will be granted -- but there's no way to check for everybody who ought to already have the ability per the lowered threshold.

That seems like it would be really expensive. We might want to document this a little better, though -- add something to the admin page for setting those thresholds to indicate that these take effect going forward only, and find a place in the user abilities pages to drop this clue. The goal is to avert user confusion -- "hey, so-and-so has enough edits and has the ability but I have even more and don't; what gives?".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions