mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-07 21:32:51 +00:00
nip71: fix feed hang — surface published_at so ingest skips history fetch
Deep dive into the "nothing loads / Fetching recent videos… hangs" symptom found the real blocker: it was NOT the moderation/WoT stage (that uses cached reads and passes unknown authors through clean). It was the feed's resolve-posted-at stage. resolveVideoPostedAt() short-circuits when a video has nip71.publishedAt, otherwise it does a per-video `nostrClient.hydrateVideoHistory()` network fetch (looking up kind-30078 history). Foreign NIP-71 videos have no such history, and the ingest adapter wasn't setting nip71.publishedAt — so a burst of ~32 ingested videos triggered ~32 blocking history fetches that stalled the render and flooded relays. Fix: the ingest adapter now surfaces nip71.publishedAt from the NIP-71 published_at tag (falling back to created_at). The feed short-circuits and never fetches history for ingested videos. Re-enables FEATURE_NIP71_INGEST by default now that the hang is addressed. Tests: adapter published_at extraction + created_at fallback; mutation-verified. 1237/1238 unit (known UploadModal flake). Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
639d045e28
commit
96a985ce89
3 files changed
+36
-8
No files matched your search
@@ -246,14 +246,8 @@ export const ALLOW_NSFW_CONTENT = false;
|
||||
*
|
||||
* Set to `false` to disable all inbound NIP-71 ingest with a single switch if it
|
||||
* ever causes problems (spam, low-quality content, performance).
|
||||
*
|
||||
* NOTE: currently OFF by default. Ingest's data pipeline works, but surfacing a
|
||||
* burst of ingested authors pushes bitvid's moderation/WoT stage to hydrate
|
||||
* trust + report data for many cold authors at once, which storms relays and
|
||||
* stalls the feed render. Re-enable once that hydration is bounded/non-blocking
|
||||
* (or whitelisted authors are treated as pre-trusted). See the NIP-71 plan doc.
|
||||
*/
|
||||
export const FEATURE_NIP71_INGEST = false;
|
||||
export const FEATURE_NIP71_INGEST = true;
|
||||
|
||||
/**
|
||||
* Emergency fallback accounts for seeding the moderation graph.
|
||||
|
||||
Reference in new issue
Block a user