Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces initial “order status reminder” scheduling as a side-effect of the order status update flow in the order-status-lambda, persisting reminder state in a new database table.
Changes:
- Add
OrderStatusReminderServiceandOrderStatusReminderDbClientto schedule/persist reminders when an order reachesDISPATCHED. - Wire the reminder service into
order-status-lambdainit + handler, and extend Jest coverage for the new behavior. - Add a DB migration creating
order_status_reminderplus thereminder_statusenum.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| lambdas/src/order-status-lambda/init.ts | Adds reminder DB client + service to the lambda environment wiring. |
| lambdas/src/order-status-lambda/init.test.ts | Updates init wiring tests to include the new dependencies. |
| lambdas/src/order-status-lambda/index.ts | Calls reminder scheduling after writing the order status update. |
| lambdas/src/order-status-lambda/index.test.ts | Adds assertions around reminder delegation and failure behavior. |
| lambdas/src/lib/reminder/order-status-reminder-service.ts | New service to schedule reminders by status (currently DISPATCHED). |
| lambdas/src/lib/reminder/order-status-reminder-service.test.ts | Unit tests for reminder side-effects and error swallowing. |
| lambdas/src/lib/db/order-status-reminder-db-client.ts | New DB client to insert reminder rows into order_status_reminder. |
| lambdas/src/lib/db/order-status-reminder-db-client.test.ts | Unit tests for the reminder insert DB client. |
| database/migrations/000009_add_order_status_reminder_table.sql | Creates the reminder table, enum type, index, and uniqueness constraint. |
0c99ae1 to
50415d4
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Context
Type of changes
Checklist
Sensitive Information Declaration
To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.