[F] Prevent race conditions in comment moderation#10
Conversation
Misaka13514
commented
Mar 11, 2026
There was a problem hiding this comment.
Pull request overview
This PR aims to prevent concurrent moderation actions (approve/reject/ban) from being applied to the same pending comment at the same time in the Telegram moderation workflow.
Changes:
- Added an in-memory per-comment “in process” lock (
processingCommentIds) plus awithCommentLockhelper to guard moderation actions. - Wrapped
ban,reject, andpass/pass-spoilerconfirm actions with the new locking helper. - Added a defensive “already approved” check before creating the commit for
passactions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
f3fb7d8 to
b14e10b
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
b14e10b to
d989864
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
d989864 to
29f4887
Compare