Skip to content

feat: expand review queue instead of expiring pending reviewers#551

Open
kylehoehns wants to merge 1 commit intomainfrom
feat/expand-review-queue-instead-of-expire
Open

feat: expand review queue instead of expiring pending reviewers#551
kylehoehns wants to merge 1 commit intomainfrom
feat/expand-review-queue-instead-of-expire

Conversation

@kylehoehns
Copy link
Copy Markdown
Contributor

@kylehoehns kylehoehns commented Apr 9, 2026

Summary

  • Replaces the 30-minute per-reviewer expiration model with a review-level expansion model. Instead of closing a pending reviewer's DM and replacing them when their timer fires, the bot now adds a new batch of reviewers alongside existing pending ones at each cycle.
  • expiresAt removed from PendingReviewer / PendingPairingTeammate; replaced with nextExpandAt on ActiveReview and PairingSession
  • Cron adds NUMBER_OF_INITIAL_REVIEWERS people per cycle (same batch size as initial requests), reducing DB writes from N per cycle to 1
  • Applies to both HackerRank reviews and pairing sessions

Test plan

  • All 201 existing tests pass (pnpm verify)
  • Manually request a review and confirm the initial batch of DMs goes out
  • Wait for the expand cycle and confirm new DMs are added without closing existing ones
  • Decline a review request and confirm a replacement is added
  • Accept enough reviews to fill the request and confirm it closes cleanly

Replace the 30-minute per-reviewer expiration model with a review-level
expansion model. Instead of closing a pending reviewer's DM after 30
minutes and replacing them, the cron now adds a new batch of reviewers
alongside existing pending reviewers at each cycle.

- Remove expiresAt from PendingReviewer/PendingPairingTeammate
- Add nextExpandAt to ActiveReview and PairingSession (review-level timer)
- Replace expireRequest with expandRequest (adds NUMBER_OF_INITIAL_REVIEWERS per cycle)
- Replace expirePairingRequests teammate-level expiry with expandTeammates
- Single DB write per expand cycle (was N writes, one per reviewer)
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