Files
bitvid/tests
thePR0M3TH3ANandClaude Opus 4.8 c4df08d5a1 nip71: make ingest observable + throttle its feed refreshes
Two stabilization fixes after live testing showed ingest was invisible
and could amplify feed load:

1. Diagnostics were using devLogger.log, which is gated by IS_DEV_MODE
   (false in all current builds) — so the [nip71Ingest] subscribe/flush
   lines never printed and the feature was impossible to observe. Switched
   the subscribe + per-flush lines to userLogger.info so we can confirm in
   the console whether it subscribed (author count) and whether events are
   arriving/injecting. (Temporary while stabilizing.)

2. Coalesce ingest-driven "videos:updated" signals behind an 8s throttle.
   A burst of incoming events previously emitted a refresh per flush; each
   refresh re-runs the feed and re-subscribes moderation/social context for
   every video, which can contribute to a REQ storm. Injected videos are
   already in the active store, so throttling only delays the visual
   refresh, not the data.

Tests: throttle coalescing test (one immediate refresh per window, both
videos still stored); mutation-verified. 1234/1235 unit (known flake).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
2026-06-22 16:05:01 -04:00
..
2026-02-21 16:08:33 -05:00
2026-02-21 15:53:09 -05:00