Send an earlier review queue email as the SLO approaches - #1507
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6c9305e2b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| .andWhere('story.updated_at < :warningThreshold', { | ||
| warningThreshold: new Date(Date.now() - WARNING_THRESHOLD_MS), | ||
| }) |
There was a problem hiding this comment.
Update the Postmark template before advancing the alert
This lowers the trigger to one day while continuing to send the existing review-queue-stale template. That template is explicitly not updated by this change and previously says the queue is already behind its two-day SLO, so any production run with a 1–2-day-old submitted story will send moderators a false breach notification. Deploy the revised Postmark content (or a new template alias) together with this threshold change rather than leaving the required external change as documentation only.
Useful? React with 👍 / 👎.
6c9305e to
514569b
Compare
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
514569b to
973d980
Compare
The review queue email now also goes out at one day, before the two-day SLO is missed, in addition to the existing send once the SLO has been missed. A new
isApproachingSlovariable on the samereview-queue-staletemplate switches the wording between the two.Moderators get a heads-up a day earlier reading "The queue is approaching its SLO … waiting more than a day." Once something actually crosses two days, the wording reverts to the existing "The queue is behind its SLO … waiting for a few days."
The template body lives in Postmark, not in this repo, so it needs updating there to this:
Both variants pass Postmark's
/templates/validatewith no errors, and itsSuggestedTemplateModelmatchesStoryReviewEmailTemplateData. The template alias is unchanged, so the Postmark edit and this code change can land in either order.🤖 Generated with Claude Code