Skip to content

[HOTE-1126] feat: schedule reminder#352

Open
usmaana-nhs wants to merge 3 commits intomainfrom
feature/hote-1126/schedule-initial-reminders
Open

[HOTE-1126] feat: schedule reminder#352
usmaana-nhs wants to merge 3 commits intomainfrom
feature/hote-1126/schedule-initial-reminders

Conversation

@usmaana-nhs
Copy link
Copy Markdown
Contributor

Description

Context

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

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.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

Copilot AI review requested due to automatic review settings April 14, 2026 15:04
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

Lambdas Coverage Report

Lines Statements Branches Functions
Coverage: 98%
98.57% (1589/1612) 92.96% (436/469) 97.05% (264/272)

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 14, 2026

UI Coverage Report

Lines Statements Branches Functions
Coverage: 96%
96.16% (5669/5895) 88.22% (682/773) 88.06% (214/243)

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 OrderStatusReminderService and OrderStatusReminderDbClient to schedule/persist reminders when an order reaches DISPATCHED.
  • Wire the reminder service into order-status-lambda init + handler, and extend Jest coverage for the new behavior.
  • Add a DB migration creating order_status_reminder plus the reminder_status enum.

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.

Comment thread lambdas/src/lib/reminder/order-status-reminder-service.ts Outdated
Comment thread lambdas/src/order-status-lambda/index.test.ts Outdated
@usmaana-nhs usmaana-nhs force-pushed the feature/hote-1126/schedule-initial-reminders branch from 0c99ae1 to 50415d4 Compare April 15, 2026 12:18
@sonarqubecloud
Copy link
Copy Markdown

@usmaana-nhs usmaana-nhs marked this pull request as ready for review April 15, 2026 12:49
Copilot AI review requested due to automatic review settings April 15, 2026 12:49
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated no new comments.

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.

2 participants