Skip to main content

async-dedup-race-in-streaming-pipelines

النجوم٩
التفرعات٢
آخر تحديث١٠ مارس ٢٠٢٦ في ٠٨:٠٢

Fix invisible/broken rendering when streaming deduplicated results through SSE or WebSocket pipelines with async enrichment. Use when: (1) a counter/count shows items exist but UI renders nothing or fewer items than expected, (2) Svelte keyed {#each} or React key-based lists show blank despite array having items, (3) streaming pipeline uses async processing per item with a dedup Map/Set check before the await, (4) fire-and-forget async calls with Promise.then() lose results when parent stream closes. Root cause: dedup check happens before async gap, allowing concurrent calls for the same key to all pass, producing duplicate emissions. Secondary cause: onDone/stream-close fires before all async promises resolve, silently dropping late results.

التثبيت

التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.

SKILL.md
readonly