Skip to content

Merge pull request #81 from call-0f-code/birthday-feature Add routes for birthday mail service - #82

Merged
Sherin-2711 merged 17 commits into
productionfrom
main
Oct 21, 2026
Merged

Sherin-2711 merged 17 commits into
productionfrom
main

Conversation

@i-am-that-guy

Copy link
Copy Markdown
Member

No description provided.

Harish-Naruto and others added 17 commits June 23, 2026 16:41
Add persist-credentials option to checkout step
Docker workflow to build and push image
 refactored local dev setup (made it easy)
Add Docker Compose configurations for full stack development
Add Docker Compose configuration for API and platform services
- Write job results with a lease-checked updateMany so a worker whose
  lease expired can't overwrite a job another worker has claimed
- Count the lost attempt when reclaiming an expired PROCESSING job and
  move it to DEAD at max attempts, so crashing jobs don't retry forever
- Validate sentAt and errorClassification in the controller (400 not 500)
- Controller builds the { success: true, ... } response; service returns data
- Read INTERNAL_SERVICE_SECRET via config, drop BIRTHDAY_SERVICE_SECRET
  fallback, hash before timingSafeEqual to hide secret length
- Rename route file to birthdayEmails.ts and add apidoc blocks
- Dedupe lease checks, defaults and retry delays; type errorClassification
- Update and extend tests
- Accept the UNCERTAIN error classification sent by the COC-Members
  birthday worker (provider timeout after dispatch); retry it like
  TRANSIENT. The previous commit rejected it with a 400.
- Validate providerMessageId as string, null or missing (400 otherwise)
- Accept only the x-internal-secret header; the worker already sends it
- Match sibling controllers: export const handlers, single service import
- initialize: rely on the unique (memberId, birthdayYear) index with
  createMany skipDuplicates instead of pre-loading existing jobs; move
  the email check into the member query
- /sent: write first with the lease-guarded updateMany and only read on
  a miss (404 / already sent / 409). Saves a query per send and makes
  overlapping /sent calls return alreadySent instead of 409
- stats: replace the status switch with a lookup map
- drop controller checks the service already does
- derive ClaimedJob from the Prisma model
Add routes for birthday mail service
@coderabbitai

coderabbitai Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd481e54-f538-44d2-9a7e-924327860db4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Sherin-2711
Sherin-2711 merged commit 7eb7d59 into production Oct 21, 2026
5 checks passed
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.

4 participants