BUG: Duplicate history events being created with renewal email reminders
- Dominant language
- Python
- Stars
- 2
- Forks
- 22
- Avg merge
- 2d 35m
- Merged PRs (30d)
- 11
Description
Description:
Recently, duplicate events are being recorded in the history for Renewal reminders sent. There are 2 at the same date and time. 
To Reproduce:
Search for registration H483679608 in PROD.
Open the history events
Duplicate events are showing for Renewal Reminders sent - 2 on JUne 9th and 2 on May 14th. THere should only be 1 on each date.
The network tab showed this for the history events;
{
"createdDate": "2026-06-01T07:01:30.968271Z",
"details": null,
"eventName": "RENEWAL_REMINDER_SENT",
"eventType": "REGISTRATION",
"idir": null,
"message": ""
},
{
"createdDate": "2026-06-01T07:01:51.079005Z",
"details": "Interaction sent via EMAIL",
"eventName": "RENEWAL_REMINDER_SENT",
"eventType": "REGISTRATION",
"idir": null,
"message": ""
Not sure what the difference is for the one wiht detaile "Interaction sent via EMAIL".
Asked Jimmy and he said "there is no duplicate email being sent but duplicate events being stored.
1 Renewal reminders job when queueig the email to be sent records an event
2 When email is disptached, another event record is stored. but this time with detail “Interaction sent via EMAIL”
## Acceptance Criteria
> Generated by [Zenhub AI](https://www.zenhub.com/ai)
### Acceptance Criteria
- [ ] **Scenario: Single history event recorded per renewal reminder**
- Given a registration is eligible for a renewal reminder
- When the renewal reminder job runs and dispatches the email
- Then exactly one history event with the `eventName` "RENEWAL_REMINDER_SENT" should be recorded
- And no duplicate event should be created during the queuing phase
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the renewal reminder job and the history-event writes described in the issue, comparing the queueing and email-dispatch paths. Reproduce the registration history behavior and verify that each dispatched renewal reminder produces exactly one RENEWAL_REMINDER_SENT event, without a queueing-phase duplicate.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100