-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Always apply obsoletion check in check_karma_thresholds
The "obsolete on unstable_karma" branch being `elif`ed with the "disable autokarma on any negative karma" branch means that, if we reach the unstable_karma threshold when autokarma is enabled, we don't obsolete the update. That's clearly wrong. The most likely way to hit this is for unstable_karma to be -1, so the first negative karma causes both conditions to be met at once. But it's also possible if e.g. unstable_karma is -2, the update receives one negative karma, the maintainer re-enables autokarma, then the update receives another negative karma. We should *always* obsolete an update when it reaches unstable_karma, regardless of anything else we do. If this means we both obsolete it and disable autokarma at the same time, I don't see any problem with that, it seems correct. Signed-off-by: Adam Williamson <[email protected]> (cherry picked from commit d687062)
- Loading branch information
1 parent
293a756
commit 8e23a3b
Showing
2 changed files
with
29 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters