Skip to content

CCM-17640: Delete TTL faster#349

Open
Ian-Hodges wants to merge 14 commits into
mainfrom
feature/CCM-17640_delete-ttl-faster
Open

CCM-17640: Delete TTL faster#349
Ian-Hodges wants to merge 14 commits into
mainfrom
feature/CCM-17640_delete-ttl-faster

Conversation

@Ian-Hodges
Copy link
Copy Markdown
Contributor

@Ian-Hodges Ian-Hodges commented May 14, 2026

Description

Update to the nhsapp-status-handler function to delete TTLs faster.

  • Rename to core-status-handler
  • Add support for paper_letter_opted_in event (delete TTL, send Read event).
  • Add support for supplierStatus is "rejected" and channelStatus is "failed" (delete TTL, send Unsuccessful event).
  • Add support for message.status.PUBLISHED.v1 events where the messageStatus is "failed" (withdraw TTL, send Unsuccessful event).

This PR also includes changes ported over from CCM-17639, and some fixes for flaky component tests.

Context

We currently wait 24 hours for the TTL to be deleted before we send a request for a letter to be printed. However there are several scenarios where we can delete the TTL immediately and speed the process up.

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.

@Ian-Hodges Ian-Hodges force-pushed the feature/CCM-17640_delete-ttl-faster branch from fc2f35f to c611fa5 Compare May 26, 2026 10:05
@Ian-Hodges Ian-Hodges force-pushed the feature/CCM-17640_delete-ttl-faster branch from 2669d2e to 9b17f1a Compare May 27, 2026 07:16
@Ian-Hodges Ian-Hodges force-pushed the feature/CCM-17640_delete-ttl-faster branch from b6f89fc to 1898afe Compare May 28, 2026 09:49
@Ian-Hodges Ian-Hodges marked this pull request as ready for review May 28, 2026 10:14
@Ian-Hodges Ian-Hodges requested review from a team as code owners May 28, 2026 10:14
@Ian-Hodges Ian-Hodges changed the title CCM-17640: rename nhsapp-status-handler to core-status-handler CCM-17640: Delete TTL faster May 28, 2026
@Ian-Hodges Ian-Hodges force-pushed the feature/CCM-17640_delete-ttl-faster branch from 8e34f07 to 6dd6d14 Compare May 28, 2026 13:11
@Ian-Hodges Ian-Hodges force-pushed the feature/CCM-17640_delete-ttl-faster branch from 6dd6d14 to 7a64f92 Compare May 28, 2026 14:34
Comment thread utils/utils/src/types/core-status-published-event.ts
Comment thread tests/pact-tests/utils/pact-config.ts Outdated
Comment thread tests/pact-tests/pact-verification/status-published.provider.pact.test.ts Outdated
@simonlabarere
Copy link
Copy Markdown
Contributor

simonlabarere commented May 29, 2026

I believe we need to up the version of the PACT contract in pact-contracts/package.json as well.

@Ian-Hodges Ian-Hodges force-pushed the feature/CCM-17640_delete-ttl-faster branch from b01997b to da4337b Compare May 29, 2026 11:09
simonlabarere
simonlabarere previously approved these changes May 29, 2026
@gareth-allan gareth-allan self-assigned this Jun 1, 2026
Comment thread utils/utils/src/types/core-status-published-event.ts Outdated
Comment thread tests/pact-tests/consumer/core-notify.consumer.pact.test.ts Outdated
Comment thread tests/pact-tests/consumer/core-notify.consumer.pact.test.ts Outdated
Comment thread tests/pact-tests/consumer/core-notify.consumer.pact.test.ts Outdated
Comment thread tests/pact-tests/consumer/core-notify.consumer.pact.test.ts Outdated
Comment thread utils/utils/src/types/core-status-published-event.ts Outdated
Comment thread lambdas/core-status-handler/src/app/ttl-actions.ts Outdated
Comment thread lambdas/core-status-handler/src/__tests__/app/ttl-actions.test.ts Outdated
Comment thread tests/pact-tests/consumer/core-notify.consumer.pact.test.ts Outdated
@Ian-Hodges Ian-Hodges force-pushed the feature/CCM-17640_delete-ttl-faster branch from 8f5959b to 7381074 Compare June 1, 2026 16:14
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this file should have been committed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I don't think this file should have been committed.

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.

3 participants