Skip to content

Send an earlier review queue email as the SLO approaches - #1507

Merged
jboolean merged 1 commit into
masterfrom
claude/stale-queue-slo-warning-57fb27
Sep 23, 2026
Merged

jboolean merged 1 commit into
masterfrom
claude/stale-queue-slo-warning-57fb27

Conversation

@jboolean

@jboolean jboolean commented Sep 22, 2026

Copy link
Copy Markdown
Owner

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 isApproachingSlo variable on the same review-queue-stale template 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:

  <p>
   Moderators,
  </p>

  <p>
   The queue is {{#isApproachingSlo}}approaching{{/isApproachingSlo}}{{^isApproachingSlo}}behind{{/isApproachingSlo}} its SLO. There are {{ storiesCount }} stories in the queue, some of which have been waiting {{#isApproachingSlo}}more than a day{{/isApproachingSlo}}{{^isApproachingSlo}}for a few days{{/isApproachingSlo}}.
  </p>

  <p class="important">
    <a href="{{ reviewStoriesUrl }}">Click here to go to the review queue</a>
  </p>
  
  <h3>Reviewing stats</h3>
  <ol>
  {{#each stats}}
  <li>{{reviewer}}: {{count}} stories</li>
  {{/each}}
  </ol>
  <p>
  Thanks for your help!
  </p>

Both variants pass Postmark's /templates/validate with no errors, and its SuggestedTemplateModel matches StoryReviewEmailTemplateData. The template alias is unchanged, so the Postmark edit and this code change can land in either order.

🤖 Generated with Claude Code

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 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".

Comment thread backend/src/cron/checkStaleStories.ts Outdated
Comment on lines 38 to 40
.andWhere('story.updated_at < :warningThreshold', {
warningThreshold: new Date(Date.now() - WARNING_THRESHOLD_MS),
})

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge 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 👍 / 👎.

@jboolean
jboolean force-pushed the claude/stale-queue-slo-warning-57fb27 branch from 6c9305e to 514569b Compare September 22, 2026 12:58
@jboolean jboolean changed the title Warn about the review queue a day before the SLO is missed Send an earlier review queue email as the SLO approaches Sep 22, 2026
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@jboolean
jboolean force-pushed the claude/stale-queue-slo-warning-57fb27 branch from 514569b to 973d980 Compare September 22, 2026 13:09
@jboolean
jboolean merged commit 8036c03 into master Sep 23, 2026
12 checks passed
@jboolean
jboolean deleted the claude/stale-queue-slo-warning-57fb27 branch September 23, 2026 11:39
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.

1 participant