mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-27 07:52:24 +00:00
The UX harness (fake nip-07 extension) revealed that the off-thread verification could blank the feed: if nostr-tools is slow/unable to load inside the verify worker, the worker hangs, each batch waits the full 10s timeout, and the main-thread fallback could return an empty set (fail-closed) — dropping every event so no videos ever render, silently (devLogger is suppressed in prod). Harden it so verification can never stall or blank the read feed: - Worker timeout 10s -> 2.5s, and disable the worker for the session after one timeout/error so we never pay the timeout on every batch. - Bound the main-thread nostr-tools wait (Promise.race ~2s) so a slow/failed load can't hang the fallback. - Fail OPEN when the verifier is genuinely unavailable: pass events through unverified rather than dropping them (the pool already does not verify, so this does not regress the prior posture). Real verification still runs whenever nostr-tools is available. Adds a regression test (hung worker -> resolves via fallback, worker disabled). Also updates the harness to seed mode:"live" videos + a NIP-65 relay list for mock-relay isolation. Co-Authored-By: Claude Opus 4.8 <[email protected]>