coralproject / talk

A better commenting experience from Vox Media
https://coralproject.net
Other
1.88k stars 355 forks source link

Moderation Pipeline will never run external phases when PREMOD is set #4630

Closed bastiankistner closed 1 week ago

bastiankistner commented 2 months ago

Expected behavior: External moderation phases are not skipped when pre-moderation phase is enabled.

Actual behavior: When pre-moderation is enabled in admin settings, external moderation phases will never run as the statusPreModerate.ts will set a status and therefore the pipeline will abort early.


I wonder if it really makes sense to run the statusPreModerate phase before external phases. When premod is disabled and an external phase is unavailable (e.g. due to network issues or errors), this could potentially result in every comment being published immediately.

However, if external phases would run before the premod phase, they would have the opportunity to set a status and if not, the premod phase would still ensure that moderation is required.

The only necessary change would be to change the order of the very last phases. Instead of running external phases last, they should run before any phase that returns a status.

bastiankistner commented 2 months ago

I've prepared a draft PR that contains a suggestion for the pipeilne order: https://github.com/coralproject/talk/pull/4631/files

losowsky commented 2 months ago

Thanks! We'll take a look at this soon.

losowsky commented 1 month ago

Just to let you know, this is still in our backlog to look at. More soon!

nick-funk commented 1 month ago

I've taken a look into this and I think it would be safe to move the external mod phases to run prior to the pre-mod phases. I've opened a PR here: https://github.com/coralproject/talk/pull/4641

We still have to vet it with QA testing, but I think we can likely make this happen.

losowsky commented 1 week ago

PR has now been merged and released: https://github.com/coralproject/talk/pull/4641