A scan's not-due notices overflow the live-update stream #197

Closed
opened 2026-10-11 13:09:32 -07:00 by rays · 1 comment
Owner

Every scan sends a feed_skip "not due for ..." event for each of the ~1,535 feeds not due (src/main.rs:1241), in a tight loop, into a broadcast channel of 1,024 (src/main.rs:331). When the page's /api/events stream is slow to read (a phone in the background, a full TCP window), the channel overflows and the listener skips the oldest events. ipx_events_missed_total rose by 133 between 18:07 and 19:07 UTC and by 310 around 20:06 UTC on 2026-10-11, with one listener, after scans of 1 feed: .claude/skills/ipx-prod-check/query.py prom 'ipx_events_missed_total{job="ipx"}'. The skipped events are mostly those notices, which the page uses only to clear a spinner it never set for a feed not due (web/src/events.ts:52), so little is lost now, but the counter meant to show pages with stale counts is mostly this noise, and with a few more feeds the overflow reaches the feed_done and download_done that follow. The socket log already drops these (src/ipc.rs:144). Fix: do not broadcast not-due skips, or one summary event per scan.

Every scan sends a `feed_skip` "not due for ..." event for each of the ~1,535 feeds not due (src/main.rs:1241), in a tight loop, into a broadcast channel of 1,024 (src/main.rs:331). When the page's `/api/events` stream is slow to read (a phone in the background, a full TCP window), the channel overflows and the listener skips the oldest events. `ipx_events_missed_total` rose by 133 between 18:07 and 19:07 UTC and by 310 around 20:06 UTC on 2026-10-11, with one listener, after scans of 1 feed: `.claude/skills/ipx-prod-check/query.py prom 'ipx_events_missed_total{job="ipx"}'`. The skipped events are mostly those notices, which the page uses only to clear a spinner it never set for a feed not due (web/src/events.ts:52), so little is lost now, but the counter meant to show pages with stale counts is mostly this noise, and with a few more feeds the overflow reaches the `feed_done` and `download_done` that follow. The socket log already drops these (src/ipc.rs:144). Fix: do not broadcast not-due skips, or one summary event per scan.
rays added the bug label 2026-10-11 13:09:32 -07:00
Author
Owner

Fixed in 12fadbd: Emitter::emit no longer broadcasts the not-due feed_skip (the log and the terminal still get it), so a scan sends a page only what changed. Test: a_feed_not_due_stays_off_the_live_updates. Deployed at 20:13 UTC; ipx_events_missed_total should stay at 0 from here.

Fixed in 12fadbd: `Emitter::emit` no longer broadcasts the not-due `feed_skip` (the log and the terminal still get it), so a scan sends a page only what changed. Test: `a_feed_not_due_stays_off_the_live_updates`. Deployed at 20:13 UTC; `ipx_events_missed_total` should stay at 0 from here.
rays closed this issue 2026-10-11 13:14:12 -07:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: rays/ipx#197