Skip to content

Feature/notification expiration#462

Open
vicajohn wants to merge 2 commits into
Core-Foundry:mainfrom
vicajohn:feature/notification-expiration
Open

Feature/notification expiration#462
vicajohn wants to merge 2 commits into
Core-Foundry:mainfrom
vicajohn:feature/notification-expiration

Conversation

@vicajohn

Copy link
Copy Markdown
Contributor

✅ Implemented notification expiration support

This pull request introduces expiration handling for notifications to ensure that outdated notifications are not processed or delivered after their validity period has elapsed.

Changes made:

Added an expirationTimestamp field to the notification model to define the time at which a notification becomes invalid.
Updated the notification processing workflow to check the expiration timestamp before processing. Any notification that has passed its expiration time is skipped, preventing unnecessary processing and delivery of stale notifications.
Ensured that only notifications with a valid (non-expired) expiration timestamp proceed through the processing pipeline.
Added comprehensive unit tests covering both successful and failure scenarios, including:
Processing notifications that have not yet expired.
Rejecting notifications whose expiration time has already passed.
Verifying that the expiration validation behaves correctly across different edge cases.

close #369

vicajohn added 2 commits July 25, 2026 06:14
- Add ExpirationConfig interface with configurable default and per-event-type expiration
- Create NotificationExpirationService with core expiration checking logic
- Integrate expiration checks into EventSubscriber to prevent processing of expired events
- Add comprehensive test suite with 38+ tests covering all methods and edge cases
- Update configuration schema with EXPIRATION_* environment variables
- Update .env.example with expiration settings examples
- Log expired events with full context for audit trail

Fixes expired notifications being processed and delivered
Supports 24-hour default expiration with configurable per-event-type overrides
Expiration checking can be disabled via config for backward compatibility
@drips-wave

drips-wave Bot commented Jul 25, 2026

Copy link
Copy Markdown

@vicajohn Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@vicajohn

Copy link
Copy Markdown
Contributor Author

please review.

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.

Add Notification Expiration Logic

1 participant