Primary finding
Observability /events SSE stream allocates seen_ids set bounded only by full clear, opening a memory + dedup correctness gap
- backend/app/api/observability.py:65-75
When seen_ids hits 5000 it is wholesale cleared, which means events received in the next batch that were already seen prior to the clear will be re-emitted as duplicates to the SSE consumer. A bounded LRU (e.g. collections.deque + set) would preserve the dedup property. Minor but a correctness regression on long-lived SSE connections.
Recommendation
Replace seen_ids set with an OrderedDict / deque-backed LRU of fixed capacity that evicts oldest entries instead of clearing.