Repository navigation
feat: Implement BC Notify callback handling and E2E tests - #320
Merged
Merged
Conversation
Cover BC Notify and SMTP success paths, resend, and archive of expired notifications.
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.
Summary
BC Notify sends are now archived after the provider's status callback arrives, not at send time. The PR also adds a shared E2E suite for the notify-api and notify-delivery services, and raises the Python minimum to 3.13.
Changes
BC Notify callback handling
SENT. The notification and its content stay active./api/v2/callback/(roleBC_NOTIFY_CALLBACK) stores every event in the newbc_notify_callbacktable.successorcompletedstatus marks the notificationDELIVERED, writesNotificationHistorywith the callback status and response ID, and deletes the active notification and content in one transaction.find_archivable_notificationsexcludes BC NotifySENTrows, so they stay available for callback matching.0016addsbc_notify_callback.0017renames the notify-history fields.0018addsnotify_response_idtonotification.openapi.yamlandARCHITECTURE.mdare updated.E2E suite (
notify-service/e2e/)The suite runs the real API and delivery apps in one process on a temporary SQLite database. Only Pub/Sub publish, the BC Notify HTTP call and
smtplib.SMTPare faked.sendingcallback,completedcallback, archived history, then lookup through the API. Also checks that an invalid recipient gets a 400 and nothing is published.<img>routes to SMTP. Delivery sends through the mocked server and archives the record asSENT.FAILUREnotification is republished by/api/v2/resend, sent by delivery and archived.EXPIREDwithout being republished.uv run python -m pytest ../e2e) and is documented in both READMEs.Python and dependencies
6.0.0, require Python>=3.13, <3.14, and use ruffpy313.uv.lockwas regenerated for both. Each lockfile loses about 220 lines, so please look at those diffs closely.