Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce #reviewOptional as reviewState for non-impactful events on a subject #2235

Merged
merged 11 commits into from
Mar 6, 2024

Conversation

foysalit
Copy link
Contributor

@foysalit foysalit commented Feb 27, 2024

Up until now, emitting events like modEventComment or modEventTag would set the reviewState of the subject to reviewOpen which is a bit disruptive to the moderation queue since these events are meant for setting optional metadata on the subject and should not require a moderator's review. This PR introduces a new reviewOptional state which will be set when such events are emitted on a subject with no prior (impactful) events.

TODO:
This means for events with type modEventLabel, we will no longer set the subject's status to reviewOpen so if tools like automod wants a labeled subject to be reviewd by a moderator, it will have to emit a separate modEventReport event.

Copy link
Collaborator

@bnewbold bnewbold left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't love the name #reviewOptional. Maybe #reviewNone or "empty" or something like that?

Automod already does label + create review in cases where that is needed or appropriate; it will also be good to be able to apply labels without requiring review. This is basically just parity with how image auto-labeling works (IIRC).

@foysalit
Copy link
Contributor Author

I don't have strong opinion on the naming so happy to rename to reviewNone.
yeah, labels events will now only set to reviewNone if no previous state is set.

"reviewState": "com.atproto.admin.defs#reviewEscalated",
"reviewState": "com.atproto.admin.defs#reviewOpen",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change stood out to me a little—just making sure we can account for the change in behavior.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch! as discussed in slack, this was caused by a race condition and I missed the update in snapshot.
pushed a fix by adding forUpdate() to the current status selector query which should be safe since we shouldn't have that many concurrent events on the same subject.

Copy link
Collaborator

@devinivy devinivy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had one question, but looks good!

@devinivy devinivy merged commit bae2ce3 into main Mar 6, 2024
10 checks passed
@devinivy devinivy deleted the nullable-review-state branch March 6, 2024 20:30
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.

3 participants