GeezerVison is showing github.com — fix(notification): serialize inactive email dispatch (#847) by Storypapst · Pull Request #848 · OpenResilienceInitiative/ORISO-UserService
Conversation
Storypapst
commented
Jul 27, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Summary
- claim each inactive-account notification fingerprint in a committed MariaDB transaction before contacting MailService
- use the existing unique fingerprint constraint so concurrent UserService replicas submit at most one mail request
- suppress only proven duplicate claims; surface unrelated database integrity failures
- record MailService acceptance separately, keep rejected requests marked undispatched, and fail explicitly if the claimed audit row disappears
- treat MailService client-setup and submission failures uniformly as a rejected request
- document the remaining crash window because the current MailService OpenAPI contract has no idempotency key
TDD proof
On unchanged pre-dev, the new two-instance proof failed with two calls to MailService.sendEmailNotification where one was expected. After the claim boundary, the same proof passes with one audit row and one accepted mail call.
The follow-up regression tests first proved that an unrelated integrity failure was swallowed as a duplicate, MailService client setup could escape the boolean acceptance contract, and a missing audit row was silently ignored. All three cases now fail safely and explicitly.
Validation
- exact head:
c3323981b550015da7b8c1d1a336cf57ec92fd2c
- focused notification and MailService tests: 18 passed
- full Maven suite: 3,377 passed, 0 failures/errors, 4 skipped
- required integration contract: 841 passed across 79 reports, 0 failures/errors, 2 skipped
- CI/load-test contracts: 13 passed
- package build: passed
- Spotless and diff checks: passed
- CodeRabbit CLI follow-up review: 0 findings after fixing its two valid findings
- GitHub exact-head checks after publication: 12/12 passed; the successful CodeRabbit status explicitly records that hosted reviews are disabled for this base branch
- synthetic merge audit: conflict-free with PRs feat(stability): replay replica safety contract (#822) #823, feat(observability): replay Matrix sync cycle traces (#760) #825, perf(admin): replay tenant-safe consultant agency read collapse (#764) #827, fix(observability): replay bounded OTP admin-session retry metric (#766) #828, test(stability): replay zero-quarantine guard on current pre-dev (#768) #829, fix(replica): replay atomic tutorial writes on current pre-dev (#773) #830, refactor(identity): replay provider-neutral magic-link sessions (#770) #831, perf(agency): replay bounded outage fallback calls (#785) #832, test(load): replay measured two-replica mixed reads (#743) #834, fix(notification): replay group-chat reminder idempotency (#845) #846, Measure and bound asynchronous LiveService delivery #854, fix(runtime): remove obsolete MongoDB stack (#855) #856, and feat(observability): bound Keycloak transport and redact traces (#857) #862
- local Redis remained healthy; no persistent database reset was required
Delivery boundary
This is an at-most-once UserService replica guarantee, not end-to-end exactly-once email delivery. A process stop after MailService accepts the request and before the audit update commits cannot be replayed safely until MailService accepts a stable idempotency key or the boundary is replaced with a durable outbox and idempotent consumer.
The target architecture remains Matrix as the sole chat system, the ORISO-owned frontend, an ORISO-controlled Element Call / MatrixRTC fork, and LiveKit for media. Rocket.Chat and Jitsi are removal targets and are not fallbacks.
This PR proves source, local-test, CI, and merge-compatibility state only. It is not merged, deployed to PreDev, or runtime-proven.
This slice supersedes the bounded inactive-notification portion of historical commit 867c9925.
Closes #847
Refs #543
Refs #757
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Jul 27, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Important
Review skipped
Auto reviews are disabled on base/target branches other than the default branch.
Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: dbe7cf24-a5ed-4bd7-a612-e341b9f02c1f
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
✨ Finishing Touches
✨ Simplify code
- Create PR with simplified code
- Commit simplified code in branch
replay/inactive-account-notification-claim-847
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jul 27, 2026
|
Bugbot is not enabled for your account, so this pull request was not reviewed.
Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Jul 28, 2026
Uh oh!
There was an error while loading. Please reload this page.
Reviewers
shazia-k
shazia-k approved these changes
Hassan9215
Awaiting requested review from Hassan9215
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|