Messages Remain Visible at Their Exact Expiry Time
Level 2 · node · API · Inclusive expiry cutoff in message listing
Scenario
A fictional facility operations board stores messages by channel with expiration timestamps in milliseconds. Each listing request provides the current time explicitly. Only messages whose expiration time is strictly later than that time should remain visible. The existing service still displays a message at the exact moment it expires. Inspect the repository, service, and controller flow.
Requirements
Return only messages whose expiration timestamp is strictly greater than the supplied cutoff. Exclude messages that expired earlier or exactly at the cutoff. Preserve channel isolation, message ordering, and stored records without adding dependencies.
Acceptance criteria
- Messages from a known channel are returned only for that channel.
- An unknown channel returns an empty list.
- Messages expiring before the query cutoff are excluded.
- Messages expiring exactly at the cutoff are excluded.
- Unexpired messages retain their original order.
- Listing messages does not mutate stored records.