Skip to content

Implement decision overrides in reviewer tools#25075

Merged
eviljeff merged 5 commits into
mozilla:masterfrom
eviljeff:16242-reviewer-tools-override-decision
Jul 22, 2026
Merged

Implement decision overrides in reviewer tools#25075
eviljeff merged 5 commits into
mozilla:masterfrom
eviljeff:16242-reviewer-tools-override-decision

Conversation

@eviljeff

@eviljeff eviljeff commented Jun 25, 2026

Copy link
Copy Markdown
Member

Fixes mozilla/addons#16242

Description

When making a new decision, optionally allows selecting an existing decision to be overridden. When this happens the enforcement action for the existing decision is reversed first.

image

For complex cases where the decision to be overridden needs to be reversed first, there is an "Override Reverse-only" policy for the first override.

Selecting a previous decision to override also force-shows (unhides) the versions that were affected by that decision, meaning you can choose versions to be affected by the new decision even if their status would usually hide them.

Context

Turned out to be quite a large pr! Properly overriding involved a lot of changes - really the PR is much more about ActionClass changes and not much in the reviewer tools code. The reviewer tools changes are mainly about exposing the versions affected by the overridden decision.

I had claude write the refactoring changes with overrides in abuse/actions.py, abuse/models.py, and the associated tests. I read all the changes, and they seem reasonable, but worth paying special attention nevertheless. I then followed up that refactoring with some manual clean-up and fixes.

Testing

Sync your Cinder policies + turn on waffle switch + enable the new Override Reverse-only for reviewer tools in django admin

Try:

  • overriding a decision directly with a new decision (e.g. disable with approve) - should reverse and send an email
    • if the new policy involves an action with versions selection (e.g. reject or approve version) you will see the target versions from the old decision are dynamically made available in the version list for selection
  • overriding to Override Reverse-only policy - shouldn't send an email
  • then overriding that override to a new decision (should sent an email)

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@eviljeff
eviljeff force-pushed the 16242-reviewer-tools-override-decision branch from ab458e8 to 31b398c Compare June 29, 2026 10:57
@eviljeff
eviljeff requested a review from diox June 29, 2026 14:59
@eviljeff
eviljeff force-pushed the 16242-reviewer-tools-override-decision branch from 31b398c to e9781d5 Compare June 29, 2026 15:00
@diox

diox commented Jun 30, 2026

Copy link
Copy Markdown
Member

Example: previous decision disabled the add-on, and so all the versions; reviewer wants to override the disable with an an approve version, but those versions are not available for selection for the approve version.

I don't think that should be possible/allowed. If the add-on itself was disabled, we shouldn't allow an approve version, the force-disable should be reverted first separately.

@diox

This comment was marked as outdated.

@eviljeff
eviljeff force-pushed the 16242-reviewer-tools-override-decision branch 3 times, most recently from 40c9d36 to acc175f Compare July 2, 2026 17:38
@eviljeff
eviljeff marked this pull request as ready for review July 3, 2026 08:37
@eviljeff
eviljeff force-pushed the 16242-reviewer-tools-override-decision branch from 805dd3f to bc285a7 Compare July 3, 2026 16:18
@eviljeff
eviljeff marked this pull request as draft July 13, 2026 10:40
@eviljeff
eviljeff force-pushed the 16242-reviewer-tools-override-decision branch 4 times, most recently from 96504f9 to a6fd11f Compare July 14, 2026 12:38
@eviljeff
eviljeff force-pushed the 16242-reviewer-tools-override-decision branch from a6fd11f to 12664d9 Compare July 14, 2026 12:51
@eviljeff
eviljeff marked this pull request as ready for review July 14, 2026 15:01
@eviljeff
eviljeff merged commit 29292d3 into mozilla:master Jul 22, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task]: Have reviewers override a decision

2 participants